Bug#554790: use /dev/disk/by-uuid (or similiar) for grub-pc/install_devices

Harald Braumann harry at unheit.net
Wed Dec 30 14:39:26 UTC 2009


Package: grub-pc
Version: 1.98~20091229-1
Severity: normal

Got me too. Updating grub left my system unbootable, again.

In my case the BIOS shuffeled the HDDs around when I changed some setting.
It will affect a lot of people when the kernel changes to use libata and 
all disks are renamed from /dev/hdN to /dev/sdN.

Please note that this can also destroy your data, if you don't have a 
partition table on the disk (which reserves some space for the MBR). E.g.,
if you use the whole disk as a physical volume for LVM and grub writes on it
the LVM metadata and probably some user data too will be lost.

So this bug better be fixed soon. If it can't be fixed easily, I'd suggest,
as a work-around, to not remember the install device but instead ask each 
time grub is updated.

Cheers,
harry

-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/mapper/vgsys-lvroot64 / ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda2 /boot ext2 rw,relatime,errors=continue 0 0
/dev/mapper/vgsys-lvvar64 /var ext3 rw,relatime,errors=continue,data=ordered 0 0
/dev/mapper/vgsys-lvhome /home ext3 rw,relatime,errors=continue,data=ordered 0 0
/dev/mapper/vgsys-lvkvm /var/local/vm ext4 rw,relatime,barrier=1,data=ordered 0 0
/dev/mapper/vgsys-lvbackup /var/local/backup ext3 rw,nosuid,nodev,noexec,relatime,errors=continue,data=ordered 0 0
/dev/mapper/vg_data02-data /var/local/data ext3 rw,nosuid,nodev,noexec,relatime,errors=continue,data=ordered 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(fd0)	/dev/fd0
(hd0)	/dev/sda
(hd1)	/dev/sdb
(hd2)	/dev/sdc
(hd3)	/dev/sdd
*********************** END /boot/grub/device.map

*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set ab670ec5-78bb-4d73-bf14-96642f721ec9
if loadfont /grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
set locale_dir=/boot/grub/locale
set lang=
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, with Linux 2.6.32.2-athlon64" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set ab670ec5-78bb-4d73-bf14-96642f721ec9
	linux	//vmlinuz-2.6.32.2-athlon64 root=/dev/mapper/vgsys-lvroot64 ro  
	initrd	//initrd.img-2.6.32.2-athlon64
}
menuentry "Debian GNU/Linux, with Linux 2.6.32.2-athlon64 (recovery mode)" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set ab670ec5-78bb-4d73-bf14-96642f721ec9
	linux	//vmlinuz-2.6.32.2-athlon64 root=/dev/mapper/vgsys-lvroot64 ro single 
	initrd	//initrd.img-2.6.32.2-athlon64
}
menuentry "Debian GNU/Linux, with Linux 2.6.32-amd64" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set ab670ec5-78bb-4d73-bf14-96642f721ec9
	linux	//vmlinuz-2.6.32-amd64 root=/dev/mapper/vgsys-lvroot64 ro  
	initrd	//initrd.img-2.6.32-amd64
}
menuentry "Debian GNU/Linux, with Linux 2.6.32-amd64 (recovery mode)" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set ab670ec5-78bb-4d73-bf14-96642f721ec9
	linux	//vmlinuz-2.6.32-amd64 root=/dev/mapper/vgsys-lvroot64 ro single 
	initrd	//initrd.img-2.6.32-amd64
}
menuentry "Debian GNU/Linux, with Linux 2.6.31.4-amd64" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set ab670ec5-78bb-4d73-bf14-96642f721ec9
	linux	//vmlinuz-2.6.31.4-amd64 root=/dev/mapper/vgsys-lvroot64 ro  
	initrd	//initrd.img-2.6.31.4-amd64
}
menuentry "Debian GNU/Linux, with Linux 2.6.31.4-amd64 (recovery mode)" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set ab670ec5-78bb-4d73-bf14-96642f721ec9
	linux	//vmlinuz-2.6.31.4-amd64 root=/dev/mapper/vgsys-lvroot64 ro single 
	initrd	//initrd.img-2.6.31.4-amd64
}
menuentry "Debian GNU/Linux, with Linux 2.6.30-2-amd64" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set ab670ec5-78bb-4d73-bf14-96642f721ec9
	linux	//vmlinuz-2.6.30-2-amd64 root=/dev/mapper/vgsys-lvroot64 ro  
	initrd	//initrd.img-2.6.30-2-amd64
}
menuentry "Debian GNU/Linux, with Linux 2.6.30-2-amd64 (recovery mode)" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set ab670ec5-78bb-4d73-bf14-96642f721ec9
	linux	//vmlinuz-2.6.30-2-amd64 root=/dev/mapper/vgsys-lvroot64 ro single 
	initrd	//initrd.img-2.6.30-2-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set ab670ec5-78bb-4d73-bf14-96642f721ec9
	linux16	/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set ab670ec5-78bb-4d73-bf14-96642f721ec9
	linux16	/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows NT/2000/XP (loader) (on /dev/sda1)" {
	insmod ntfs
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 6660dcb160dc8967
	drivemap -s (hd0) ${root}
	chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
*********************** END /boot/grub/grub.cfg

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32.2-athlon64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=de_AT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages grub-pc depends on:
ii  debconf [debconf-2.0]    1.5.28          Debian configuration management sy
ii  grub-common              1.98~20091229-1 GRand Unified Bootloader, version 
ii  libc6                    2.10.2-2        GNU C Library: Shared libraries
ii  ucf                      3.0025          Update Configuration File: preserv

grub-pc recommends no packages.

Versions of packages grub-pc suggests:
pn  desktop-base                  <none>     (no description available)

-- debconf information excluded





More information about the Pkg-grub-devel mailing list