#709808 [grub-pc] boot failure after updaing to 2.00-14: error: file not found -> rescue console

Package:
grub-pc
Source:
grub2
Description:
GRand Unified Bootloader, version 2 (PC/BIOS version)
Submitter:
Steiner David
Date:
2013-11-14 12:12:04 UTC
Severity:
important
#709808#5
Date:
2013-05-25 17:26:10 UTC
From:
To:
--- Please enter the report below this line. ---

upgraded all my packages after the freeze and grub doesn't boot anymore.
the error message is "error: file not found" and then it drops into the grub rescue console.

i fixed it by chrooting via a live cd and running "dpkg-reconfigure grub-pc"
(telling it to install to /dev/sda and /dev/sdb). works fine since then.

my hard drives are setup like this:
/dev/sda1 and /dev/sdb1 -> 500 MB /boot partition with software RAID1
/dev/sda5 and /dev/sdb5 -> root partition with software RAID1

further / has luks encryption and after that LVM with one PV for / (all setup with the debian installer)

let me know if you need more info. here's what i found from the log files before upgrading grub:
----------------------- /var/log/messages: May 23 19:37:57 dsteiner3 os-prober: debug: /dev/sda1: part of software raid array May 23 19:37:57 dsteiner3 os-prober: debug: running /usr/lib/os-probes/50mounted-tests on /dev/sda2 May 23 19:37:57 dsteiner3 50mounted-tests: debug: /dev/sda2 type not recognised; skipping May 23 19:37:57 dsteiner3 os-prober: debug: os detected by /usr/lib/os-probes/50mounted-tests May 23 19:37:57 dsteiner3 os-prober: debug: /dev/sda5: part of software raid array May 23 19:37:57 dsteiner3 os-prober: debug: /dev/sdb1: part of software raid array May 23 19:37:57 dsteiner3 os-prober: debug: running /usr/lib/os-probes/50mounted-tests on /dev/sdb2 May 23 19:37:57 dsteiner3 50mounted-tests: debug: /dev/sdb2 type not recognised; skipping May 23 19:37:57 dsteiner3 os-prober: debug: os detected by /usr/lib/os-probes/50mounted-tests May 23 19:37:57 dsteiner3 os-prober: debug: /dev/sdb5: part of software raid array May 23 19:40:07 dsteiner3 shutdown[29838]: shutting down for system reboot
----------------------- /var/log/apt/term.log: Preparing to replace grub-pc 1.99-27.1 (using .../grub-pc_2.00-14_amd64.deb) ... Unpacking replacement grub-pc ... Preparing to replace grub-pc-bin 1.99-27.1 (using .../grub-pc-bin_2.00-14_amd64.deb) ... Unpacking replacement grub-pc-bin ... Preparing to replace grub2-common 1.99-27.1 (using .../grub2-common_2.00-14_amd64.deb) ... Unpacking replacement grub2-common ... Preparing to replace grub-common 1.99-27.1 (using .../grub-common_2.00-14_amd64.deb) ... Unpacking replacement grub-common ... [...] Setting up linux-image-3.8-2-amd64 (3.8.13-1) ... Running depmod. Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/dkms 3.8-2-amd64 /boot/vmlinuz-3.8-2-amd64 run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.8-2-amd64 /boot/vmlinuz-3.8-2-amd64 update-initramfs: Generating /boot/initrd.img-3.8-2-amd64 run-parts: executing /etc/kernel/postinst.d/pm-utils 3.8-2-amd64 /boot/vmlinuz-3.8-2-amd64 run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.8-2-amd64 /boot/vmlinuz-3.8-2-amd64 GRUB >= 2.00 has been unpacked but not yet configured. grub-mkconfig will not work until the upgrade is complete. It should run later as part of configuring the new GRUB packages. [...] Setting up grub-common (2.00-14) ... Installing new version of config file /etc/grub.d/05_debian_theme ... Installing new version of config file /etc/grub.d/00_header ... Installing new version of config file /etc/grub.d/10_linux ... Installing new version of config file /etc/grub.d/20_linux_xen ... Installing new version of config file /etc/grub.d/30_os-prober ... Installing new version of config file /etc/grub.d/41_custom ... Setting up grub2-common (2.00-14) ... Setting up grub-pc-bin (2.00-14) ... Setting up grub-pc (2.00-14) ... Installing new version of config file /etc/kernel/postinst.d/zz-update-grub ... Installing new version of config file /etc/kernel/postrm.d/zz-update-grub ... Undefined subroutine &conffile::abs_path called at /usr/bin/ucfq line 529, <HASH> line 8. Installation finished. No error reported. Generating grub.cfg ... Found background image: .background_cache.png Found linux image: /boot/vmlinuz-3.8-2-amd64 Found initrd image: /boot/initrd.img-3.8-2-amd64 Found linux image: /boot/vmlinuz-3.2.0-4-amd64 Found initrd image: /boot/initrd.img-3.2.0-4-amd64 done
----------------------- Debian Release: jessie/sid 500 unstable ftp.at.debian.org --- Package information. --- Depends (Version) | Installed ============================-+-============ debconf (>= 0.5) | 1.5.50 OR debconf-2.0 | grub-common | 2.00-14 grub2-common (= 2.00-14) | 2.00-14 grub-pc-bin (= 2.00-14) | 2.00-14 ucf | 3.0027 Package's Recommends field is empty. Package's Suggests field is empty.
--- Output from package bug script --- *********************** BEGIN /proc/mounts /dev/mapper/vg-lv / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0 /dev/md0 /boot ext4 rw,relatime,data=ordered 0 0 *********************** END /proc/mounts *********************** BEGIN /boot/grub/device.map (hd0) /dev/disk/by-id/ata-HDS725050KLA360_KRVN04ZAK4XEVF (hd1) /dev/disk/by-id/ata-HDS725050KLA360_KRVN04ZAK4ZA6F *********************** 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 /grubenv ]; then load_env fi set default="0" if [ x"" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi export menuentry_id_option if [ "" ]; then set saved_entry="" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "" ]; then saved_entry="" save_env saved_entry fi } function load_video { if [ x = 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 = xy ] ; then font=unicode else insmod part_msdos insmod part_msdos insmod diskfilter insmod mdraid1x insmod ext2 set root='mduuid/ac19a7f0bc9721663342829824ef5875' if [ x = xy ]; then search --no-floppy --fs-uuid --set=root --hint='mduuid/ac19a7f0bc9721663342829824ef5875' f86ba373-8f36-4d88-afed-5ed72ca1526d else search --no-floppy --fs-uuid --set=root f86ba373-8f36-4d88-afed-5ed72ca1526d fi font="/grub/unicode.pf2" fi if loadfont ; then set gfxmode=auto load_video insmod gfxterm set locale_dir=/locale set lang=en_US insmod gettext fi terminal_output gfxterm set timeout=5 ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/05_debian_theme ### insmod part_msdos insmod part_msdos insmod diskfilter insmod mdraid1x insmod ext2 set root='mduuid/ac19a7f0bc9721663342829824ef5875' if [ x = xy ]; then search --no-floppy --fs-uuid --set=root --hint='mduuid/ac19a7f0bc9721663342829824ef5875' f86ba373-8f36-4d88-afed-5ed72ca1526d else search --no-floppy --fs-uuid --set=root f86ba373-8f36-4d88-afed-5ed72ca1526d fi insmod png if background_image /grub/.background_cache.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 ### menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os 'gnulinux-simple-8dc49f0a-42e7-4752-bff5-76723aca1b2e' { load_video insmod gzio insmod part_msdos insmod part_msdos insmod diskfilter insmod mdraid1x insmod ext2 set root='mduuid/ac19a7f0bc9721663342829824ef5875' if [ x = xy ]; then search --no-floppy --fs-uuid --set=root --hint='mduuid/ac19a7f0bc9721663342829824ef5875' f86ba373-8f36-4d88-afed-5ed72ca1526d else search --no-floppy --fs-uuid --set=root f86ba373-8f36-4d88-afed-5ed72ca1526d fi echo 'Loading Linux 3.8-2-amd64 ...' linux /vmlinuz-3.8-2-amd64 root=/dev/mapper/vg-lv ro quiet echo 'Loading initial ramdisk ...' initrd /initrd.img-3.8-2-amd64 } submenu 'Advanced options for Debian GNU/Linux' 'gnulinux-advanced-8dc49f0a-42e7-4752-bff5-76723aca1b2e' { menuentry 'Debian GNU/Linux, with Linux 3.8-2-amd64' --class debian --class gnu-linux --class gnu --class os 'gnulinux-3.8-2-amd64-advanced-8dc49f0a-42e7-4752-bff5-76723aca1b2e' { load_video insmod gzio insmod part_msdos insmod part_msdos insmod diskfilter insmod mdraid1x insmod ext2 set root='mduuid/ac19a7f0bc9721663342829824ef5875' if [ x = xy ]; then search --no-floppy --fs-uuid --set=root --hint='mduuid/ac19a7f0bc9721663342829824ef5875' f86ba373-8f36-4d88-afed-5ed72ca1526d else search --no-floppy --fs-uuid --set=root f86ba373-8f36-4d88-afed-5ed72ca1526d fi echo 'Loading Linux 3.8-2-amd64 ...' linux /vmlinuz-3.8-2-amd64 root=/dev/mapper/vg-lv ro quiet echo 'Loading initial ramdisk ...' initrd /initrd.img-3.8-2-amd64 } menuentry 'Debian GNU/Linux, with Linux 3.8-2-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os 'gnulinux-3.8-2-amd64-recovery-8dc49f0a-42e7-4752-bff5-76723aca1b2e' { load_video insmod gzio insmod part_msdos insmod part_msdos insmod diskfilter insmod mdraid1x insmod ext2 set root='mduuid/ac19a7f0bc9721663342829824ef5875' if [ x = xy ]; then search --no-floppy --fs-uuid --set=root --hint='mduuid/ac19a7f0bc9721663342829824ef5875' f86ba373-8f36-4d88-afed-5ed72ca1526d else search --no-floppy --fs-uuid --set=root f86ba373-8f36-4d88-afed-5ed72ca1526d fi echo 'Loading Linux 3.8-2-amd64 ...' linux /vmlinuz-3.8-2-amd64 root=/dev/mapper/vg-lv ro single echo 'Loading initial ramdisk ...' initrd /initrd.img-3.8-2-amd64 } menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64' --class debian --class gnu-linux --class gnu --class os 'gnulinux-3.2.0-4-amd64-advanced-8dc49f0a-42e7-4752-bff5-76723aca1b2e' { load_video insmod gzio insmod part_msdos insmod part_msdos insmod diskfilter insmod mdraid1x insmod ext2 set root='mduuid/ac19a7f0bc9721663342829824ef5875' if [ x = xy ]; then search --no-floppy --fs-uuid --set=root --hint='mduuid/ac19a7f0bc9721663342829824ef5875' f86ba373-8f36-4d88-afed-5ed72ca1526d else search --no-floppy --fs-uuid --set=root f86ba373-8f36-4d88-afed-5ed72ca1526d fi echo 'Loading Linux 3.2.0-4-amd64 ...' linux /vmlinuz-3.2.0-4-amd64 root=/dev/mapper/vg-lv ro quiet echo 'Loading initial ramdisk ...' initrd /initrd.img-3.2.0-4-amd64 } menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os 'gnulinux-3.2.0-4-amd64-recovery-8dc49f0a-42e7-4752-bff5-76723aca1b2e' { load_video insmod gzio insmod part_msdos insmod part_msdos insmod diskfilter insmod mdraid1x insmod ext2 set root='mduuid/ac19a7f0bc9721663342829824ef5875' if [ x = xy ]; then search --no-floppy --fs-uuid --set=root --hint='mduuid/ac19a7f0bc9721663342829824ef5875' f86ba373-8f36-4d88-afed-5ed72ca1526d else search --no-floppy --fs-uuid --set=root f86ba373-8f36-4d88-afed-5ed72ca1526d fi echo 'Loading Linux 3.2.0-4-amd64 ...' linux /vmlinuz-3.2.0-4-amd64 root=/dev/mapper/vg-lv ro single echo 'Loading initial ramdisk ...' initrd /initrd.img-3.2.0-4-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 /custom.cfg ]; then source /custom.cfg elif [ -z "" -a -f /custom.cfg ]; then source /custom.cfg; fi ### END /etc/grub.d/41_custom ### *********************** END /boot/grub/grub.cfg *********************** BEGIN /proc/mdstat Personalities : [raid1] md1 : active raid1 sdb5[2] sda5[1] 487753536 blocks super 1.2 [2/2] [UU] md0 : active raid1 sdb1[2] sda1[1] 498368 blocks super 1.2 [2/2] [UU] unused devices: <none> *********************** END /proc/mdstat
#709808#10
Date:
2013-05-28 08:53:18 UTC
From:
To:
Hi,

(not a grub maintainer)

I have the same issue, however it is not just after updating the
latest version, but pretty much every grub update that breaks.

The issue is in either grub failing to install to the MBR on some
drives or grub skipping that step altogether.
I have an 8 disk system, the first one is a HDD for /home, this is the
one my BIOS points to for booting. The second is an SSD with / and
/boot (same partition). the other 6 are HDDs for data and grub is
unable to install the bootloader there (not really an issue since they
aren't used for booting).
I think grub is failing on those 6 drives.
Whenever there is a grub update I need to manually execute
"grub-install /dev/sda /dev/sdd" to make the system bootable.

I forgot that last week and had to use a live image and chroot to fix it.
For some reason my system refuses to boot if I set the SSD as first
boot device in the BIOS, hence the rather unusual setup.
It appears to me that grub will fail to upgrade cleanly as soon as the
device with /boot isn't the primary drive in the system. Which is also
probably the case for your RAID1 setup.

Regards,
Steven

#709808#15
Date:
2013-05-28 09:30:48 UTC
From:
To:
sudo dpkg-reconfigure grub-pc

... and configure it properly.  Presumably you switched disks at some
point in the past and didn't tell the GRUB packaging so that it could
sort this out; in general this does work if done properly.

#709808#20
Date:
2013-05-28 18:45:59 UTC
From:
To:
Thanks, looks good now.
I don't recall ever seeing the screen where it asks for the disks like
that. Maybe a recent introduction? I have been tracking testing/sid
since Squeeze went into freeze, so perhaps I missed it. I never
'switched' disks in this system afaik, only added.... except maybe that
one time were I was kind of forced to replace the motherboard.

#709808#25
Date:
2013-05-28 18:59:29 UTC
From:
To:
It dates back to April 2009.  The installer would have dealt with
configuring it on systems installed afresh with GRUB 2; at least some
changes in hardware will force grub-pc to display it again on upgrade,
but it is probably still possible to confuse it, certainly if the old
disks are still around but no longer used for booting.  Unfortunately
the PC architecture doesn't really make it possible to do a fully
correct job here without constantly nagging people with upgrade prompts.

#709808#30
Date:
2013-11-14 12:09:33 UTC
From:
To:
Since this works after reinstalling GRUB, chances are it's just that
grub-pc's debconf questions were initially configured wrongly so it
didn't reinstall to the right places automatically.  Some investigation
might still be warranted, but I don't think it needs to be
release-critical.