Bug#651106: grub-pc: Windows XP partition assigned wrong root partition

Chris Carr rantingman at gmail.com
Mon Dec 5 21:31:14 UTC 2011


Package: grub-pc

Version: 1.99-14
Severity: normal

Dear Maintainer,

For some time now - all the updates to the grub-pc package in the last year or
two - my Win XP partition is detected, but it is given the wrong menu entry:

### BEGIN /etc/grub.d/30_otheros ###

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sde1
menuentry "Windows XP Media Center Edition" {
	set root=(hd0,0)
	chainloader +1
}
### END /etc/grub.d/30_otheros ###

... this should be (hd0,1). I can edit grub.cfg manually and it works fine,
but every time the package is updated, grub.cfg is regenerated and it is 
detected incorrectly again.

Happy to provide further info and/or run tests.

Regards,

Chris

-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/disk/by-uuid/bfaa6aff-7b70-43d6-9cf6-93080820dcff / ext3 rw,relatime,errors=remount-ro,commit=5,barrier=1,data=ordered 0 0
*********************** END /proc/mounts

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

insmod part_msdos
insmod ext2
set root='(hd0,msdos4)'
search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos4)'
  search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
  set locale_dir=($root)/boot/grub/locale
  set lang=en_GB
  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 ext2
set root='(hd0,msdos4)'
search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
insmod png
if background_image /usr/share/images/desktop-base/spacefun-grub.png; then
  set color_normal=light-gray/black
  set color_highlight=white/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 3.1.0-1-686-pae' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
	echo	'Loading Linux 3.1.0-1-686-pae ...'
	linux	/boot/vmlinuz-3.1.0-1-686-pae root=UUID=bfaa6aff-7b70-43d6-9cf6-93080820dcff ro  
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.1.0-1-686-pae
}
menuentry 'Debian GNU/Linux, with Linux 3.1.0-1-686-pae (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
	echo	'Loading Linux 3.1.0-1-686-pae ...'
	linux	/boot/vmlinuz-3.1.0-1-686-pae root=UUID=bfaa6aff-7b70-43d6-9cf6-93080820dcff ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.1.0-1-686-pae
}
menuentry 'Debian GNU/Linux, with Linux 3.0.0-1-686-pae' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
	echo	'Loading Linux 3.0.0-1-686-pae ...'
	linux	/boot/vmlinuz-3.0.0-1-686-pae root=UUID=bfaa6aff-7b70-43d6-9cf6-93080820dcff ro  
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.0.0-1-686-pae
}
menuentry 'Debian GNU/Linux, with Linux 3.0.0-1-686-pae (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
	echo	'Loading Linux 3.0.0-1-686-pae ...'
	linux	/boot/vmlinuz-3.0.0-1-686-pae root=UUID=bfaa6aff-7b70-43d6-9cf6-93080820dcff ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.0.0-1-686-pae
}
menuentry 'Debian GNU/Linux, with Linux 2.6.39-2-686-pae' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
	echo	'Loading Linux 2.6.39-2-686-pae ...'
	linux	/boot/vmlinuz-2.6.39-2-686-pae root=UUID=bfaa6aff-7b70-43d6-9cf6-93080820dcff ro  
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.39-2-686-pae
}
menuentry 'Debian GNU/Linux, with Linux 2.6.39-2-686-pae (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
	echo	'Loading Linux 2.6.39-2-686-pae ...'
	linux	/boot/vmlinuz-2.6.39-2-686-pae root=UUID=bfaa6aff-7b70-43d6-9cf6-93080820dcff ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.39-2-686-pae
}
menuentry 'Debian GNU/Linux, with Linux 2.6.38-2-686-bigmem' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
	echo	'Loading Linux 2.6.38-2-686-bigmem ...'
	linux	/boot/vmlinuz-2.6.38-2-686-bigmem root=UUID=bfaa6aff-7b70-43d6-9cf6-93080820dcff ro  
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.38-2-686-bigmem
}
menuentry 'Debian GNU/Linux, with Linux 2.6.38-2-686-bigmem (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
	echo	'Loading Linux 2.6.38-2-686-bigmem ...'
	linux	/boot/vmlinuz-2.6.38-2-686-bigmem root=UUID=bfaa6aff-7b70-43d6-9cf6-93080820dcff ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.38-2-686-bigmem
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686-bigmem' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
	echo	'Loading Linux 2.6.32-5-686-bigmem ...'
	linux	/boot/vmlinuz-2.6.32-5-686-bigmem root=UUID=bfaa6aff-7b70-43d6-9cf6-93080820dcff ro  
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-5-686-bigmem
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686-bigmem (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
	echo	'Loading Linux 2.6.32-5-686-bigmem ...'
	linux	/boot/vmlinuz-2.6.32-5-686-bigmem root=UUID=bfaa6aff-7b70-43d6-9cf6-93080820dcff ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-5-686-bigmem
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
menuentry "Memory test (memtest86+, experimental multiboot)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
	multiboot	/boot/memtest86+_multiboot.bin
}
menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set=root bfaa6aff-7b70-43d6-9cf6-93080820dcff
	multiboot	/boot/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/30_otheros ###

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sde1
menuentry "Windows XP Media Center Edition" {
	set root=(hd0,1)
	chainloader +1
}
### END /etc/grub.d/30_otheros ###

### 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
Personalities : 
unused devices: <none>
*********************** END /proc/mdstat

*********************** BEGIN /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root  9 Dec  5 21:15 ata-HL-DT-ST_DVD+_-RW_GSA-H53N -> ../../sr0
lrwxrwxrwx 1 root root  9 Dec  5 21:15 ata-Maxtor_6Y120M0_Y3JVR9KE -> ../../sda
lrwxrwxrwx 1 root root 10 Dec  5 21:15 ata-Maxtor_6Y120M0_Y3JVR9KE-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Dec  5 21:15 ata-Maxtor_6Y120M0_Y3JVR9KE-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Dec  5 21:15 ata-Maxtor_6Y120M0_Y3JVR9KE-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Dec  5 21:15 ata-Maxtor_6Y120M0_Y3JVR9KE-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 Dec  5 21:15 ata-Maxtor_6Y120M0_Y3JVR9KE-part5 -> ../../sda5
lrwxrwxrwx 1 root root  9 Dec  5 21:20 ata-Maxtor_6Y160M0_Y469D4FE -> ../../sdb
lrwxrwxrwx 1 root root 10 Dec  5 21:15 ata-Maxtor_6Y160M0_Y469D4FE-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Dec  5 21:15 ata-Maxtor_6Y160M0_Y469D4FE-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Dec  5 21:15 ata-Maxtor_6Y160M0_Y469D4FE-part3 -> ../../sdb3
lrwxrwxrwx 1 root root 10 Dec  5 21:15 ata-Maxtor_6Y160M0_Y469D4FE-part4 -> ../../sdb4
lrwxrwxrwx 1 root root 10 Dec  5 21:15 ata-Maxtor_6Y160M0_Y469D4FE-part5 -> ../../sdb5
lrwxrwxrwx 1 root root 10 Dec  5 21:15 ata-Maxtor_6Y160M0_Y469D4FE-part6 -> ../../sdb6
lrwxrwxrwx 1 root root 10 Dec  5 21:15 ata-Maxtor_6Y160M0_Y469D4FE-part7 -> ../../sdb7
lrwxrwxrwx 1 root root  9 Dec  5 21:15 scsi-SATA_Maxtor_6Y120M0_Y3JVR9KE -> ../../sda
lrwxrwxrwx 1 root root 10 Dec  5 21:15 scsi-SATA_Maxtor_6Y120M0_Y3JVR9KE-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Dec  5 21:15 scsi-SATA_Maxtor_6Y120M0_Y3JVR9KE-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Dec  5 21:15 scsi-SATA_Maxtor_6Y120M0_Y3JVR9KE-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Dec  5 21:15 scsi-SATA_Maxtor_6Y120M0_Y3JVR9KE-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 Dec  5 21:15 scsi-SATA_Maxtor_6Y120M0_Y3JVR9KE-part5 -> ../../sda5
lrwxrwxrwx 1 root root  9 Dec  5 21:20 scsi-SATA_Maxtor_6Y160M0_Y469D4FE -> ../../sdb
lrwxrwxrwx 1 root root 10 Dec  5 21:15 scsi-SATA_Maxtor_6Y160M0_Y469D4FE-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Dec  5 21:15 scsi-SATA_Maxtor_6Y160M0_Y469D4FE-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Dec  5 21:15 scsi-SATA_Maxtor_6Y160M0_Y469D4FE-part3 -> ../../sdb3
lrwxrwxrwx 1 root root 10 Dec  5 21:15 scsi-SATA_Maxtor_6Y160M0_Y469D4FE-part4 -> ../../sdb4
lrwxrwxrwx 1 root root 10 Dec  5 21:15 scsi-SATA_Maxtor_6Y160M0_Y469D4FE-part5 -> ../../sdb5
lrwxrwxrwx 1 root root 10 Dec  5 21:15 scsi-SATA_Maxtor_6Y160M0_Y469D4FE-part6 -> ../../sdb6
lrwxrwxrwx 1 root root 10 Dec  5 21:15 scsi-SATA_Maxtor_6Y160M0_Y469D4FE-part7 -> ../../sdb7
lrwxrwxrwx 1 root root  9 Dec  5 21:16 usb-TEAC_USB_HS-CF_Card_00000400DF39-0:0 -> ../../sdc
lrwxrwxrwx 1 root root  9 Dec  5 21:16 usb-TEAC_USB_HS-MS_Card_00000400DF39-0:2 -> ../../sde
lrwxrwxrwx 1 root root  9 Dec  5 21:16 usb-TEAC_USB_HS-SD_Card_00000400DF39-0:3 -> ../../sdf
lrwxrwxrwx 1 root root  9 Dec  5 21:16 usb-TEAC_USB_HS-xD_SM_00000400DF39-0:1 -> ../../sdd
*********************** END /dev/disk/by-id

*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Dec  5 21:15 061CD0731CD05F6D -> ../../sda5
lrwxrwxrwx 1 root root 10 Dec  5 21:15 1A04D81C04D7F929 -> ../../sdb3
lrwxrwxrwx 1 root root 10 Dec  5 21:15 1AC01200C011E2B5 -> ../../sda1
lrwxrwxrwx 1 root root 10 Dec  5 21:15 388e078c-a276-4114-aa9f-9491bf0c8fef -> ../../sdb4
lrwxrwxrwx 1 root root 10 Dec  5 21:15 58047776047755CA -> ../../sdb1
lrwxrwxrwx 1 root root 10 Dec  5 21:15 800E-C019 -> ../../sdb5
lrwxrwxrwx 1 root root 10 Dec  5 21:15 bfaa6aff-7b70-43d6-9cf6-93080820dcff -> ../../sda4
lrwxrwxrwx 1 root root 10 Dec  5 21:15 edfd60c0-594a-4f69-94ab-72c20392da0f -> ../../sdb7
lrwxrwxrwx 1 root root 10 Dec  5 21:15 f81f9a3c-336e-4ce4-84c2-c06092a1434c -> ../../sda3
*********************** END /dev/disk/by-uuid

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

Kernel: Linux 3.1.0-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.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.41     
ii  grub-common            1.99-14    
ii  grub-pc-bin            1.99-14    
ii  grub2-common           1.99-14    
ii  ucf                    3.0025+nmu2

grub-pc recommends no packages.

grub-pc suggests no packages.

-- Configuration Files:
/etc/default/grub changed:
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""


-- debconf information:
  grub-pc/kopt_extracted: false
  grub2/kfreebsd_cmdline:
  grub2/device_map_regenerated:
* grub-pc/install_devices: /dev/disk/by-id/ata-Maxtor_6Y120M0_Y3JVR9KE
  grub-pc/postrm_purge_boot_grub: false
  grub-pc/install_devices_failed_upgrade: true
  grub-pc/disk_description:
  grub-pc/linux_cmdline: fillme
* 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:
  grub-pc/chainload_from_menu.lst: true
  grub-pc/mixed_legacy_and_grub2: true





More information about the Pkg-grub-devel mailing list