(another) Grub dual boot question with XP/Redhat
Hopefully not a new one... (searched the lists a lot)
I had a previously installed Windows XP OS on my primary drive. I added a second drive and installed RH8.0 on the second drive, including a /boot partition. I would like to use grub to dual boot the Windows XP/Redhat OSs without installing grub on the MBR of the first drive. My plan is to instruct the BIOS to boot from the second drive (this way, I can keep the first drive "untouched" if I choose). I have installed grub 0.93 on the linux system and did a grub-install to the /boot partition using grub install. When I point the hardware to boot from the second drive, it does so, and grub starts. However, when trying to start RH8.0, it dies with an "unknown partition type 0x7". I had previously tried using grub> root (hd1,0), grub> setup (hd1)... which appear to have success from within RH8.0, but does not execute from the grub command line (I still get the unknown partition type error). Help? |
Can you post your grub.conf file and your partition layout "fdisk -l" and the contents of /etc/fstab
|
In the grub.conf below, I have not included the drive mapping switch proposed when the Windows XP drive is not the primary IDE drive.
1. /boot/grub/grub.conf #boot=/dev/hdb1 default=0 timeout=10 #splashimage=(hd1,0)/grub/splash.xpm.gz title Red Hat Linux (2.4.18-14) root (hd1,0) kernel /vmlinuz-2.4.18-14 ro root=LABEL=/ hdc=ide-scsi initrd /initrd-2.4.18-14.img title DOS rootnoverify (hd0,0) chainloader +1 2. fdisk -l # fdisk -l Disk /dev/hda: 255 heads, 63 sectors, 4865 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 4864 39070048+ 7 HPFS/NTFS Disk /dev/hdb: 255 heads, 63 sectors, 1826 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System /dev/hdb1 * 1 13 104391 83 Linux /dev/hdb2 14 1761 14040810 83 Linux /dev/hdb3 1762 1826 522112+ 82 Linux swap 3. /etc/fstab LABEL=/ / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/hdb3 swap swap defaults 0 0 /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0 /dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 |
Hey, I think I know this one. Bland advice to install new software to the first disk (where whindows sits) has never seemed like a good idea, since windows is working fine.
I also installed grub ( v.9) to the SECOND hd and ran it. The 'unknown partition' message is because it is reading your FIRST hd. Here's the trick -- grub seems to think the disk it is installed on is hd0, so change the entries in grub.conf to reflect this; the 'splash' and 'root' commands should refer to (hd0,0). I deleted the entries to DOS, but changing them to (hd1,0) might work ( I use the bios to select systems). |
Sweet. The grub.conf listed below works. However, I would be interested in hearing comments whether I've done the Windows XP part optimally. Also, indeed this is the best way to do dual boot (if your bios handles pointing at boot devices)... you can retain a perfectly good windows XP installation and boot disk, without the invasiveness of a boot loader (e.g., I can yank the Linux drive and can boot merrily into Windows XP, and vise versa).
#boot=/dev/hdb1 default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz title Windows XP map (hd0) (hd1) map (hd1) (hd0) rootnoverify (hd0,0) root (hd1,0) makeactive chainloader +1 title Red Hat Linux (2.4.18-14) root (hd0,0) kernel /vmlinuz-2.4.18-14 ro root=LABEL=/ hdc=ide-scsi initrd /initrd-2.4.18-14.img |
That is the accepted approach. It is all about personal preference, and the desire not to mess around with something that works (if you can say windows *works*). However, I will mess around with working things if I have the time, am curious and the process is not mission critical...
|
What is Grub? How do you get to it?
I have a problem in that I installed Redhat 5 on a second hardrive after having xp on the first hard drive. Now i can only boot to Redhat and that is very slow. I see reference to Grub as part of the solution. What is Grub and how do use it to solve the problem?
|
All times are GMT -5. The time now is 06:56 PM. |