I have two disks, one contains Fedora 12 and the other contains Windows XP. Both boot and run individually in the same computer (by swapping cables). I am trying to set up a dual boot using GRUB but I'm having some problems. Here is my grub.conf file:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_shorty-lv_root
# initrd /initrd-[generic-]version.img
# boot=/dev/sda
default=2
timeout=15
splashimage=(hd0,0)/grub/splash.xpm.gz
# hiddenmenu
title Fedora (2.6.32.16-141.fc12.i686.PAE)
root (hd0,0)
kernel /vmlinuz-2.6.32.16-141.fc12.i686.PAE ro root=/dev/mapper/vg_shorty-lv_root LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
initrd /initramfs-2.6.32.16-141.fc12.i686.PAE.img
title Fedora (2.6.31.5-127.fc12.i686.PAE)
root (hd0,0)
kernel /vmlinuz-2.6.31.5-127.fc12.i686.PAE ro root=/dev/mapper/vg_shorty-lv_root LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
initrd /initramfs-2.6.31.5-127.fc12.i686.PAE.img
title Windows XP
root (hd1,2)
makeactive
chainloader +1
Here's the fdisk output:
[root@shorty droark]# fdisk -l
Disk /dev/sda: 500.1 GB, 500106780160 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0001c9cc
Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204799+ 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 60802 488179712 8e Linux LVM
Partition 2 does not end on cylinder boundary.
Disk /dev/sdb: 500.1 GB, 500106780160 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x076d076c
Device Boot Start End Blocks Id System
/dev/sdb1 1 26 204799+ 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2 * 26 60802 488179650 7 HPFS/NTFS
Partition 2 does not end on cylinder boundary.
Disk /dev/dm-0: 494.3 GB, 494307115008 bytes
255 heads, 63 sectors/track, 60096 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1: 5586 MB, 5586812928 bytes
255 heads, 63 sectors/track, 679 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-1 doesn't contain a valid partition table
Disk /dev/sdc: 1812.1 GB, 1812124903424 bytes
255 heads, 63 sectors/track, 220311 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5044b1a4
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 121601 976760001 7 HPFS/NTFS
[root@shorty droark]#
Eventually I have tried every combination for the disk/partition on the NTFS disk. While the "Windows XP" option always appears in the GRUB options, the option fails each time with something like "disk not found". When that happens, I can still select the Fedora kernel and away we happily go.
Sorry for the bother and thanks for anything.
Dick
On Sat, 2010-07-17 at 19:00 +0800, Dick Roark wrote:
title Windows XP
root (hd1,2)
[...]
/dev/sdb2 * 26 60802 488179650 7 HPFS/NTFS
Looks like you have a "start count from 0 or 1" problem. fdisk starts with 1, grub starts with 0. So you need:
root(hd1,1)
...in order to boot off sda2.
--Greg
On 07/17/2010 04:00 AM, Dick Roark wrote:
I have two disks, one contains Fedora 12 and the other contains Windows XP. Both boot and run individually in the same computer (by swapping cables). I am trying to set up a dual boot using GRUB but I'm having some problems. Here is my grub.conf file:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_shorty-lv_root
# initrd /initrd-[generic-]version.img
# boot=/dev/sda
default=2
timeout=15
splashimage=(hd0,0)/grub/splash.xpm.gz
# hiddenmenu
title Fedora (2.6.32.16-141.fc12.i686.PAE)
root (hd0,0)
kernel /vmlinuz-2.6.32.16-141.fc12.i686.PAE ro root=/dev/mapper/vg_shorty-lv_root LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
initrd /initramfs-2.6.32.16-141.fc12.i686.PAE.img
title Fedora (2.6.31.5-127.fc12.i686.PAE)
root (hd0,0)
kernel /vmlinuz-2.6.31.5-127.fc12.i686.PAE ro root=/dev/mapper/vg_shorty-lv_root LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
initrd /initramfs-2.6.31.5-127.fc12.i686.PAE.img
title Windows XP
root (hd1,2)
makeactive
chainloader +1
Here's the fdisk output:
[root@shorty droark]# fdisk -l
Disk /dev/sda: 500.1 GB, 500106780160 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0001c9cc
Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204799+ 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 60802 488179712 8e Linux LVM
Partition 2 does not end on cylinder boundary.
Disk /dev/sdb: 500.1 GB, 500106780160 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x076d076c
Device Boot Start End Blocks Id System
/dev/sdb1 1 26 204799+ 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2 * 26 60802 488179650 7 HPFS/NTFS
Partition 2 does not end on cylinder boundary.
Disk /dev/dm-0: 494.3 GB, 494307115008 bytes
255 heads, 63 sectors/track, 60096 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1: 5586 MB, 5586812928 bytes
255 heads, 63 sectors/track, 679 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-1 doesn't contain a valid partition table
Disk /dev/sdc: 1812.1 GB, 1812124903424 bytes
255 heads, 63 sectors/track, 220311 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5044b1a4
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 121601 976760001 7 HPFS/NTFS
[root@shorty droark]#
Eventually I have tried every combination for the disk/partition on the NTFS disk. While the "Windows XP" option always appears in the GRUB options, the option fails each time with something like "disk not found". When that happens, I can still select the Fedora kernel and away we happily go.
Sorry for the bother and thanks for anything.
Dick
You have only 2 partitions on disk containing windows, yet you say:
title Windows XP root (hd1,2) makeactive chainloader +1
Since grub partition numbers start at 0, and windows is on partition 1, your entry root (hd1,2) needs to change to root (hd1,1)
Try it and let us know.
Dick Roark <linuxguy.sg <at> gmail.com> writes:
root (hd1,2) makeactive chainloader +1
Hi, please edit file # vi /etc/grub.conf and make sure that your Windows section reads like
title Windows XP rootnoverify (hd1,1) makeactive chainloader +1
File it and reboot.
For your info: The rootnoverify option tells GRUB to not try to verify the root of the OS. This avoids load errors if the file system is not supported by GRUB. JB
On Saturday, July 17, 2010 10:49:34 am JB did opine:
Dick Roark <linuxguy.sg <at> gmail.com> writes:
root (hd1,2) makeactive chainloader +1
Hi, please edit file # vi /etc/grub.conf and make sure that your Windows section reads like
===================>
title Windows XP rootnoverify (hd1,1) makeactive chainloader +1
===================> Will this same sequence work with a linux install that uses grub 2?
File it and reboot.
For your info: The rootnoverify option tells GRUB to not try to verify the root of the OS. This avoids load errors if the file system is not supported by GRUB. JB
Thanks.
Gene Heskett <gene.heskett <at> gmail.com> writes:
On Saturday, July 17, 2010 10:49:34 am JB did opine:
Dick Roark <linuxguy.sg <at> gmail.com> writes:
root (hd1,2) makeactive chainloader +1
Hi, please edit file # vi /etc/grub.conf and make sure that your Windows section reads like
===================>
title Windows XP rootnoverify (hd1,1) makeactive chainloader +1
===================> Will this same sequence work with a linux install that uses grub 2?
File it and reboot.
For your info: The rootnoverify option tells GRUB to not try to verify the root of the OS. This avoids load errors if the file system is not supported by GRUB. JB
Thanks.
Hi, with grub2 it is a different story.
http://wiki.archlinux.org/index.php/GRUB2 par 1.1 Notes for current GRUB users ... Device naming has changed between GRUB and GRUB2. Partitions are numbered from 1 instead of 0 while drives are still numbered from 0. For example, /dev/sda1 would be referred to as (hd0,1) using GRUB2. ...
http://grub.enbug.org/CommandList Command | GRUB Legacy | GRUB 2 | Comments ... root yes replaced now a variable rootnoverify yes no useless
JB
On Saturday, July 17, 2010 02:25:52 pm JB did opine:
Gene Heskett <gene.heskett <at> gmail.com> writes:
On Saturday, July 17, 2010 10:49:34 am JB did opine:
Dick Roark <linuxguy.sg <at> gmail.com> writes:
root (hd1,2) makeactive chainloader +1
Hi, please edit file
# vi /etc/grub.conf
and make sure that your Windows section reads like
===================>
title Windows XP rootnoverify (hd1,1) makeactive chainloader +1
===================> Will this same sequence work with a linux install that uses grub 2?
File it and reboot.
For your info: The rootnoverify option tells GRUB to not try to verify the root of the OS. This avoids load errors if the file system is not supported by GRUB. JB
Thanks.
Hi, with grub2 it is a different story.
http://wiki.archlinux.org/index.php/GRUB2 par 1.1 Notes for current GRUB users ... Device naming has changed between GRUB and GRUB2. Partitions are numbered from 1 instead of 0 while drives are still numbered from 0. For example, /dev/sda1 would be referred to as (hd0,1) using GRUB2.
I had already run into that, thanks.
...
http://grub.enbug.org/CommandList Command | GRUB Legacy | GRUB 2 | Comments ... root yes replaced now a variable rootnoverify yes no useless
and ignored I assume. But what then causes the grub2 stuff to be loaded from /dev/sdX's MBR and a restart then done using grub2's menu's? The "chainloader + 1" I have previously tried and wasn't able to make it work, with or without spaces surrounding the '+'. Probably a typu on my part, but the docs, what there is, are exceedingly sparse on the rules and syntax to make grub actually do its dance.
JB
Thanks, JB.
Gene Heskett <gene.heskett <at> gmail.com> writes:
===================>
title Windows XP rootnoverify (hd1,1) makeactive chainloader +1
===================> Will this same sequence work with a linux install that uses grub 2?
and ignored I assume. But what then causes the grub2 stuff to be loaded from /dev/sdX's MBR and a restart then done using grub2's menu's? The "chainloader + 1" I have previously tried and wasn't able to make it work, with or without spaces surrounding the '+'. Probably a typu on my part, but the docs, what there is, are exceedingly sparse on the rules and syntax to make grub actually do its dance.
See http://grub.enbug.org/CommandList ... chainloader ... ex. of use chainloader (hd0,1)+1 Also, click on chainloader link to see some more explanation.
Grub 2 is still work in progress - e.g. Ubuntu 10.10 utilizes it, but other distros wait. It is just too important a package. JB