Bug#741342: /usr/sbin/update-grub: update-grub writes root=UUID= to grub.cfg for LVM2, renders machine unbootable

Modestas Vainius modestas at inventi.lt
Tue Mar 11 12:43:53 UTC 2014


Package: grub2-common
Version: 2.02~beta2-7
Severity: critical
File: /usr/sbin/update-grub
Justification: breaks the whole system

Hello,

update-grub writes root=UUID=xxxxxx for LVM2 volumes to kernel command line.
This renders the system unbootable since it is not supported as far as I can tell.
Hence, if I replace root=UUID=af89a290-9c6f-4039-8d5c-95aa75654776 with
root=/dev/mapper/mdxinventi-root, the system boots fine.

P.S. It appears that 2.02~beta2-7 has been uploaded to unstable even if
the changelog indicates that it was targeted to experimental.


-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/mapper/mdxinventi-root / ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda1 /boot ext2 rw,relatime 0 0
/dev/mapper/mdxinventi-home /home ext4 rw,relatime,data=ordered 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/disk/by-id/ata-ST9500423AS_5WR0GXYW
*********************** END /boot/grub/device.map

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

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos 
insmod lvm 
insmod ext2
set root='lvmid/nqfp4d-BOkJ-OIVj-Uigv-ysEo-NOTR-8Xy1pJ/0TBnxh-eEPl-YGJO-6Q4E-9MRF-6qic-fIRzyl'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvmid/nqfp4d-BOkJ-OIVj-Uigv-ysEo-NOTR-8Xy1pJ/0TBnxh-eEPl-YGJO-6Q4E-9MRF-6qic-fIRzyl'  af89a290-9c6f-4039-8d5c-95aa75654776
else
  search --no-floppy --fs-uuid --set=root af89a290-9c6f-4039-8d5c-95aa75654776
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=lt_LT
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=-1
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos 
insmod lvm 
insmod ext2
set root='lvmid/nqfp4d-BOkJ-OIVj-Uigv-ysEo-NOTR-8Xy1pJ/0TBnxh-eEPl-YGJO-6Q4E-9MRF-6qic-fIRzyl'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvmid/nqfp4d-BOkJ-OIVj-Uigv-ysEo-NOTR-8Xy1pJ/0TBnxh-eEPl-YGJO-6Q4E-9MRF-6qic-fIRzyl'  af89a290-9c6f-4039-8d5c-95aa75654776
else
  search --no-floppy --fs-uuid --set=root af89a290-9c6f-4039-8d5c-95aa75654776
fi
insmod png
if background_image /usr/share/images/desktop-base/joy-grub.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-af89a290-9c6f-4039-8d5c-95aa75654776' {
	load_video
	insmod gzio
	insmod part_msdos 
	insmod ext2
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  77b9f482-78cc-4625-885e-1d6489b84fc1
	else
	  search --no-floppy --fs-uuid --set=root 77b9f482-78cc-4625-885e-1d6489b84fc1
	fi
	echo	'Loading Linux 3.13-1-amd64 ...'
	linux	/vmlinuz-3.13-1-amd64 root=UUID=af89a290-9c6f-4039-8d5c-95aa75654776 ro  splash quiet
	echo	'Loading initial ramdisk ...'
	initrd	/initrd.img-3.13-1-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-af89a290-9c6f-4039-8d5c-95aa75654776' {
	menuentry 'Debian GNU/Linux, with Linux 3.13-1-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13-1-amd64-advanced-af89a290-9c6f-4039-8d5c-95aa75654776' {
		load_video
		insmod gzio
		insmod part_msdos 
		insmod ext2
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  77b9f482-78cc-4625-885e-1d6489b84fc1
		else
		  search --no-floppy --fs-uuid --set=root 77b9f482-78cc-4625-885e-1d6489b84fc1
		fi
		echo	'Loading Linux 3.13-1-amd64 ...'
		linux	/vmlinuz-3.13-1-amd64 root=UUID=af89a290-9c6f-4039-8d5c-95aa75654776 ro  splash quiet
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-3.13-1-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 3.13-1-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13-1-amd64-recovery-af89a290-9c6f-4039-8d5c-95aa75654776' {
		load_video
		insmod gzio
		insmod part_msdos 
		insmod ext2
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  77b9f482-78cc-4625-885e-1d6489b84fc1
		else
		  search --no-floppy --fs-uuid --set=root 77b9f482-78cc-4625-885e-1d6489b84fc1
		fi
		echo	'Loading Linux 3.13-1-amd64 ...'
		linux	/vmlinuz-3.13-1-amd64 root=UUID=af89a290-9c6f-4039-8d5c-95aa75654776 ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-3.13-1-amd64
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### 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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
*********************** END /boot/grub/grub.cfg

*********************** BEGIN /proc/mdstat
cat: /proc/mdstat: No such file or directory
*********************** END /proc/mdstat

*********************** BEGIN LVM
  --- Volume group ---
  VG Name               mdxinventi
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  8
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               465.52 GiB
  PE Size               4.00 MiB
  Total PE              119173
  Alloc PE / Size       119173 / 465.52 GiB
  Free  PE / Size       0 / 0   
  VG UUID               nqfp4d-BOkJ-OIVj-Uigv-ysEo-NOTR-8Xy1pJ
   
  --- Physical volume ---
  PV Name               /dev/sda5
  VG Name               mdxinventi
  PV Size               465.52 GiB / not usable 2.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              119173
  Free PE               0
  Allocated PE          119173
  PV UUID               oWJG9t-Yq9S-arAg-HgKQ-9kDp-ZnFs-kpGw1J
   
  --- Logical volume ---
  LV Path                /dev/mdxinventi/swap_1
  LV Name                swap_1
  VG Name                mdxinventi
  LV UUID                w3jW9m-dEDf-C6YJ-jkNq-rE5S-U0SS-VXCVYm
  LV Write Access        read/write
  LV Creation host, time , 
  LV Status              available
  # open                 2
  LV Size                7.36 GiB
  Current LE             1885
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1
   
  --- Logical volume ---
  LV Path                /dev/mdxinventi/root
  LV Name                root
  VG Name                mdxinventi
  LV UUID                0TBnxh-eEPl-YGJO-6Q4E-9MRF-6qic-fIRzyl
  LV Write Access        read/write
  LV Creation host, time , 
  LV Status              available
  # open                 1
  LV Size                111.76 GiB
  Current LE             28610
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0
   
  --- Logical volume ---
  LV Path                /dev/mdxinventi/home
  LV Name                home
  VG Name                mdxinventi
  LV UUID                Rjr4al-LkMS-20Pg-nWKB-uyqA-2oJ9-hX4yyA
  LV Write Access        read/write
  LV Creation host, time , 
  LV Status              available
  # open                 1
  LV Size                346.40 GiB
  Current LE             88678
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:2
   
*********************** END LVM

*********************** BEGIN /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root  9 Mar 11 14:13 ata-PLDS_DVD+_-RW_DS-8A5SH_107190183821 -> ../../sr0
lrwxrwxrwx 1 root root  9 Mar 11 14:13 ata-ST9500423AS_5WR0GXYW -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 11 14:13 ata-ST9500423AS_5WR0GXYW-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 11 14:13 ata-ST9500423AS_5WR0GXYW-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 11 14:13 ata-ST9500423AS_5WR0GXYW-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Mar 11 14:14 dm-name-mdxinventi-home -> ../../dm-2
lrwxrwxrwx 1 root root 10 Mar 11 14:13 dm-name-mdxinventi-root -> ../../dm-0
lrwxrwxrwx 1 root root 10 Mar 11 14:13 dm-name-mdxinventi-swap_1 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Mar 11 14:13 dm-uuid-LVM-nqfp4dBOkJOIVjUigvysEoNOTR8Xy1pJ0TBnxheEPlYGJO6Q4E9MRF6qicfIRzyl -> ../../dm-0
lrwxrwxrwx 1 root root 10 Mar 11 14:14 dm-uuid-LVM-nqfp4dBOkJOIVjUigvysEoNOTR8Xy1pJRjr4alLkMS20PgnWKBuyqA2oJ9hX4yyA -> ../../dm-2
lrwxrwxrwx 1 root root 10 Mar 11 14:13 dm-uuid-LVM-nqfp4dBOkJOIVjUigvysEoNOTR8Xy1pJw3jW9mdEDfC6YJjkNqrE5SU0SSVXCVYm -> ../../dm-1
lrwxrwxrwx 1 root root  9 Mar 11 14:13 scsi-SATA_ST9500423AS_5WR0GXYW -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 11 14:13 scsi-SATA_ST9500423AS_5WR0GXYW-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 11 14:13 scsi-SATA_ST9500423AS_5WR0GXYW-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 11 14:13 scsi-SATA_ST9500423AS_5WR0GXYW-part5 -> ../../sda5
lrwxrwxrwx 1 root root  9 Mar 11 14:13 wwn-0x5000c5003d4b424e -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 11 14:13 wwn-0x5000c5003d4b424e-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 11 14:13 wwn-0x5000c5003d4b424e-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 11 14:13 wwn-0x5000c5003d4b424e-part5 -> ../../sda5
*********************** END /dev/disk/by-id

*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Mar 11 14:13 77b9f482-78cc-4625-885e-1d6489b84fc1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 11 14:13 af89a290-9c6f-4039-8d5c-95aa75654776 -> ../../dm-0
lrwxrwxrwx 1 root root 10 Mar 11 14:14 cc470f9c-b18b-4164-b4ab-c5410974b834 -> ../../dm-2
lrwxrwxrwx 1 root root 10 Mar 11 14:13 e8f52047-de95-4636-a242-bb0964db3878 -> ../../dm-1
*********************** END /dev/disk/by-uuid

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (100, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.13-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=lt_LT.UTF-8, LC_CTYPE=lt_LT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages grub2-common depends on:
ii  dpkg                1.17.6
ii  grub-common         2.02~beta2-7
ii  install-info        5.2.0.dfsg.1-2
ii  libc6               2.18-4
ii  libdevmapper1.02.1  2:1.02.83-2
ii  liblzma5            5.1.1alpha+20120614-2

grub2-common recommends no packages.

grub2-common suggests no packages.

-- no debconf information



More information about the Pkg-grub-devel mailing list