I'm looking at a system with Debian/Lenny on a couple of old IDE PATA drives (several RAID-1 partitions including /boot) and a relatively recently added SATA drive. The system works fine but I've been poking around the GRUB setup in anticipation of upgrading the old drives...
If I go straight to the grub command line when the boot menu appears and inspect the drives there (using
grub> root (<TAB>...)
) then I see hd0 and hd1 as the PATAs and hd2 as the SATA.
However, after the system boots up if I do the same thing then I see hd0 is now the SATA and hd1 and hd2 are the PATAs. (Also, the system maps /dev/sda,c,b to SATA,PATA,PATA.)
This makes me a bit nervous about making changes from the grub>
prompt once the machine has booted. So:
Why does the device order seen by grub change between these 2 cases ?
Also:
Correct functioning of some GRUB commands seems to rely on device.map being correct. Currently it contains a single line:
(hd0) /dev/md0
(Which is the RAID1 /boot) but I've no idea where that came from (this system goes back to woody I think)! grub-mkdevicemap
wants to regenerate this as hd[0,1,2]->sd[a,b,c]
(but I haven't let it). update-grub
tells me: warning: grub-probe can't find drive for /dev/sdb1
. Any suggestions as to what a healthy device.map should look like, in light of the changing enumeration order ? (It's unclear to me whether it should contain the pre- or post- boot device enumeration order).