Bug#932127: grub-common: Fails loading snapshot after snapper rollback

Thomas Schneider 74cmonty at gmail.com
Mon Jul 15 15:58:06 BST 2019


Package: grub-common
Version: 2.04-1
Severity: important

-- Detailed issue description
After finalizing Debian installation I installed additional packages to 
make usage of Btrfs' snapshot functionality:
- btrfs-progs
- snapper

Then I started installation of package "reportbug":
apt install reportbug

Snapper automatically created a snapshot pre and post the installation. 
This is exactly what is expected.

Then I initiated rollback of this installation:
snapper rollback 3
(where 3 represents the snapshot ID of the pre snapshot).

This created another 2 snapshots with ID 5 and 6; snapshot 6 becomes the 
new default snapshot then.
To verify the new default snapshot I use this syntax: btrfs su get-default /
and this correctly returns this:
ID 272 gen 3658 top level 261 patch @snapshots/6/snapshot

This is the time to reboot the system.

However, when system is back from reboot the package "reportbug" is 
still installed; I verified this simply by entering this: apt-cache policy r
eportbug

Please check attached screenshots documenting these steps and the 
current Grub menu commands.


-- Workaround
Deleting the string
rootflags=subvol=@
from the linux line in Grub will boot the system and use the 
(previously) defined default snapshot 6.


-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/sda2 / btrfs 
rw,noatime,compress=lzo,space_cache=v2,subvolid=257,subvol=/@ 0 0
/dev/sda2 /var/cache btrfs 
rw,noatime,compress=lzo,space_cache=v2,subvolid=259,subvol=/@cache 0 0
/dev/sda2 /btrfs btrfs 
rw,noatime,compress=lzo,space_cache=v2,subvolid=5,subvol=/ 0 0
/dev/sda2 /tmp btrfs 
rw,noatime,compress=lzo,space_cache=v2,subvolid=260,subvol=/@tmp 0 0
/dev/sda2 /home btrfs 
rw,noatime,compress=lzo,space_cache=v2,subvolid=258,subvol=/@home 0 0
/dev/sda1 /boot/efi vfat 
rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 
0 0
/dev/sda2 /.snapshots btrfs 
rw,noatime,compress=lzo,space_cache=v2,subvolid=261,subvol=/@snapshots 0 0
*********************** END /proc/mounts

*********************** 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_gpt
insmod btrfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
   search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 
--hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 
1c1783ac-b490-4252-aced-b30addce
3607
else
   search --no-floppy --fs-uuid --set=root 
1c1783ac-b490-4252-aced-b30addce3607
fi
     font="/@/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
   set gfxmode=auto
   load_video
   insmod gfxterm
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
   set timeout=30
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 ###
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 ###
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-1c1783ac-b490-4252-ac
ed-b30addce3607' {
         load_video
         insmod gzio
         if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
         insmod part_gpt
         insmod btrfs
         set root='hd0,gpt2'
         if [ x$feature_platform_search_hint = xy ]; then
           search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 
--hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  1c1783ac-b490-4252-aced-
b30addce3607
         else
           search --no-floppy --fs-uuid --set=root 
1c1783ac-b490-4252-aced-b30addce3607
         fi
         echo    'Loading Linux 4.9.0-9-amd64 ...'
         linux   /@/boot/vmlinuz-4.9.0-9-amd64 
root=UUID=1c1783ac-b490-4252-aced-b30addce3607 ro rootflags=subvol=@
         echo    'Loading initial ramdisk ...'
         initrd  /@/boot/initrd.img-4.9.0-9-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 
'gnulinux-advanced-1c1783ac-b490-4252-aced-b30addce3607' {
         menuentry 'Debian GNU/Linux, with Linux 4.9.0-9-amd64' --class 
debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnu
linux-4.9.0-9-amd64-advanced-1c1783ac-b490-4252-aced-b30addce3607' {
                 load_video
                 insmod gzio
                 if [ x$grub_platform = xxen ]; then insmod xzio; insmod 
lzopio; fi
                 insmod part_gpt
                 insmod btrfs
                 set root='hd0,gpt2'
                 if [ x$feature_platform_search_hint = xy ]; then
                   search --no-floppy --fs-uuid --set=root 
--hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  
1c1783ac-b490-42
52-aced-b30addce3607
                 else
                   search --no-floppy --fs-uuid --set=root 
1c1783ac-b490-4252-aced-b30addce3607
                 fi
                 echo    'Loading Linux 4.9.0-9-amd64 ...'
                 linux   /@/boot/vmlinuz-4.9.0-9-amd64 
root=UUID=1c1783ac-b490-4252-aced-b30addce3607 ro rootflags=subvol=@
                 echo    'Loading initial ramdisk ...'
                 initrd  /@/boot/initrd.img-4.9.0-9-amd64
         }
         menuentry 'Debian GNU/Linux, with Linux 4.9.0-9-amd64 (recovery 
mode)' --class debian --class gnu-linux --class gnu --class os $menuentr
y_id_option 
'gnulinux-4.9.0-9-amd64-recovery-1c1783ac-b490-4252-aced-b30addce3607' {
                 load_video
                 insmod gzio
                 if [ x$grub_platform = xxen ]; then insmod xzio; insmod 
lzopio; fi
                 insmod part_gpt
                 insmod btrfs
                 set root='hd0,gpt2'
                 if [ x$feature_platform_search_hint = xy ]; then
                   search --no-floppy --fs-uuid --set=root 
--hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  
1c1783ac-b490-42
52-aced-b30addce3607
                 else
                   search --no-floppy --fs-uuid --set=root 
1c1783ac-b490-4252-aced-b30addce3607
                 fi
                 echo    'Loading Linux 4.9.0-9-amd64 ...'
                 linux   /@/boot/vmlinuz-4.9.0-9-amd64 
root=UUID=1c1783ac-b490-4252-aced-b30addce3607 ro single rootflags=subvol=@
                 echo    'Loading initial ramdisk ...'
                 initrd  /@/boot/initrd.img-4.9.0-9-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 ###
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
         fwsetup
}
### 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 /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root  9 Jul 15 16:21 ata-QEMU_DVD-ROM_QM00003 -> ../../sr0
lrwxrwxrwx 1 root root  9 Jul 15 16:21 
scsi-0QEMU_QEMU_HARDDISK_drive-scsi0 -> ../../sda
lrwxrwxrwx 1 root root 10 Jul 15 16:21 
scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 15 16:21 
scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jul 15 16:21 
scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part3 -> ../../sda3
*********************** END /dev/disk/by-id

*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Jul 15 16:21 
1c1783ac-b490-4252-aced-b30addce3607 -> ../../sda2
lrwxrwxrwx 1 root root  9 Jul 15 16:21 2019-04-14-11-35-22-00 -> ../../sr0
lrwxrwxrwx 1 root root 10 Jul 15 16:21 F124-D7CB -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 15 16:21 
c2dcd19c-2f56-4fff-83d5-b5230d7845ce -> ../../sda3
*********************** END /dev/disk/by-uuid

-- System Information:
Debian Release: 9.9
   APT prefers oldstable-updates
   APT policy: (500, 'oldstable-updates'), (500, 'oldstable'), (100, 
'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-9-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages grub-common depends on:
ii  gettext-base        0.19.8.1-2
ii  libc6               2.28-10
ii  libdevmapper1.02.1  2:1.02.137-2
ii  libefiboot1         37-2
ii  libefivar1          37-2
ii  libfreetype6        2.6.3-3.2
ii  libfuse2            2.9.7-1+deb9u2
ii  liblzma5            5.2.2-1.2+b1

Versions of packages grub-common recommends:
ii  os-prober  1.76~deb9u1

Versions of packages grub-common suggests:
ii  console-setup  1.164
pn  desktop-base   <none>
pn  grub-emu       <none>
pn  multiboot-doc  <none>
pn  xorriso        <none>

-- no debconf information



-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2019-07-15_16-27-02.png
Type: image/png
Size: 68244 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-grub-devel/attachments/20190715/99bade79/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2019-07-15_16-02-49.png
Type: image/png
Size: 163360 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-grub-devel/attachments/20190715/99bade79/attachment-0003.png>


More information about the Pkg-grub-devel mailing list