[gentoo-user] Having trouble installing grub on second disk
Hello, I wonder if some wise person here can give me some suggestion on how to solve this problem. I have Gentoo (2005.0) installed on my master primary device, and I am trying to create a minimal Linux system on a new disk, my slave primary device. So, I partition and make a 32M ext2 file system, make the appropriate directories and devices, install busybox and other odds and ends. Then I copy over the kernel from my Gentoo system (same hardware, so the same kernel). Finally I install grub on the slave primary device, and set up my grub.conf like so: default 0 timeout 10 title=minimal linux on slave primary device root (hd1,0) kernel /boot/vmlinuz root=/dev/hdb1 root (hd1,0) should be the first partition on my slave primary device /boot/vmlinuz is indeed my kernel (I didn't bother with a separate boot partition ) finally root=/dev/hdb1 tells grub that the root is on the first partition of my slave primary device I test by rebooting and entering my bios settings, and then i set the boot device to hd1 instead of hd0. Save and exit, and grub tells me Error 15: File not found. It doesn't tell me which file isn't found, but I've learned that this usually means the kernel. So I double and triple check the spelling and the location. It's right, unless I'm going blind. As an experiment, I added these lines to grub.conf on hda, so that I could use grub on hda but boot from my kernel and root on hdb: title=minimal linux on slave primary device root (hd1,0) kernel /boot/vmlinuz root=/dev/hdb1 this worked, which perhaps suggests that my grub setup on hdb is faulty. So I reinstalled grub on hdb, but it still fails with the same error. Lastly the grub install reported no errors. Any suggestions? Sincerely, Michael Shiloh -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Having trouble installing grub on second disk
[EMAIL PROTECTED] wrote: I test by rebooting and entering my bios settings, and then i set the boot device to hd1 instead of hd0. Save and exit, and grub tells me Error 15: File not found. For grub, the (hd0) and (hd1) devices are the ordered in the same order that the BIOS puts them in, so if you are going to switch them around in the BIOS, you should set the entries in the grub.conf to (hd0,0) instead of (hd1,0). In otherwords, (hd0) is always the disk currently being booted from. You can test this by editing the lines when grub comes up, and change kernel to be: kernel (hd0,0)/boot/vmlinuz root=/dev/hdb1 -Richard -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Having trouble installing grub on second disk
On Tue, 26 Jul 2005 13:12:40 -0700 (PDT), [EMAIL PROTECTED] wrote: I have Gentoo (2005.0) installed on my master primary device, and I am trying to create a minimal Linux system on a new disk, my slave primary device. So, I partition and make a 32M ext2 file system, make the appropriate directories and devices, install busybox and other odds and ends. Then I copy over the kernel from my Gentoo system (same hardware, so the same kernel). Finally I install grub on the slave primary device, and set up my grub.conf like so: default 0 timeout 10 title=minimal linux on slave primary device root (hd1,0) kernel /boot/vmlinuz root=/dev/hdb1 root (hd1,0) should be the first partition on my slave primary device You don't need to install GRUB on the slave drive, just add this to your existing grub.conf. GRUB is able to boot from a different drive. I test by rebooting and entering my bios settings, and then i set the boot device to hd1 instead of hd0. Save and exit, and grub tells me Error 15: File not found. That's because your slave drive is now hd0, the boot drive is considered the first drive. Either fix your config or, and better IMO, keep everything in one grub.conf on the master drive. -- Neil Bothwick Forget the Joneses...I can't keep up with The Simpsons. pgpEKewQRGD5H.pgp Description: PGP signature
Re: [gentoo-user] Having trouble installing grub on second disk
On Tue, 26 Jul 2005, Richard Fish wrote: [EMAIL PROTECTED] wrote: I test by rebooting and entering my bios settings, and then i set the boot device to hd1 instead of hd0. Save and exit, and grub tells me Error 15: File not found. For grub, the (hd0) and (hd1) devices are the ordered in the same order that the BIOS puts them in, so if you are going to switch them around in the BIOS, you should set the entries in the grub.conf to (hd0,0) instead of (hd1,0). In otherwords, (hd0) is always the disk currently being booted from. You can test this by editing the lines when grub comes up, and change kernel to be: kernel (hd0,0)/boot/vmlinuz root=/dev/hdb1 -Richard AHA! That sure sounds like my problem. I'll test this tonight. So the mapping is NOT hard-coded: hd0 = primary master hd1 = primary slave hd2 = secondary master hd3 = secondary slave but rather is the boot order I select? Thank you so much for the rapid reply, Michael -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Having trouble installing grub on second disk
On Tue, 26 Jul 2005, Neil Bothwick wrote: On Tue, 26 Jul 2005 13:12:40 -0700 (PDT), [EMAIL PROTECTED] wrote: I have Gentoo (2005.0) installed on my master primary device, and I am trying to create a minimal Linux system on a new disk, my slave primary device. So, I partition and make a 32M ext2 file system, make the appropriate directories and devices, install busybox and other odds and ends. Then I copy over the kernel from my Gentoo system (same hardware, so the same kernel). Finally I install grub on the slave primary device, and set up my grub.conf like so: default 0 timeout 10 title=minimal linux on slave primary device root (hd1,0) kernel /boot/vmlinuz root=/dev/hdb1 root (hd1,0) should be the first partition on my slave primary device You don't need to install GRUB on the slave drive, just add this to your existing grub.conf. GRUB is able to boot from a different drive. Ah, but eventually the first disk will go away. It's just support while I develop the minimal install. So I do need grub on it. But thanks for responding anyway, I appreciate the help Michael -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Having trouble installing grub on second disk
[EMAIL PROTECTED] wrote: On Tue, 26 Jul 2005, Richard Fish wrote: [EMAIL PROTECTED] wrote: I test by rebooting and entering my bios settings, and then i set the boot device to hd1 instead of hd0. Save and exit, and grub tells me Error 15: File not found. For grub, the (hd0) and (hd1) devices are the ordered in the same order that the BIOS puts them in, so if you are going to switch them around in the BIOS, you should set the entries in the grub.conf to (hd0,0) instead of (hd1,0). In otherwords, (hd0) is always the disk currently being booted from. You can test this by editing the lines when grub comes up, and change kernel to be: kernel (hd0,0)/boot/vmlinuz root=/dev/hdb1 -Richard AHA! That sure sounds like my problem. I'll test this tonight. So the mapping is NOT hard-coded: hd0 = primary master hd1 = primary slave hd2 = secondary master hd3 = secondary slave but rather is the boot order I select? That is true, well, sort of. It is defined as BIOS order, which generally means that the disk being booted from is the first BIOS disk. The other disks could be in the same order that you specified for boot, or in the order they were detected. In case you still have some trouble, one other command that might be useful from the grub prompt is: find /boot/vmlinuz That will cause grub to search all of the primary partitions on all of the disks for the specified file, and output where it is found. -Richard -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Having trouble installing grub on second disk
On Tue, 26 Jul 2005, Richard Fish wrote: [EMAIL PROTECTED] wrote: I test by rebooting and entering my bios settings, and then i set the boot device to hd1 instead of hd0. Save and exit, and grub tells me Error 15: File not found. For grub, the (hd0) and (hd1) devices are the ordered in the same order that the BIOS puts them in, so if you are going to switch them around in the BIOS, you should set the entries in the grub.conf to (hd0,0) instead of (hd1,0). In otherwords, (hd0) is always the disk currently being booted from. You can test this by editing the lines when grub comes up, and change kernel to be: kernel (hd0,0)/boot/vmlinuz root=/dev/hdb1 -Richard I'm glad to report that Richard's suggestion solved my problem. Thanks very much! After a bit of experimentation, this worked: root (hd0,0) kernel /boot/vmlinuz root=/dev/hdb1 init=/bin/sh That's interesting, because the first line refers to the drive (remember, it's my slave primary device, but in my BIOS I have it selected for booting) as hd0, but the second line refers to it as hdb. Yes, I tried hda, and it didn't work. I did a bit of research after our initial email and it seems that grub numbering starts with the BIOS boot device, and then goes up from there, but I couldn't find any clear explanation of what happens with drives that preceeded the boot device. If you have 4 drives and you boot from the second, does grub go back and get the first at the end, or never? A topic for future research. The information I found also suggests that this is somewhat BIOS dependent, so future readers of this thread take note: this may not apply to you. Trial and error may be the only foolproof solution. Thanks again everyone, Michael -- gentoo-user@gentoo.org mailing list