Bug#945289: grub-common: grub-mount stuck on lvm snapshot partition
Bruno Muller
bruno at inertiacreeps.net
Fri Nov 22 15:56:00 GMT 2019
Package: grub-common
Version: 2.04-4
Severity: normal
Dear Maintainer,
I'm doing tests to use LVM snapshots to go back in case of apt dist-upgrade
errors and I'm having a problem when a new kernel version is installed:
I can not remove the snapshot because of a grub-mount.
You can reproduce the problem as follows:
root at sid:~# lvcreate -s -n snap -l 100%FREE /dev/sid-vg/root
Logical volume "snap" created.
root at sid:~# dpkg-reconfigure linux-image-5.3.0-2-amd64
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.3.0-2-amd64
/etc/kernel/postinst.d/zz-update-grub:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.3.0-2-amd64
Found initrd image: /boot/initrd.img-5.3.0-2-amd64
Found linux image: /boot/vmlinuz-4.19.0-6-amd64
Found initrd image: /boot/initrd.img-4.19.0-6-amd64
grub-probe : erreur : système de fichiers inconnu.
/usr/sbin/grub-probe : erreur : système de fichiers inconnu.
Found Debian GNU/Linux bullseye/sid on /dev/mapper/sid--vg-snap
done
root at sid:~# lvremove -f /dev/sid-vg/snap
Logical volume sid-vg/snap in use.
root at sid:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
vda 254:0 0 20G 0 disk
├─vda1 254:1 0 243M 0 part /boot
├─vda2 254:2 0 1K 0 part
└─vda5 254:5 0 19,8G 0 part
├─sid--vg-swap_1 253:1 0 4G 0 lvm [SWAP]
├─sid--vg-root-real 253:2 0 11,8G 0 lvm
│ ├─sid--vg-root 253:0 0 11,8G 0 lvm /
│ └─sid--vg-snap 253:4 0 11,8G 0 lvm
└─sid--vg-snap-cow 253:3 0 4G 0 lvm
└─sid--vg-snap 253:4 0 11,8G 0 lvm
root at sid:~# lsof | grep 253,4
grub-moun 5276 root 3r BLK 253,4 0t37715968 19527 /dev/dm-4
root at sid:~# ps auxww | grep 5276
root 5276 0.0 0.0 11652 1744 ? Ss 16:17 0:00 grub-mount /dev/mapper/sid--vg-snap /var/lib/os-prober/mount
root 5316 0.0 0.0 6084 912 pts/0 S+ 16:19 0:00 grep 5276
root at sid:~# kill 5276
root at sid:~# lvremove -f /dev/sid-vg/snap
Logical volume "snap" successfully removed
Tell me if you need more information or if I can help you.
Thank you
Bruno Muller
-- Package-specific info:
*********************** BEGIN /proc/mounts
/dev/mapper/sid--vg-root / ext4 rw,relatime,errors=remount-ro 0 0
/dev/vda1 /boot ext2 rw,relatime 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_msdos
insmod lvm
insmod ext2
set root='lvmid/zHGMST-NX0C-Z5M1-hGW3-QDh9-Aaz1-ZcD7yn/mMOtdU-ITzf-3BOX-PaEG-R3rv-RHYw-WHNVVu'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/zHGMST-NX0C-Z5M1-hGW3-QDh9-Aaz1-ZcD7yn/mMOtdU-ITzf-3BOX-PaEG-R3rv-RHYw-WHNVVu' e0c2385a-abcd-439f-aecc-ef9ce7285df5
else
search --no-floppy --fs-uuid --set=root e0c2385a-abcd-439f-aecc-ef9ce7285df5
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=fr_FR
insmod gettext
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-e0c2385a-abcd-439f-aecc-ef9ce7285df5' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root e5a6a306-4000-49ac-a70f-639ddb692144
else
search --no-floppy --fs-uuid --set=root e5a6a306-4000-49ac-a70f-639ddb692144
fi
echo 'Loading Linux 5.3.0-2-amd64 ...'
linux /vmlinuz-5.3.0-2-amd64 root=/dev/mapper/sid--vg-root ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-5.3.0-2-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-e0c2385a-abcd-439f-aecc-ef9ce7285df5' {
menuentry 'Debian GNU/Linux, with Linux 5.3.0-2-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.3.0-2-amd64-advanced-e0c2385a-abcd-439f-aecc-ef9ce7285df5' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root e5a6a306-4000-49ac-a70f-639ddb692144
else
search --no-floppy --fs-uuid --set=root e5a6a306-4000-49ac-a70f-639ddb692144
fi
echo 'Loading Linux 5.3.0-2-amd64 ...'
linux /vmlinuz-5.3.0-2-amd64 root=/dev/mapper/sid--vg-root ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-5.3.0-2-amd64
}
menuentry 'Debian GNU/Linux, with Linux 5.3.0-2-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.3.0-2-amd64-recovery-e0c2385a-abcd-439f-aecc-ef9ce7285df5' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root e5a6a306-4000-49ac-a70f-639ddb692144
else
search --no-floppy --fs-uuid --set=root e5a6a306-4000-49ac-a70f-639ddb692144
fi
echo 'Loading Linux 5.3.0-2-amd64 ...'
linux /vmlinuz-5.3.0-2-amd64 root=/dev/mapper/sid--vg-root ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-5.3.0-2-amd64
}
menuentry 'Debian GNU/Linux, with Linux 4.19.0-6-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-6-amd64-advanced-e0c2385a-abcd-439f-aecc-ef9ce7285df5' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root e5a6a306-4000-49ac-a70f-639ddb692144
else
search --no-floppy --fs-uuid --set=root e5a6a306-4000-49ac-a70f-639ddb692144
fi
echo 'Loading Linux 4.19.0-6-amd64 ...'
linux /vmlinuz-4.19.0-6-amd64 root=/dev/mapper/sid--vg-root ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.19.0-6-amd64
}
menuentry 'Debian GNU/Linux, with Linux 4.19.0-6-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-6-amd64-recovery-e0c2385a-abcd-439f-aecc-ef9ce7285df5' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root e5a6a306-4000-49ac-a70f-639ddb692144
else
search --no-floppy --fs-uuid --set=root e5a6a306-4000-49ac-a70f-639ddb692144
fi
echo 'Loading Linux 4.19.0-6-amd64 ...'
linux /vmlinuz-4.19.0-6-amd64 root=/dev/mapper/sid--vg-root ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.19.0-6-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
*********************** END LVM
*********************** BEGIN /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root 9 Nov 22 16:14 ata-QEMU_DVD-ROM_QM00001 -> ../../sr0
lrwxrwxrwx 1 root root 10 Nov 22 16:19 dm-name-sid--vg-root -> ../../dm-0
lrwxrwxrwx 1 root root 10 Nov 22 16:14 dm-name-sid--vg-swap_1 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Nov 22 16:14 dm-uuid-LVM-zHGMSTNX0CZ5M1hGW3QDh9Aaz1ZcD7ynZt1tiMChXcEIYJwYS50lFLvCoT81nnJZ -> ../../dm-1
lrwxrwxrwx 1 root root 10 Nov 22 16:19 dm-uuid-LVM-zHGMSTNX0CZ5M1hGW3QDh9Aaz1ZcD7ynmMOtdUITzf3BOXPaEGR3rvRHYwWHNVVu -> ../../dm-0
lrwxrwxrwx 1 root root 10 Nov 22 16:19 lvm-pv-uuid-Uyunm3-Uj93-Jt0g-a4zU-aDxA-dY2d-zwgXX2 -> ../../vda5
*********************** END /dev/disk/by-id
*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Nov 22 16:14 a7de4e3d-dfb1-415e-8208-2fe76a0a13bd -> ../../dm-1
lrwxrwxrwx 1 root root 10 Nov 22 16:19 e0c2385a-abcd-439f-aecc-ef9ce7285df5 -> ../../dm-0
lrwxrwxrwx 1 root root 10 Nov 22 16:14 e5a6a306-4000-49ac-a70f-639ddb692144 -> ../../vda1
*********************** END /dev/disk/by-uuid
-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.3.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages grub-common depends on:
ii gettext-base 0.19.8.1-10
ii libc6 2.29-3
ii libdevmapper1.02.1 2:1.02.155-3
ii libefiboot1 37-2
ii libefivar1 37-2
ii libfreetype6 2.10.1-2
ii libfuse2 2.9.9-2
ii liblzma5 5.2.4-1+b1
Versions of packages grub-common recommends:
ii os-prober 1.77
Versions of packages grub-common suggests:
ii console-setup 1.194
pn desktop-base <none>
pn grub-emu <none>
pn multiboot-doc <none>
pn xorriso <none>
-- no debconf information
More information about the Pkg-grub-devel
mailing list