| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 41947 | 2004-01-27 07:44:00 | Booting XP from Grub | agent (30) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 210357 | 2004-01-27 07:44:00 | I've currently got Arch Linux (http://www.archlinux.org) installed on my slave HDD, while XP is installed on the master HDD. Residing in the MBR on what would be hda in Linux is the Windows XP boot loader; and I have Grub installed on the hdb MBR. My current entry in Grub is # (0) Arch Linux title Arch Linux [/boot/vmlinuz] root (hd0,1) kernel (hd0,1)/vmlinuz root=/dev/discs/disc1/part3 ro After reading the Grub documentation, I tested out rootnoverify (hd1) chainloader +1 makeactive boot ...although at first I left out makeactive, presuming that was in case the partition/drive wasn't set as active. Grub wouldn't boot, so I changed that and added the makeactive line (using the e edit command, not changing /boot/grub/menu.lst). After it still didn't work, I rebooted (because it froze when it didn't work), but ran into a kernel error. Partition Magic 8 reported that the partition table was bad, so under Disk Management I deleted the three Linux partitions and reinstalled Arch Linux. What exactly would I need to put into /boot/grub/menu.lst so that it had an entry which loads the MBR off hda (/dev/discs/disc0/disc, although Grub will take it was hd1)? |
agent (30) | ||
| 210358 | 2004-01-27 08:07:00 | I am not a user (yet) of GRUB - I am still using LILO. But a principle here - if you use two boot loaders then the first one must point to the second one. Here you are using the NT boot loader on hda so you must edit boot.ini to be able to use GRUB as the second boot loader. I'm not sure if this will work if you install GRUB to the mbr on hdb. With LILO you usually install to the / partition if you are using the NTLDR. I haven't got a copy on hand of what boot.ini might look like for this situation but for two versions of Windows it might look like: [boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(2)\WINNT [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINNT="Win2k Novell LAN" /fastdetect multi(0)disk(0)rdisk(0)partition(2)\WINNT="Win2k Local" /fastdetect Alternatively you install GRUB to the mbr of hda - this is the way I would do it. |
JohnD (509) | ||
| 210359 | 2004-01-27 08:50:00 | P.S. a good manual for GRUB is found at: www.gnu.org |
JohnD (509) | ||
| 210360 | 2004-01-27 10:23:00 | I can see a few things here: /boot/grub/menu.lst is likely a symlink to /boot/grub/grub.conf They stopped using menu.lst a while back in favor of grub.conf :-) Try: cd /boot/grub && ls -l Should show you what it's symlinked to Second: Read the Gentoo Documentation as I'd mentioned, its pretty good :-) You said you use: rootnoverify (hd1) chainloader +1 makeactive boot My Family's PC has the following entry: # This is not for booting, just dont get any ideas title=Windows XP root (hd0,0) chainloader (hd0,0)+1 Try that one (As a seperate entry just in case), and keep in mind that hd1 is the SECOND HDD that Grub can find. This goes regardless of it being hdb, hdc or hdd... Its just the SECOND HDD it can find. If its your one and only HDD, or the first HDD in the PC, then you want hd0. Im assuming you want it to be hd0 seeing as you wrote hda in there :-) Give it a shot, the worst that can happen is it wont boot... Hope this helps Chill. |
Chilling_Silently (228) | ||
| 210361 | 2004-01-28 02:14:00 | The rootnoverify is a Good Idea, That stops the automatic disk check of the partition. Even though the Linux file system checking is great, it's probably better not to do it to a Microsoft OS. :D | Graham L (2) | ||
| 210362 | 2004-01-28 04:48:00 | I've read the Grub documentation (that's how I fixed the entries so that I could actually boot Arch Linux); it covers Windows NT/95 largely - some DOS too. Couldn't find anything useful in the Gentoo documentation (www.gentoo.org) either - I'm probably not looking in the right place though :D The reason I use rootnoverify (hd1) is because it appears that Grub detects the HDD that Arch Linux is installed on as hd0 - the first one it finds. Therefore I assume it would detect my primary HDD (where XP is installed) as hd1. Do I really need to use makeactive? |
agent (30) | ||
| 210363 | 2004-01-28 05:09:00 | I am far from documentation or a /boot/grub, but I'm wondering about the hd0/hd1 problem. We seem to be in the transition between the "traditional" /dev/hda, /dev/hdb ... and the new /dev/disks/... Have a look at dmesg for what disks are identified as. Didn't the installation recognize that XP was there and give you the oprion of booting to it? Even if it didn't, I suspect there is a GUI Control Centre page to set up booting options. I seem to remember that the "makeactive" is done for MS comaptibility ... but I'm only using grub on one RH8/WinME machinne ... and I haven't had any problems (apart from spelling errors and then a problem with the "LABEL=/" format as the partition identifier). :D |
Graham L (2) | ||
| 210364 | 2004-01-28 05:37:00 | What I posted above was ALL that I've got on the Family's PC and it worked... See: www.gentoo.org |
Chilling_Silently (228) | ||
| 210365 | 2004-01-28 07:44:00 | Considering I just spent a good hour hoping like hell I wouldn't have to reinstall XP; I don't feel like trying out any flashy big-bang stuff in Grub :D I ran through all sorts of different entries in Grub (none worked, though of course they wouldn't if the first one buggered it all up), and eventually ended up using the rescue option from my XP CD a few times - it was for some reason picking up the location of %windir% on E: instead of C:. Now, er... Grub picks up /dev/discs/disc1 as hd0 because it is installed on /dev/discs/disc1/disc (the MBR); whereas in actual fact this is the slave drive, and should (IMO), be recognised as a stock standard hd1. Nevertheless, it then picks up /dev/discs/disc0 as hd1 (I presume, but it's not as if I've had success booting Windows using this grub). The best I got out of all toying around with the entries was a few "Invalid system disk" errors, which do make it sound like something from Windows got loaded, although I never got past this. I also browsed through ntldr using Vim, and came across a section which was complaining about corrupted loading stuff, most likely due to me toying around with partition entries in Grub. If it makes a difference, Arch Linux is using GNU Grub 0.93 (not sure what the latest version is), and I didn't think that /boot/grub/menu.lst was a symbolic link - after which taking a look, no, it isn't, as there is no grub.conf file anywhere in site (didn't look in /boot though; just /boot/grub). I might now try something with rootnoverify (hd1,0). Grub complains about plain old (hd1) being an invalid device for some reason, so I'm not sure how I'll tell it to load the MBR off hd1. I don't know what difference chainloader (hd1,0)+1 makes to chainloader +1 - both end up in errors for me. I'm beginning to wonder if it's makeactive that is creating my problems in terms of screwing up MBRs and partition tables, but it doesn't work whether makeactive is included or not. I should probably try reinstalling Mandrake 9.0, because that automatically inserted a working entry to boot XP, whereas Arch Linux is pretty much DIY-and-screw-things-up-along-the-way (I've already reinstalled it three times over the ~10 days of actually trying it). |
agent (30) | ||
| 210366 | 2004-01-28 08:14:00 | Further update... rootnoverify (hd1,0) chainloader (hd1,0)+1 ...all by itself didn't work (though C_S uses plain old root, I understand). And this time, I decided to see what Grub's auto-completion says. My choices for the main boot device are fd0, hd0, and hd1 (duh), but doing auto-completion on (hd1, gets interesting... the first two partitions, which are NTFS, it says are unknown type (0x72 I think - not sure if that's what it actually displayed afterwards, I should have checked). The next partition is recognised as FAT32 (vfat), which is correct. Doing this on hd0 turns up the right partitions too, as that only has ReiserFS, vfat, and swap space partitions. I'm beginning to wonder, would Grub (v0.93 perhaps?) not work with NTFS 5.1 (XP)? I don't know what NTFS version XP uses by default, but using Partition Magic it to do formats, it seems to like using NTFS 5.0 (Win2K) as the default. I am now seriously considering reinstalling Mandrake to see if it can automatically pick up the right entry for Grub, and can also boot off that. |
agent (30) | ||
| 1 2 | |||||