« Ooh, this is new.. | Main | Starting MySQL with max_allowed_packet size setting »
September 09, 2005
File partition problems with Fedora Core 4 / Windows XP dual-boot installation
I've been having some difficulty getting Grub to see my Windows NTFS partition after I used partition magic to resize it and then DiskDruid as part of the Fedora install.
Grub wasn't seeing the Windows partition.
Disk /dev/sda: 160.0 GB, 160000000000 bytes 255 heads, 63 sectors/track, 19452 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 7 56196 6 FAT16 /dev/sda2 8 9729 78091965 7 HPFS/NTFS /dev/sda3 * 9730 19388 77585917+ 83 Linux /dev/sda4 19389 19452 514080 82 Linux swap / Solaris
This was because the Windows partition (/dev/sda2) was flagged as hidden.
Grub therefore didn't write this into the grub.conf
file on installation
I used parted
to switch the hidden
setting off:
[root@fba-pc04 dev]# parted /dev/sda GNU Parted 1.6.22 Copyright (C) 1998 - 2005 Free Software Foundation, Inc. This program is free software, covered by the GNU General Public License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Using /dev/sda (parted) print Disk geometry for /dev/sda: 0.000-152587.890 megabytes Disk label type: msdos Minor Start End Type Filesystem Flags 1 0.031 54.909 primary fat16 2 54.910 76316.594 primary ntfs hidden 3 76316.594 152084.091 primary ext3 boot 4 152084.092 152586.123 primary linux-swap (parted) set 2 hidden off (parted) print Disk geometry for /dev/sda: 0.000-152587.890 megabytes Disk label type: msdos Minor Start End Type Filesystem Flags 1 0.031 54.909 primary fat16 2 54.910 76316.594 primary ntfs 3 76316.594 152084.091 primary ext3 boot 4 152084.092 152586.123 primary linux-swap (parted)
I then changed the /boot/grub/grub.conf
file as follows and it all now works:
# grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You do not have a /boot partition. This means that # all kernel and initrd paths are relative to /, eg. # root (hd0,2) # kernel /boot/vmlinuz-version ro root=/dev/sda3 # initrd /boot/initrd-version.img #boot=/dev/sda3 default=0 timeout=20 splashimage=(hd0,2)/boot/grub/splash.xpm.gz hiddenmenu title Fedora Core (2.6.11-1.1369_FC4smp) root (hd0,2) kernel /boot/vmlinuz-2.6.11-1.1369_FC4smp ro root=LABEL=LINUX rhgb quiet initrd /boot/initrd-2.6.11-1.1369_FC4smp.img title Fedora Core-up (2.6.11-1.1369_FC4) root (hd0,2) kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=LINUX rhgb quiet initrd /boot/initrd-2.6.11-1.1369_FC4.img title Windows XP map (hd0,0) (hd0,1) map (hd0,1) (hd0,0) rootnoverify (hd0,1) chainloader +1
This was quite useful for explaining the syntax in the grub.conf
file:
- http://www.tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/proc.html#AEN54
Tags: Linux
Posted by pj at September 9, 2005 11:33 AM