Bug#646892: grub-pc: Grub2 installation fails in two letter drives

Josep Guerrero jgue at ice.cat
Fri Oct 28 08:03:19 UTC 2011


Package: grub-pc
Version: 1.98+20100804-14+squeeze1
Severity: important
Tags: squeeze

This computer (Sun Thumper X4500) can only boot from two of its 48 disks, which are identified as

/dev/sdy

and

/dev/sdac

Both disks are identical and have been partitioned in exactly the same way. Then those partitions 
have been made into several software RAID 1 devices (md0 through md5). Root partition is md0. These
are /proc/mdstat contents for that RAID device:

===============
md0 : active raid1 sdac1[0] sdy1[1]
      19534912 blocks [2/2] [UU]
===============

If I try to install grub in the /dev/sdy disk I get some errors (I don't know
if they are important or what do they mean), but apparently the process works:

===============
kilimanjaro:~# grub-install /dev/sdy
error: found two disks with the number 21.
error: superfluous RAID member (14 found).
error: found two disks with the number 21.
error: superfluous RAID member (14 found).
error: found two disks with the number 21.
error: superfluous RAID member (14 found).
error: found two disks with the number 21.
error: superfluous RAID member (14 found).
error: found two disks with the number 21.
error: superfluous RAID member (14 found).
Installation finished. No error reported
===============

if I try the same with /dev/sdac, it doesn't work:

===============
kilimanjaro:~# grub-install /dev/sdac
error: found two disks with the number 21.
error: superfluous RAID member (14 found).
error: found two disks with the number 21.
error: superfluous RAID member (14 found).
error: found two disks with the number 21.
error: superfluous RAID member (14 found).
error: found two disks with the number 21.
error: superfluous RAID member (14 found).
error: found two disks with the number 21.
error: superfluous RAID member (14 found).
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk.  This is a BAD idea..
/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.
================

But /dev/sdac and /dev/sdy are both partitioned, and exactly in the same way:

================
kilimanjaro:~# fdisk -l /dev/sdy

Disk /dev/sdy: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00055a02

   Device Boot      Start         End      Blocks   Id  System
/dev/sdy1               1        2432    19535008+  fd  Linux raid autodetect
/dev/sdy2            2433       60801   468848992+   5  Extended
/dev/sdy5            2433        4864    19535008+  fd  Linux raid autodetect
/dev/sdy6            4865        7296    19535008+  fd  Linux raid autodetect
/dev/sdy7            7297        8269     7815591   fd  Linux raid autodetect
/dev/sdy8            8270       15564    58597056   fd  Linux raid autodetect
/dev/sdy9           15565       60801   363366171   fd  Linux raid autodetect
kilimanjaro:~# fdisk -l /dev/sdac

Disk /dev/sdac: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00050f0c

    Device Boot      Start         End      Blocks   Id  System
/dev/sdac1               1        2432    19535008+  fd  Linux raid autodetect
/dev/sdac2            2433       60801   468848992+   5  Extended
/dev/sdac5            2433        4864    19535008+  fd  Linux raid autodetect
/dev/sdac6            4865        7296    19535008+  fd  Linux raid autodetect
/dev/sdac7            7297        8269     7815591   fd  Linux raid autodetect
/dev/sdac8            8270       15564    58597056   fd  Linux raid autodetect
/dev/sdac9           15565       60801   363366171   fd  Linux raid autodetect
kilimanjaro:~#
==========================

I suspect that grub-setup, as called by grub-install, is trying to install on another disk (maybe
/dev/sda, since it may have chopped the last letter of the drive name, and the error would make sense
since /dev/sda has no partitions and is in fact part of a RAID 5 device). But I have no idea about 
how to test for this without breaking anything.

Thanks for your help and attention.


-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/disk/by-uuid/90ec83ed-b197-440e-9e50-d78b0a65ea95 / ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/md5 /home/kilimanjaro ext3 rw,relatime,errors=continue,data=ordered 0 0
/dev/md1 /usr ext3 rw,relatime,errors=continue,data=ordered 0 0
/dev/md4 /usr/local ext3 rw,relatime,errors=continue,data=ordered 0 0
/dev/md2 /var ext3 rw,relatime,errors=continue,data=ordered 0 0
/dev/md10 /mnt/3TB ext3 rw,relatime,errors=continue,data=ordered 0 0
/dev/md21 /home/kilimanjaro1 ext3 rw,relatime,errors=continue,data=ordered 0 0
/dev/md22 /home/kilimanjaro2 ext3 rw,relatime,errors=continue,data=ordered 0 0
/dev/md23 /scratch ext3 rw,relatime,errors=continue,data=ordered 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1BTGE_GTE400P6G1BTGE
(hd1)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J1K66E_GTE400P6G1K66E
(hd2)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1DEDE_GTE400P6G1DEDE
(hd3)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1B04E_GTE400P6G1B04E
(hd4)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J1782E_GTE400P6G1782E
(hd5)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J1JGAE_GTE400P6G1JGAE
(hd6)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J0VPVE_GTE400P6G0VPVE
(hd7)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J18JPE_GTE400P6G18JPE
(hd8)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1DMGE_GTE400P6G1DMGE
(hd9)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0745J2E8SF_GTF400P6G2E8SF
(hd10)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0745J2EANF_GTF400P6G2EANF
(hd11)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1DWNE_GTE400P6G1DWNE
(hd12)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1AAME_GTE400P6G1AAME
(hd13)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0745J298WF_GTF400P6G298WF
(hd14)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1DAWE_GTE400P6G1DAWE
(hd15)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1DR5E_GTE400P6G1DR5E
(hd16)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J1G47E_GTE400P6G1G47E
(hd17)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0745J2ML7F_GTF400P6G2ML7F
(hd18)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1D39E_GTE400P6G1D39E
(hd19)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1BX0E_GTE400P6G1BX0E
(hd20)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J18DHE_GTE400P6G18DHE
(hd21)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0745J2MGWF_GTF400P6G2MGWF
(hd22)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J17J0E_GTE400P6G17J0E
(hd23)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J118GE_GTE400P6G118GE
(hd24)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J2A2JE_GTE400P6G2A2JE
(hd25)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0745J2510F_GTF400P6G2510F
(hd26)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J18BZE_GTE400P6G18BZE
(hd27)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J1KLWE_GTE400P6G1KLWE
(hd28)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0745J2EMWF_GTF400P6G2EMWF
(hd29)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0745J2JL6F_GTF400P6G2JL6F
(hd30)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1A4RE_GTE400P6G1A4RE
(hd31)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J0U9KE_GTE400P6G0U9KE
(hd32)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1D0UE_GTE400P6G1D0UE
(hd33)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0745J2G4AF_GTF400P6G2G4AF
(hd34)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1DWAE_GTE400P6G1DWAE
(hd35)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J0WNKE_GTE400P6G0WNKE
(hd36)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1AXHE_GTE400P6G1AXHE
(hd37)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0745J22ZUF_GTF400P6G22ZUF
(hd38)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J10HVE_GTE400P6G10HVE
(hd39)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1DW9E_GTE400P6G1DW9E
(hd40)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J18D6E_GTE400P6G18D6E
(hd41)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J2A06E_GTE400P6G2A06E
(hd42)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J18BVE_GTE400P6G18BVE
(hd43)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1DZ3E_GTE400P6G1DZ3E
(hd44)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J1JEVE_GTE400P6G1JEVE
(hd45)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J18D4E_GTE400P6G18D4E
(hd46)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0744J1114E_GTE400P6G1114E
(hd47)	/dev/disk/by-id/ata-HITACHI_HUA7250SBSUN500G_0742J1DJ2E_GTE400P6G1DJ2E
*********************** 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 raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md1)'
search --no-floppy --fs-uuid --set 9459886a-00db-4d78-99dd-4aaa4dce4a52
if loadfont /share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 90ec83ed-b197-440e-9e50-d78b0a65ea95
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
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 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 ext2
	set root='(md0)'
	search --no-floppy --fs-uuid --set 90ec83ed-b197-440e-9e50-d78b0a65ea95
	echo	'Loading Linux 2.6.32-5-amd64 ...'
	linux	/boot/vmlinuz-2.6.32-5-amd64 root=UUID=90ec83ed-b197-440e-9e50-d78b0a65ea95 ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/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 ext2
	set root='(md0)'
	search --no-floppy --fs-uuid --set 90ec83ed-b197-440e-9e50-d78b0a65ea95
	echo	'Loading Linux 2.6.32-5-amd64 ...'
	linux	/boot/vmlinuz-2.6.32-5-amd64 root=UUID=90ec83ed-b197-440e-9e50-d78b0a65ea95 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-5-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.26-2-amd64' --class debian --class gnu-linux --class gnu --class os {
	insmod raid
	insmod mdraid
	insmod part_msdos
	insmod part_msdos
	insmod ext2
	set root='(md0)'
	search --no-floppy --fs-uuid --set 90ec83ed-b197-440e-9e50-d78b0a65ea95
	echo	'Loading Linux 2.6.26-2-amd64 ...'
	linux	/boot/vmlinuz-2.6.26-2-amd64 root=UUID=90ec83ed-b197-440e-9e50-d78b0a65ea95 ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.26-2-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.26-2-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod raid
	insmod mdraid
	insmod part_msdos
	insmod part_msdos
	insmod ext2
	set root='(md0)'
	search --no-floppy --fs-uuid --set 90ec83ed-b197-440e-9e50-d78b0a65ea95
	echo	'Loading Linux 2.6.26-2-amd64 ...'
	linux	/boot/vmlinuz-2.6.26-2-amd64 root=UUID=90ec83ed-b197-440e-9e50-d78b0a65ea95 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.26-2-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.18-6-amd64' --class debian --class gnu-linux --class gnu --class os {
	insmod raid
	insmod mdraid
	insmod part_msdos
	insmod part_msdos
	insmod ext2
	set root='(md0)'
	search --no-floppy --fs-uuid --set 90ec83ed-b197-440e-9e50-d78b0a65ea95
	echo	'Loading Linux 2.6.18-6-amd64 ...'
	linux	/boot/vmlinuz-2.6.18-6-amd64 root=UUID=90ec83ed-b197-440e-9e50-d78b0a65ea95 ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.18-6-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.18-6-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod raid
	insmod mdraid
	insmod part_msdos
	insmod part_msdos
	insmod ext2
	set root='(md0)'
	search --no-floppy --fs-uuid --set 90ec83ed-b197-440e-9e50-d78b0a65ea95
	echo	'Loading Linux 2.6.18-6-amd64 ...'
	linux	/boot/vmlinuz-2.6.18-6-amd64 root=UUID=90ec83ed-b197-440e-9e50-d78b0a65ea95 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.18-6-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.18-4-amd64' --class debian --class gnu-linux --class gnu --class os {
	insmod raid
	insmod mdraid
	insmod part_msdos
	insmod part_msdos
	insmod ext2
	set root='(md0)'
	search --no-floppy --fs-uuid --set 90ec83ed-b197-440e-9e50-d78b0a65ea95
	echo	'Loading Linux 2.6.18-4-amd64 ...'
	linux	/boot/vmlinuz-2.6.18-4-amd64 root=UUID=90ec83ed-b197-440e-9e50-d78b0a65ea95 ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.18-4-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.18-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod raid
	insmod mdraid
	insmod part_msdos
	insmod part_msdos
	insmod ext2
	set root='(md0)'
	search --no-floppy --fs-uuid --set 90ec83ed-b197-440e-9e50-d78b0a65ea95
	echo	'Loading Linux 2.6.18-4-amd64 ...'
	linux	/boot/vmlinuz-2.6.18-4-amd64 root=UUID=90ec83ed-b197-440e-9e50-d78b0a65ea95 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.18-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/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: 6.0.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-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 [debco 1.5.36.1                  Debian configuration management sy
ii  grub-common    1.98+20100804-14+squeeze1 GRand Unified Bootloader, version 
ii  libc6          2.11.2-10                 Embedded GNU C Library: Shared lib
ii  libdevmapper1. 2:1.02.48-5               The Linux Kernel Device Mapper use
ii  ucf            3.0025+nmu1               Update Configuration File: preserv

grub-pc recommends no packages.

Versions of packages grub-pc suggests:
pn  desktop-base                  <none>     (no description available)

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





More information about the Pkg-grub-devel mailing list