Bug#928911: grub-efi-amd64: destroys EFI partition despite being told not to
Adam Borowski
kilobyte at angband.pl
Sun May 12 23:10:07 BST 2019
Package: grub-efi-amd64
Version: 2.02+dfsg1-18
Severity: important
Hi!
Just did a d-i bare-metal test run; installing to another disk, with the
obvious requirement of not damaging the primary system. Thus, I explicitly
marked all relevant partitions (EFI, sys, and swap) as "do not use".
Yet the newly installed system overwrote the ESP anyway. It also did so in
a way that neither the old nor new system could be booted (no entries for
any of the existing two systems were created, and I did not succeed booting
manually).
Disks present in the system:
* NVME-SSD:
[all "do not use"] ESP (fat), sys (btrfs), swap
* 4x NVME-Optane:
MD RAID0 <- new system (d-i test) was installed here
* HDD:
* another old system (ext4) -- x32, BIOS-boot
* boot partition for the d-i test run
* data partition (btrfs)
It can be argued that the setup above may be a bit overcomplicated (thus
the installer being confused might be understandable).
But I insist that disregarding the explicit "do not use" and scribbling
over anyway is a severe bug.
-- Package-specific info:
*********************** BEGIN /proc/mounts
/dev/nvme0n1p2 / btrfs rw,noatime,ssd,space_cache,subvolid=259,subvol=/sys 0 0
/dev/nvme0n1p2 /var/cache btrfs rw,noatime,ssd,space_cache,subvolid=393,subvol=/sys-cache 0 0
/dev/nvme0n1p2 /mnt/btr1 btrfs rw,noatime,ssd,space_cache,subvolid=5,subvol=/ 0 0
/dev/nvme0n1p2 /home btrfs rw,noatime,ssd,space_cache,subvolid=261,subvol=/home 0 0
/dev/nvme0n1p2 /home/kilobyte/@ btrfs rw,noatime,ssd,space_cache,subvolid=365,subvol=/kb-@ 0 0
/dev/nvme0n1p2 /home/kilobyte/tmp btrfs rw,noatime,ssd,space_cache,subvolid=364,subvol=/kb-tmp 0 0
/dev/nvme0n1p2 /home/kilobyte/.cache btrfs rw,noatime,ssd,space_cache,subvolid=394,subvol=/kb-cache 0 0
/dev/nvme0n1p2 /home/kilobyte/mp3 btrfs rw,noatime,ssd,space_cache,subvolid=329,subvol=/mp3 0 0
/dev/nvme0n1p1 /boot/efi vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/pmem0 /mnt/pmem ext4 rw,relatime,block_validity,delalloc,nojournal_checksum,barrier,dax,user_xattr,acl 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
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4cf50beb-18f7-4bdf-9f33-362ba9c30c15
else
search --no-floppy --fs-uuid --set=root 4cf50beb-18f7-4bdf-9f33-362ba9c30c15
fi
font="/sys/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=C
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 ###
insmod part_gpt
insmod btrfs
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4cf50beb-18f7-4bdf-9f33-362ba9c30c15
else
search --no-floppy --fs-uuid --set=root 4cf50beb-18f7-4bdf-9f33-362ba9c30c15
fi
insmod png
if background_image /sys/usr/share/desktop-base/futureprototype-theme/grub/grub-16x9.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-4cf50beb-18f7-4bdf-9f33-362ba9c30c15' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod btrfs
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4cf50beb-18f7-4bdf-9f33-362ba9c30c15
else
search --no-floppy --fs-uuid --set=root 4cf50beb-18f7-4bdf-9f33-362ba9c30c15
fi
echo 'Loading Linux 5.1.0-00033-g843b9e87324b ...'
linux /sys/boot/vmlinuz-5.1.0-00033-g843b9e87324b root=UUID=4cf50beb-18f7-4bdf-9f33-362ba9c30c15 ro rootflags=subvol=sys net.ifnames=0 rootflags=subvol=sys memmap=1G!15G
echo 'Loading initial ramdisk ...'
initrd /sys/boot/initrd.img-5.1.0-00033-g843b9e87324b
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-4cf50beb-18f7-4bdf-9f33-362ba9c30c15' {
menuentry 'Debian GNU/Linux, with Linux 5.1.0-00033-g843b9e87324b' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.1.0-00033-g843b9e87324b-advanced-4cf50beb-18f7-4bdf-9f33-362ba9c30c15' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod btrfs
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4cf50beb-18f7-4bdf-9f33-362ba9c30c15
else
search --no-floppy --fs-uuid --set=root 4cf50beb-18f7-4bdf-9f33-362ba9c30c15
fi
echo 'Loading Linux 5.1.0-00033-g843b9e87324b ...'
linux /sys/boot/vmlinuz-5.1.0-00033-g843b9e87324b root=UUID=4cf50beb-18f7-4bdf-9f33-362ba9c30c15 ro rootflags=subvol=sys net.ifnames=0 rootflags=subvol=sys memmap=1G!15G
echo 'Loading initial ramdisk ...'
initrd /sys/boot/initrd.img-5.1.0-00033-g843b9e87324b
}
menuentry 'Debian GNU/Linux, with Linux 5.1.0-00033-g843b9e87324b (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.1.0-00033-g843b9e87324b-recovery-4cf50beb-18f7-4bdf-9f33-362ba9c30c15' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod btrfs
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4cf50beb-18f7-4bdf-9f33-362ba9c30c15
else
search --no-floppy --fs-uuid --set=root 4cf50beb-18f7-4bdf-9f33-362ba9c30c15
fi
echo 'Loading Linux 5.1.0-00033-g843b9e87324b ...'
linux /sys/boot/vmlinuz-5.1.0-00033-g843b9e87324b root=UUID=4cf50beb-18f7-4bdf-9f33-362ba9c30c15 ro single rootflags=subvol=sys net.ifnames=0 rootflags=subvol=sys memmap=1G!15G
echo 'Loading initial ramdisk ...'
initrd /sys/boot/initrd.img-5.1.0-00033-g843b9e87324b
}
}
### 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 ###
menuentry 'Debian GNU/Linux buster/sid (on /dev/sda2)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-5be33b20-9592-4ead-b7e5-8d2fafe6c68a' {
insmod part_gpt
insmod ext2
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 5be33b20-9592-4ead-b7e5-8d2fafe6c68a
else
search --no-floppy --fs-uuid --set=root 5be33b20-9592-4ead-b7e5-8d2fafe6c68a
fi
linux /boot/vmlinuz-4.19.0-4-amd64 root=UUID=5be33b20-9592-4ead-b7e5-8d2fafe6c68a ro syscall.x32=y ifnames=0 apparmor=0 syscall.x32=y ifnames=0 apparmor=0 quiet
initrd /boot/initrd.img-4.19.0-4-amd64
}
submenu 'Advanced options for Debian GNU/Linux buster/sid (on /dev/sda2)' $menuentry_id_option 'osprober-gnulinux-advanced-5be33b20-9592-4ead-b7e5-8d2fafe6c68a' {
menuentry 'Debian GNU/Linux (on /dev/sda2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.19.0-4-amd64--5be33b20-9592-4ead-b7e5-8d2fafe6c68a' {
insmod part_gpt
insmod ext2
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 5be33b20-9592-4ead-b7e5-8d2fafe6c68a
else
search --no-floppy --fs-uuid --set=root 5be33b20-9592-4ead-b7e5-8d2fafe6c68a
fi
linux /boot/vmlinuz-4.19.0-4-amd64 root=UUID=5be33b20-9592-4ead-b7e5-8d2fafe6c68a ro syscall.x32=y ifnames=0 apparmor=0 syscall.x32=y ifnames=0 apparmor=0 quiet
initrd /boot/initrd.img-4.19.0-4-amd64
}
menuentry 'Debian GNU/Linux, with Linux 4.19.0-4-amd64 (on /dev/sda2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.19.0-4-amd64--5be33b20-9592-4ead-b7e5-8d2fafe6c68a' {
insmod part_gpt
insmod ext2
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 5be33b20-9592-4ead-b7e5-8d2fafe6c68a
else
search --no-floppy --fs-uuid --set=root 5be33b20-9592-4ead-b7e5-8d2fafe6c68a
fi
linux /boot/vmlinuz-4.19.0-4-amd64 root=UUID=5be33b20-9592-4ead-b7e5-8d2fafe6c68a ro syscall.x32=y ifnames=0 apparmor=0 syscall.x32=y ifnames=0 apparmor=0 quiet
initrd /boot/initrd.img-4.19.0-4-amd64
}
menuentry 'Debian GNU/Linux, with Linux 4.19.0-4-amd64 (recovery mode) (on /dev/sda2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.19.0-4-amd64-root=UUID=5be33b20-9592-4ead-b7e5-8d2fafe6c68a ro single syscall.x32=y ifnames=0 apparmor=0-5be33b20-9592-4ead-b7e5-8d2fafe6c68a' {
insmod part_gpt
insmod ext2
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 5be33b20-9592-4ead-b7e5-8d2fafe6c68a
else
search --no-floppy --fs-uuid --set=root 5be33b20-9592-4ead-b7e5-8d2fafe6c68a
fi
linux /boot/vmlinuz-4.19.0-4-amd64 root=UUID=5be33b20-9592-4ead-b7e5-8d2fafe6c68a ro single syscall.x32=y ifnames=0 apparmor=0
initrd /boot/initrd.img-4.19.0-4-amd64
}
}
### 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
Personalities : [raid0] [linear] [multipath] [raid1] [raid6] [raid5] [raid4] [raid10]
md127 : active raid0 nvme4n1p1[1] nvme3n1p1[3] nvme1n1p1[0] nvme2n1p1[2]
56217600 blocks super 1.2 512k chunks
unused devices: <none>
*********************** END /proc/mdstat
*********************** BEGIN /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root 9 May 12 23:37 ata-ST4000DM000-1F2168_Z304K218 -> ../../sda
lrwxrwxrwx 1 root root 10 May 12 23:37 ata-ST4000DM000-1F2168_Z304K218-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 May 12 23:37 ata-ST4000DM000-1F2168_Z304K218-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 May 12 23:37 ata-ST4000DM000-1F2168_Z304K218-part3 -> ../../sda3
lrwxrwxrwx 1 root root 11 May 12 23:30 md-name-altair:0 -> ../../md127
lrwxrwxrwx 1 root root 11 May 12 23:30 md-uuid-3a2b964c:5bdd826a:2a5ed7fc:c6666e84 -> ../../md127
lrwxrwxrwx 1 root root 13 May 12 23:30 nvme-INTEL_MEMPEK1J016GAL_PHBT810101GV016N -> ../../nvme3n1
lrwxrwxrwx 1 root root 15 May 12 23:30 nvme-INTEL_MEMPEK1J016GAL_PHBT810101GV016N-part1 -> ../../nvme3n1p1
lrwxrwxrwx 1 root root 13 May 12 23:30 nvme-INTEL_MEMPEK1J016GAL_PHBT810101N6016N -> ../../nvme1n1
lrwxrwxrwx 1 root root 15 May 12 23:30 nvme-INTEL_MEMPEK1J016GAL_PHBT810101N6016N-part1 -> ../../nvme1n1p1
lrwxrwxrwx 1 root root 13 May 12 23:30 nvme-INTEL_MEMPEK1J016GAL_PHBT810400YV016N -> ../../nvme2n1
lrwxrwxrwx 1 root root 15 May 12 23:30 nvme-INTEL_MEMPEK1J016GAL_PHBT810400YV016N-part1 -> ../../nvme2n1p1
lrwxrwxrwx 1 root root 13 May 12 23:30 nvme-INTEL_MEMPEK1J016GAL_PHBT811203S5016N -> ../../nvme4n1
lrwxrwxrwx 1 root root 15 May 12 23:30 nvme-INTEL_MEMPEK1J016GAL_PHBT811203S5016N-part1 -> ../../nvme4n1p1
lrwxrwxrwx 1 root root 13 May 12 23:30 nvme-INTEL_SSDPEKNW512G8_BTNH83510UF1512A -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 May 12 23:30 nvme-INTEL_SSDPEKNW512G8_BTNH83510UF1512A-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 May 12 23:30 nvme-INTEL_SSDPEKNW512G8_BTNH83510UF1512A-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 May 12 23:30 nvme-INTEL_SSDPEKNW512G8_BTNH83510UF1512A-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 13 May 12 23:30 nvme-eui.0000000001000000e4d25cf823e64f01 -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 May 12 23:30 nvme-eui.0000000001000000e4d25cf823e64f01-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 May 12 23:30 nvme-eui.0000000001000000e4d25cf823e64f01-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 May 12 23:30 nvme-eui.0000000001000000e4d25cf823e64f01-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 13 May 12 23:30 nvme-eui.e4d25c42671f0100 -> ../../nvme3n1
lrwxrwxrwx 1 root root 15 May 12 23:30 nvme-eui.e4d25c42671f0100-part1 -> ../../nvme3n1p1
lrwxrwxrwx 1 root root 13 May 12 23:30 nvme-eui.e4d25c67671f0100 -> ../../nvme1n1
lrwxrwxrwx 1 root root 15 May 12 23:30 nvme-eui.e4d25c67671f0100-part1 -> ../../nvme1n1p1
lrwxrwxrwx 1 root root 13 May 12 23:30 nvme-eui.e4d25c8112200100 -> ../../nvme2n1
lrwxrwxrwx 1 root root 15 May 12 23:30 nvme-eui.e4d25c8112200100-part1 -> ../../nvme2n1p1
lrwxrwxrwx 1 root root 13 May 12 23:30 nvme-eui.e4d25cc91a220100 -> ../../nvme4n1
lrwxrwxrwx 1 root root 15 May 12 23:30 nvme-eui.e4d25cc91a220100-part1 -> ../../nvme4n1p1
lrwxrwxrwx 1 root root 9 May 12 23:37 wwn-0x5000c5007bc50963 -> ../../sda
lrwxrwxrwx 1 root root 10 May 12 23:37 wwn-0x5000c5007bc50963-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 May 12 23:37 wwn-0x5000c5007bc50963-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 May 12 23:37 wwn-0x5000c5007bc50963-part3 -> ../../sda3
*********************** END /dev/disk/by-id
*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 May 12 23:37 396df9d6-149d-4411-8fa2-16cacc2f448b -> ../../sda1
lrwxrwxrwx 1 root root 15 May 12 23:30 4cf50beb-18f7-4bdf-9f33-362ba9c30c15 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 11 May 12 23:30 532a1c27-6666-46c1-a3ab-a409038b338e -> ../../md127
lrwxrwxrwx 1 root root 10 May 12 23:37 5be33b20-9592-4ead-b7e5-8d2fafe6c68a -> ../../sda2
lrwxrwxrwx 1 root root 10 May 12 23:37 945d8817-b0cf-40a2-a22b-94330fdc0586 -> ../../sda3
lrwxrwxrwx 1 root root 15 May 12 23:30 D5DE-9AC8 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 May 12 23:30 b4ace6ce-c275-41a4-9be3-d99dd580a5ec -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 11 May 12 23:30 e3a71a2c-b999-4cf8-98ca-63b82aded2bf -> ../../pmem0
*********************** END /dev/disk/by-uuid
-- System Information:
Debian Release: 10.0
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.1.0-00033-g843b9e87324b (SMP w/64 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages grub-efi-amd64 depends on:
ii debconf [debconf-2.0] 1.5.72
ii grub-common 2.02+dfsg1-18
ii grub-efi-amd64-bin 2.02+dfsg1-18
ii grub2-common 2.02+dfsg1-18
ii ucf 3.0038+nmu1
grub-efi-amd64 recommends no packages.
grub-efi-amd64 suggests no packages.
-- debconf information excluded
More information about the Pkg-grub-devel
mailing list