Bug#683937: grub-pc: install scripts should back up the MBR

Andrew Pimlott andrew at pimlott.net
Sun Aug 5 15:48:06 UTC 2012


Package: grub-pc
Version: 1.99-22.1
Severity: wishlist

Dear Maintainer,

When the grub-pc scripts install grub, they do not back up what was in
the MBR.  Even if grub itself is reliable, the user may want to go back
to the old MBR.  For example, I found after installing grub on my
Thinkpad X220 that pressing the "ThinkVantage" key during boot no longer
worked, because this functionality was in the original MBR.

Backing up the MBR should be cheap so there's really no reason not to do
it.  (Same applies to installing grub to a partition.)

Andrew

-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/mapper/main-root / ext4 rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered 0 0
/dev/sda3 /boot ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/disk/by-id/ata-SAMSUNG_MZ7PA128HMCD-010L1_S0MUNEAC122394
*********************** 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
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

set timeout=5
### 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 ###
menuentry 'Debian GNU/Linux, with Linux 3.2.0-3-amd64' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 42ca7814-d762-4c2b-b92e-be29b9523705
	echo	'Loading Linux 3.2.0-3-amd64 ...'
	linux	/vmlinuz-3.2.0-3-amd64 root=/dev/mapper/main-root ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/initrd.img-3.2.0-3-amd64
}
menuentry 'Debian GNU/Linux, with Linux 3.2.0-3-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 42ca7814-d762-4c2b-b92e-be29b9523705
	echo	'Loading Linux 3.2.0-3-amd64 ...'
	linux	/vmlinuz-3.2.0-3-amd64 root=/dev/mapper/main-root ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/initrd.img-3.2.0-3-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 ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
	insmod part_msdos
	insmod ntfs
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 8AE45333E45320AD
	chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sda2)" --class windows --class os {
	insmod part_msdos
	insmod ntfs
	set root='(hd0,msdos2)'
	search --no-floppy --fs-uuid --set=root CEB255D0B255BDA1
	chainloader +1
}
### 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

*********************** 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 Aug  3 15:39 ata-SAMSUNG_MZ7PA128HMCD-010L1_S0MUNEAC122394 -> ../../sda
lrwxrwxrwx 1 root root 10 Aug  3 15:39 ata-SAMSUNG_MZ7PA128HMCD-010L1_S0MUNEAC122394-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Aug  3 15:39 ata-SAMSUNG_MZ7PA128HMCD-010L1_S0MUNEAC122394-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug  3 15:39 ata-SAMSUNG_MZ7PA128HMCD-010L1_S0MUNEAC122394-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Aug  3 15:39 ata-SAMSUNG_MZ7PA128HMCD-010L1_S0MUNEAC122394-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 Aug  3 08:39 dm-name-main-root -> ../../dm-1
lrwxrwxrwx 1 root root 10 Aug  3 08:39 dm-name-main-swap -> ../../dm-2
lrwxrwxrwx 1 root root 10 Aug  3 08:39 dm-name-sda4_crypt -> ../../dm-0
lrwxrwxrwx 1 root root 10 Aug  3 08:39 dm-uuid-CRYPT-LUKS1-eddaa648ac8c4724923e76a5d34c5511-sda4_crypt -> ../../dm-0
lrwxrwxrwx 1 root root 10 Aug  3 08:39 dm-uuid-LVM-lLTNZZzF385yTCiI6aVLoqnO9wXHdIdg10fbGwYOP0GLu9v0IctbpnhyZNPVCBv6 -> ../../dm-2
lrwxrwxrwx 1 root root 10 Aug  3 08:39 dm-uuid-LVM-lLTNZZzF385yTCiI6aVLoqnO9wXHdIdgCWf7JQ8Xlxmd6IDmbjaSToTWN1APH3Cl -> ../../dm-1
lrwxrwxrwx 1 root root  9 Aug  3 15:39 scsi-SATA_SAMSUNG_MZ7PA12S0MUNEAC122394 -> ../../sda
lrwxrwxrwx 1 root root 10 Aug  3 15:39 scsi-SATA_SAMSUNG_MZ7PA12S0MUNEAC122394-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Aug  3 15:39 scsi-SATA_SAMSUNG_MZ7PA12S0MUNEAC122394-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug  3 15:39 scsi-SATA_SAMSUNG_MZ7PA12S0MUNEAC122394-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Aug  3 15:39 scsi-SATA_SAMSUNG_MZ7PA12S0MUNEAC122394-part4 -> ../../sda4
*********************** END /dev/disk/by-id

*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Aug  3 08:39 35bba669-229b-409c-a849-c5fb3d6099d6 -> ../../dm-2
lrwxrwxrwx 1 root root 10 Aug  3 08:39 398bd900-f074-430a-8002-33ab254adaee -> ../../dm-1
lrwxrwxrwx 1 root root 10 Aug  3 15:39 42ca7814-d762-4c2b-b92e-be29b9523705 -> ../../sda3
lrwxrwxrwx 1 root root 10 Aug  3 15:39 8AE45333E45320AD -> ../../sda1
lrwxrwxrwx 1 root root 10 Aug  3 15:39 CEB255D0B255BDA1 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug  3 15:39 eddaa648-ac8c-4724-923e-76a5d34c5511 -> ../../sda4
*********************** END /dev/disk/by-uuid

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages grub-pc depends on:
ii  debconf [debconf-2.0]  1.5.44
ii  grub-common            1.99-22.1
ii  grub-pc-bin            1.99-22.1
ii  grub2-common           1.99-22.1
ii  ucf                    3.0025+nmu3

grub-pc recommends no packages.

grub-pc suggests no packages.

-- debconf information:
  grub-pc/kopt_extracted: false
  grub2/kfreebsd_cmdline:
  grub2/device_map_regenerated:
* grub-pc/install_devices: /dev/disk/by-id/ata-SAMSUNG_MZ7PA128HMCD-010L1_S0MUNEAC122394
  grub-pc/postrm_purge_boot_grub: false
  grub-pc/install_devices_failed_upgrade: true
  grub-pc/disk_description:
* grub2/linux_cmdline:
  grub-pc/install_devices_empty: false
  grub2/kfreebsd_cmdline_default: quiet
  grub-pc/partition_description:
  grub-pc/install_devices_failed: false
  grub-pc/install_devices_disks_changed:
* grub2/linux_cmdline_default: quiet
  grub-pc/chainload_from_menu.lst: true
  grub-pc/mixed_legacy_and_grub2: true



More information about the Pkg-grub-devel mailing list