Bug#585177: grub-common: grub-mkdevicemap print non stable names (/dev/[sh]dX)
Colin Watson
cjwatson at debian.org
Wed Jun 9 21:58:57 UTC 2010
On Wed, Jun 09, 2010 at 10:21:47PM +0200, Vincent Danjean wrote:
> grub-mkdevicemap produce device names such as /dev/hda or /dev/sda.
> However, these names can change over reboots. These device names are used (at
> least) in the /boot/grub/device.map and in the debconf prompt of grub-pc to
> choose disk to install grub into it.
>
> Using these non persistant names leads to grave problems such as, during a
> upgrade of grub-pc, installing (due to grub-pc postint) grub on an external
> hard disk (/dev/sda this time) instead of the 'normal' hard disk.
> If /dev/sda is a usb key without partitions, this can even lead to data loss.
>
> I recently experiment this problem twice: one time with an external disk on
> /dev/sda when upgrading grub-pc, the second time when upgrading grub-pc after a
> reboot to a 'libata' kernel (/dev/hda -> /dev/sdX)
>
> Using /dev/disk/by-id/* when possible would be far better in my opinion.
We're moving towards not having a device.map at all, and this will be
better than fiddling with the device names; there are other problems
that arise from the mere presence or absence of devices there. However,
there are lots of little glitches when trying to do this and we're not
quite there yet. For squeeze, we'll probably have to work around it in
packaging.
There is already a separate grave bug (#554790) which will be fixed by
using /dev/disk/by-id/ in grub-pc/install_devices. Is your bug a
duplicate of that one, or are you going further?
--
Colin Watson [cjwatson at debian.org]
More information about the Pkg-grub-devel
mailing list