Bug#611537: grub-pc: In an mdadm RAID1 area GRUB2 fails to boot from second HDD (at, least in SATA environment) when graphical terminal activated

Daniel Huhardeaux devel at tootai.net
Sun Jan 30 14:29:49 UTC 2011


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


I installed a fresh server in SATA environment using mdadm. All went 
smooth even rebooting from one or the other disk after installation.
I used a net install SQUEEZE CD from around 08/2010.

After having removed the linux-image-2.6.32-5-trunk-amd64 image from 
installation, I again tried my RAID setup and from here I'm unable to 
boot from
HDD who whas sda during installation. Worth, when booting GRUB I see the 
welcome message, than quickly appears some errors and the server is 
going to reboot,
no GRUB Cli even in rescue mode :-(! Pressing SHIFT key during GRUB 
start gives only a blanck screen, nothing usable.

With a camera I could get an image from the procedure and saw:

GRUB loading.
Welcome to GRUB!

error: no such device 83fe9f48-467b-43bc-bffa-0c0f09be70a5
error: no such disk
error: no suitable mode found

and server is rebooting

the above UUID device is the / partition wich is /dev/md2. Separate is 
/boot being /dev/md0 partition.

Booting from other HDD or from entire RAID area is working well.

Now I enabled in /etc/default/grub
[...]
GRUB_TERMINAL=console

ran update-grub and try again my RAID area: booting from each HDD is 
effective!

I checked my raid area with boot_info_script055.sh script, everything is 
fine (output is filename RESULTS.txt below).

-- 
Daniel

-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/md2 / ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0
/dev/md0 /boot ext3 rw,relatime,errors=continue,data=ordered 0 0
*********************** END /proc/mounts

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

terminal_input console
terminal_output console
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 
3f4ae82c-ac03-473d-a158-9e6016fe9a67
         echo    'Loading Linux 2.6.32-5-amd64 ...'
         linux   /vmlinuz-2.6.32-5-amd64 root=/dev/md2 ro
         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 ext2
         set root='(md0)'
         search --no-floppy --fs-uuid --set 
3f4ae82c-ac03-473d-a158-9e6016fe9a67
         echo    'Loading Linux 2.6.32-5-amd64 ...'
         linux   /vmlinuz-2.6.32-5-amd64 root=/dev/md2 ro single
         echo    'Loading initial ramdisk ...'
         initrd  /initrd.img-2.6.32-5-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
   APT prefers testing
   APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.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.36           Debian configuration 
management sy
ii  grub-common             1.98+20100804-14 GRand Unified Bootloader, 
version
ii  libc6                   2.11.2-10        Embedded GNU C Library: 
Shared lib
ii  libdevmapper1.02.1      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:
   grub-pc/kopt_extracted: false
   grub2/kfreebsd_cmdline:
   grub2/device_map_regenerated:
* grub-pc/install_devices: (hd0)
   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: true
   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

================================
Output of filename="RESULTS.txt"

                 Boot Info Script 0.55    dated February 15th, 2010

============================= Boot Info Summary: 
==============================

  => Grub 2 is installed in the MBR of /dev/sda and looks for (md0)/grub.
  => Grub 2 is installed in the MBR of /dev/sdb and looks for (md0)/grub.

sda1: 
_________________________________________________________________________

     File system:       linux_raid_member
     Boot sector type:  -
     Boot sector info:

sda2: 
_________________________________________________________________________

     File system:       linux_raid_member
     Boot sector type:  -
     Boot sector info:

sda3: 
_________________________________________________________________________

     File system:       linux_raid_member
     Boot sector type:  -
     Boot sector info:

sdb1: 
_________________________________________________________________________

     File system:       linux_raid_member
     Boot sector type:  -
     Boot sector info:

sdb2: 
_________________________________________________________________________

     File system:       linux_raid_member
     Boot sector type:  -
     Boot sector info:

sdb3: 
_________________________________________________________________________

     File system:       linux_raid_member
     Boot sector type:  -
     Boot sector info:

md0: 
_________________________________________________________________________

     File system:       ext3
     Boot sector type:  -
     Boot sector info:
     Operating System:
     Boot files/dirs:   /grub/grub.cfg /grub/core.img

md/1: 
_________________________________________________________________________

     File system:       swap
     Boot sector type:  -
     Boot sector info:

md2: 
_________________________________________________________________________

     File system:       ext4
     Boot sector type:  -
     Boot sector info:
     Operating System:  Debian GNU/Linux 6.0
     Boot files/dirs:   /etc/fstab

=========================== Drive/Partition Info: 
=============================

Drive: sda ___________________ 
_____________________________________________________

Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders, total 488281250 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sda1                  63       192,779       192,717  fd Linux raid 
autodetect
/dev/sda2             192,780     3,903,794     3,711,015  fd Linux raid 
autodetect
/dev/sda3           3,903,795   488,279,609   484,375,815  fd Linux raid 
autodetect


Drive: sdb ___________________ 
_____________________________________________________

Disk /dev/sdb: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders, total 488281250 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdb1                  63       192,779       192,717  fd Linux raid 
autodetect
/dev/sdb2             192,780     3,903,794     3,711,015  fd Linux raid 
autodetect
/dev/sdb3           3,903,795   488,279,609   484,375,815  fd Linux raid 
autodetect


blkid -c /dev/null: 
____________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/md0         3f4ae82c-ac03-473d-a158-9e6016fe9a67   ext3
/dev/md/1        3b6aaabb-3ce9-4c8a-bec0-0141d5b1161c   swap
/dev/md1         3b6aaabb-3ce9-4c8a-bec0-0141d5b1161c   swap
/dev/md2         83fe9f48-467b-43bc-bffa-0c0f09be70a5   ext4
/dev/sda1        eaaf9a8d-ffec-762f-7146-9dfda3fbc70f   linux_raid_member
/dev/sda2        89741b40-e564-9507-9ec7-e36f7dd7e7d0   
linux_raid_member bonemine:1
/dev/sda3        15529b2b-bfd4-144b-7146-9dfda3fbc70f   linux_raid_member
/dev/sda: PTTYPE="dos"
/dev/sdb1        eaaf9a8d-ffec-762f-7146-9dfda3fbc70f   linux_raid_member
/dev/sdb2        89741b40-e564-9507-9ec7-e36f7dd7e7d0   
linux_raid_member bonemine:1
/dev/sdb3        15529b2b-bfd4-144b-7146-9dfda3fbc70f   linux_raid_member
/dev/sdb: PTTYPE="dos"

============================ "mount | grep ^/dev  output: 
===========================

Device           Mount_Point              Type       Options

/dev/md2         /                        ext4       (rw,errors=remount-ro)
/dev/md0         /boot                    ext3       (rw)


============================== md0/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='(md2)'
search --no-floppy --fs-uuid --set 83fe9f48-467b-43bc-bffa-0c0f09be70a5
if loadfont /usr/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 3f4ae82c-ac03-473d-a158-9e6016fe9a67
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 ###
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, avec 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 
3f4ae82c-ac03-473d-a158-9e6016fe9a67
         echo    'Chargement de Linux 2.6.32-5-amd64 ...'
         linux   /vmlinuz-2.6.32-5-amd64 
root=UUID=83fe9f48-467b-43bc-bffa-0c0f09be70a5 ro  quiet
         echo    'Chargement du disque mémoire initial ...'
         initrd  /initrd.img-2.6.32-5-amd64
}
menuentry 'Debian GNU/Linux, avec Linux 2.6.32-5-amd64 (mode de 
dépannage)' --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 
3f4ae82c-ac03-473d-a158-9e6016fe9a67
         echo    'Chargement de Linux 2.6.32-5-amd64 ...'
         linux   /vmlinuz-2.6.32-5-amd64 
root=UUID=83fe9f48-467b-43bc-bffa-0c0f09be70a5 ro single
         echo    'Chargement du disque mémoire initial ...'
         initrd  /initrd.img-2.6.32-5-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 ###

==================== md0: Location of files loaded by Grub: 
====================


     .0GB: grub/core.img
     .0GB: grub/grub.cfg
     .0GB: initrd.img-2.6.32-5-amd64
     .0GB: vmlinuz-2.6.32-5-amd64

================================ md2/etc/fstab: 
================================

# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/md2 during installation
UUID=83fe9f48-467b-43bc-bffa-0c0f09be70a5 /               ext4    
errors=remount-ro 0       1
# /boot was on /dev/md0 during installation
UUID=3f4ae82c-ac03-473d-a158-9e6016fe9a67 /boot           ext3    
defaults        0       2
# swap was on /dev/md1 during installation
UUID=3b6aaabb-3ce9-4c8a-bec0-0141d5b1161c none            swap    
sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0

==================== md2: Location of files loaded by Grub: 
====================


     .0GB: initrd.img
     .0GB: vmlinuz
=============================== StdErr Messages: 
===============================

mdadm: /dev/md0 is already in use.
mdadm: /dev/md2 is already in use.





More information about the Pkg-grub-devel mailing list