Bug#587790: grub-pc: upgrade-from-grub-legacy exits with success (and deletes grub1) even when grub-setup fails
Lionel Elie Mamane
lionel at mamane.lu
Thu Jul 1 16:29:46 UTC 2010
Package: grub-pc
Version: 1.98+20100617-1
Severity: grave
Justification: renders system unbootable
grub-install fails with the following command error message:
/usr/sbin/grub-setup: warn: Your embedding area is unusually small. core.img won't fit in it..
/usr/sbin/grub-setup: error: embedding is not possible, but this is required when the root device is on a RAID array or LVM volume.
Leading me to think it will *not* successfully boot my system. But
upgrade-from-grub-legacy still deleted grub1, it says:
GRUB Legacy has been removed, but its configuration files have been preserved,
since this script cannot determine if they contain valuable information. If
you would like to remove the configuration files as well, use the following
command:
and indeed I don't find the grub1 files in /boot/grub, except for
menu.lst*.
So it has rendered my system unbootable, all because it ignores the
"error" return code of grub-install:
master at capsaicin:~ 0 $ sudo grub-install /dev/sda; echo $?
/usr/sbin/grub-setup: warn: Your embedding area is unusually small. core.img won't fit in it..
/usr/sbin/grub-setup: error: embedding is not possible, but this is required when the root device is on a RAID array or LVM volume.
1
Note that grub does not actually need RAID or LVM support to boot my
system, as the boot partition is on RAID1. My grub1 was configured to
"just" use /dev/sda5 (hd0,4) as root (and I would manually change that to
(hd1,4) in the interactive boot menu if the first disk were to become
defective).
-- Package-specific info:
*********************** BEGIN /proc/mounts
/dev/mapper/diskvg-rootlv / xfs rw,relatime,noquota 0 0
/dev/md0 /boot ext2 rw,sync,nosuid,nodev,noexec,relatime,errors=continue 0 0
/dev/mapper/diskvg-rootlv /var/chroots/sid-i386/home xfs rw,relatime,noquota 0 0
/dev/mapper/diskvg-rootlv /var/chroots/sid-i386/tmp xfs rw,relatime,noquota 0 0
/dev/mapper/diskvg-rootlv /var/chroots/sid-i386/media xfs rw,relatime,noquota 0 0
*********************** END /proc/mounts
*********************** BEGIN /boot/grub/device.map
(hd0) /dev/sda
(hd1) /dev/sdb
(hd2) /dev/sdc
*********************** 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
load_env
fi
set default="0"
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
}
insmod raid
insmod raid5rec
insmod mdraid
insmod lvm
insmod part_msdos
insmod part_msdos
insmod part_msdos
insmod xfs
set root='(diskvg-rootlv)'
search --no-floppy --fs-uuid --set af9ee105-4b60-4c36-865f-619c98222a41
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
fi
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9f92bc65-061b-4c02-9c05-a60bf66ba5e4
set locale_dir=($root)/grub/locale
set lang=fr
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9f92bc65-061b-4c02-9c05-a60bf66ba5e4
insmod png
if background_image /grub/moreblue-orbit-grub.png ; then
set color_normal=black/black
set color_highlight=magenta/black
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, with Linux 2.6.32-5-amd64' --class debian --class gnu-linux --class gnu --class os {
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9f92bc65-061b-4c02-9c05-a60bf66ba5e4
echo 'Loading Linux 2.6.32-5-amd64 ...'
linux /vmlinuz-2.6.32-5-amd64 root=/dev/mapper/diskvg-rootlv ro console=tty0 rootdelay=5 quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.32-5-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9f92bc65-061b-4c02-9c05-a60bf66ba5e4
echo 'Loading Linux 2.6.32-5-amd64 ...'
linux /vmlinuz-2.6.32-5-amd64 root=/dev/mapper/diskvg-rootlv ro single console=tty0 rootdelay=5
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.32-5-amd64
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9f92bc65-061b-4c02-9c05-a60bf66ba5e4
linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9f92bc65-061b-4c02-9c05-a60bf66ba5e4
linux16 /memtest86+.bin console=ttyS0,115200n8
}
menuentry "Memory test (memtest86+, experimental multiboot)" {
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9f92bc65-061b-4c02-9c05-a60bf66ba5e4
multiboot /memtest86+_multiboot.bin
}
menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9f92bc65-061b-4c02-9c05-a60bf66ba5e4
multiboot /memtest86+_multiboot.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### 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 $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
*********************** END /boot/grub/grub.cfg
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_LU.UTF-8, LC_CTYPE=fr_LU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages grub-pc depends on:
ii debconf [debconf-2.0] 1.5.32 Debian configuration management sy
ii grub-common 1.98+20100617-1 GRand Unified Bootloader, version
ii libc6 2.11.2-2 Embedded GNU C Library: Shared lib
ii libdevmapper1.02.1 2:1.02.48-2 The Linux Kernel Device Mapper use
ii ucf 3.0025 Update Configuration File: preserv
grub-pc recommends no packages.
Versions of packages grub-pc suggests:
ii desktop-base 5.0.5 common files for the Debian Deskto
-- debconf information:
grub2/kfreebsd_cmdline:
* grub2/linux_cmdline: console=tty0 rootdelay=5
* grub-pc/chainload_from_menu.lst: true
grub-pc/kopt_extracted: true
grub-pc/postrm_purge_boot_grub: false
grub2/kfreebsd_cmdline_default: quiet
* grub2/linux_cmdline_default: quiet
grub-pc/install_devices_empty: false
* grub-pc/install_devices: /dev/sda, /dev/sdb, /dev/sdc
grub-pc/mixed_legacy_and_grub2: true
-------------- next part --------------
Disk /dev/md1 doesn't contain a valid partition table
Disk /dev/md0 doesn't contain a valid partition table
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/sdb: 73.4 GB, 73407868928 bytes
255 heads, 63 sectors/track, 8924 cylinders, total 143374744 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0007632a
Device Boot Start End Blocks Id System
/dev/sdb4 1 143364059 71682029+ 5 Extended
/dev/sdb5 2 208844 104421+ fd Linux raid autodetect
/dev/sdb6 208846 134962064 67376609+ fd Linux raid autodetect
/dev/sdb7 134962066 143364059 4200997 82 Linux swap / Solaris
Disk /dev/sda: 73.4 GB, 73407868928 bytes
255 heads, 63 sectors/track, 8924 cylinders, total 143374744 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x396f7e48
Device Boot Start End Blocks Id System
/dev/sda4 1 143364059 71682029+ 5 Extended
/dev/sda5 2 208844 104421+ fd Linux raid autodetect
/dev/sda6 208846 134962064 67376609+ fd Linux raid autodetect
/dev/sda7 134962066 143364059 4200997 82 Linux swap / Solaris
Disk /dev/sdc: 73.4 GB, 73407868928 bytes
255 heads, 63 sectors/track, 8924 cylinders, total 143374744 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x16f50b54
Device Boot Start End Blocks Id System
/dev/sdc4 1 143364059 71682029+ 5 Extended
/dev/sdc5 2 208844 104421+ fd Linux raid autodetect
/dev/sdc6 208846 134962064 67376609+ fd Linux raid autodetect
/dev/sdc7 134962066 143364059 4200997 82 Linux swap / Solaris
Disk /dev/md1: 138.0 GB, 137987096576 bytes
2 heads, 4 sectors/track, 33688256 cylinders, total 269506048 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 131072 bytes
Disk identifier: 0x00000000
Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders, total 208640 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7ff33c0d
Disk /dev/dm-0: 138.0 GB, 137984212992 bytes
255 heads, 63 sectors/track, 16775 cylinders, total 269500416 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 131072 bytes
Disk identifier: 0x00000000
More information about the Pkg-grub-devel
mailing list