timrichardson
June 10th, 2008, 01:30 PM
I have two hard drives, a SATA drive, and a SATA II drive.
Unfortunately, my BIOS is not consistent about enumerating them.
So sometimes the SATA II drive is hd0 in grub, and sometimes it is hd1.
This is also the same as saying that sometimes the SATA II drive is /dev/sda and sometimes it is /dev/sdb
My fstab uses UUID to mount partitions, so if grub got so far as loading the initramfs and mounting /, it wouldn't matter so much that the drive naming is inconsistent.
But grub fails when it can't find the linux /boot partition on hd0 because it is now on hd1.
Note that grub always starts, so the bios always finds the MBR boot loader.
If I could instruct grub to use UUID, then the problem would be solved.
But I don't know how to do that. Or if I could do something conditional in grub so that it could choose to remap the drives based on when the BIOS decides to make my SATA II drive hd1 instead of hd0.
Does anyone have any ideas on what I can do?
Unfortunately, my BIOS is not consistent about enumerating them.
So sometimes the SATA II drive is hd0 in grub, and sometimes it is hd1.
This is also the same as saying that sometimes the SATA II drive is /dev/sda and sometimes it is /dev/sdb
My fstab uses UUID to mount partitions, so if grub got so far as loading the initramfs and mounting /, it wouldn't matter so much that the drive naming is inconsistent.
But grub fails when it can't find the linux /boot partition on hd0 because it is now on hd1.
Note that grub always starts, so the bios always finds the MBR boot loader.
If I could instruct grub to use UUID, then the problem would be solved.
But I don't know how to do that. Or if I could do something conditional in grub so that it could choose to remap the drives based on when the BIOS decides to make my SATA II drive hd1 instead of hd0.
Does anyone have any ideas on what I can do?