Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My BIOS has some problems and sometimes boot order of disks changes. I thought that if I insall grub on to the MBR of second data disk, it may boot. First disk(sda) is for boot and operating system, second disk(sdb) is for /var. All partitions are labeled and fsck has labels as partition references.

I have install grub on to MBR of second disk by "grub-install /dev/sdb". It installed succesfully. However when I change the order to second disk to simulate, I got: "Error 15: File not found" on grub stage.

   | root (hd0,0)                                                            |
   | kernel /boot/vmlinuz-3.5.3 ro root=LABEL=/ console=ttyS0,19200n8        |
   | initrd /boot/initrd-3.5.3.img 

If I change grub line "root (hd0,0)" to "root (hd1,0)" it boots correctly. However, this should work without admin intervention.

How can I build such a self working grub boot on case of a disk order change?

share|improve this question

migrated from serverfault.com Nov 26 '12 at 22:42

This question came from our site for professional system and network administrators.

1 Answer 1

up vote 1 down vote accepted

Since you have such a recent kernel, I suppose switching to grub2 should be an option. Then, grub2 can set the "root" based on the result of a search based of file systems uuids or files found in a filesystem. See the GRUB2 search command documentation for details.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.