Bug#611537:

Diego Guella diego.guella at sircomtech.com
Fri Oct 7 07:51:01 UTC 2011


Same here.

Installed Debian Squeeze on a 2-drive RAID1, drives partitioned this way:

#fdisk -u -l /dev/sda

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x0007982f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     1953791      975872   82  Linux swap / Solaris
Partition 1 does not end on cylinder boundary.
/dev/sda2         1953792    99610623    48828416   fd  Linux raid 
autodetect
/dev/sda3        99610624  3907028991  1903709184   fd  Linux raid 
autodetect


Partitions:
sd*1 used for swap,
sd*2 -> /dev/md0 mounted on /,
sd*3 -> /dev/md1 mounted on /home.


#uname -svrmo
Linux 2.6.32-5-amd64 #1 SMP Fri Sep 9 20:23:16 UTC 2011 x86_64 GNU/Linux



Booting with sda and sdb connected works, even when they are physically 
reversed (boot from sdb).
Booting with sda *only* works.
Booting with sdb *only* does not work.

"does not work" means that on the screen I can read:
---
GRUB loading.
Welcome to GRUB!
---
and then, the system reboots.


I manually re-installed grub on sdb:
#grub-mkdevicemap
#grub-install /dev/sdb
Installation finished. No errors reported.

Does not help.

I added a 3rd drive to the raid1 array:
#mdadm --grow --raid-devices=3 /dev/md0
#mdadm --grow --raid-devices=3 /dev/md1
#dd if=/dev/sda of=/dev/sdc bs=512 count=1
#sync
#partprobe /dev/sdc
#mkswap /dev/sdc1
#mdadm /dev/md0 -a /dev/sdc2
#mdadm /dev/md1 -a /dev/sdc3
#grub-mkdevicemap
#grub-install /dev/sdc

Does not work with this drive too.

Set GRUB_TERMINAL=console in /etc/default/grub
#update-grub

Works.



I can live with this workaround, but I would like to understand what's going 
on here and maybe help to fix this.
You can find many users describing this bug on the web, one of these 
discussions is here:
http://ubuntuforums.org/showthread.php?t=1661341

Now I wonder: why is the first installation disc so special?

#blkid
/dev/sdb1: UUID="edc663a6-6dc1-4d2c-b3a2-c647f96ef3b3" TYPE="swap"
/dev/sda1: UUID="85099ddf-ffd0-4694-b03e-c925c6eae411" TYPE="swap"
/dev/md0: UUID="e999dede-c6a5-4b0f-8e2a-00019fac4ae3" TYPE="ext4"
/dev/md1: UUID="81c5c2bd-d83f-4bca-972c-72d661712337" TYPE="ext4"
/dev/sdd1: UUID="ae180f5c-afca-4b0f-8ab3-120e798a15f6" TYPE="swap"
/dev/sdd2: UUID="5695a0dc-6720-99cc-2d7a-92775b13bf0b" 
TYPE="linux_raid_member" LABEL="devilserver:0"
/dev/sdd3: UUID="eccfe28c-156a-186f-be31-844598ff6361" 
TYPE="linux_raid_member" LABEL="devilserver:1"
/dev/sdc1: UUID="9dc4f544-4a17-43d5-ad15-2e1d669525c2" TYPE="swap"
/dev/sda2: UUID="5695a0dc-6720-99cc-2d7a-92775b13bf0b" LABEL="devilserver:0" 
TYPE="linux_raid_member"
/dev/sda3: UUID="eccfe28c-156a-186f-be31-844598ff6361" LABEL="devilserver:1" 
TYPE="linux_raid_member"
/dev/sdb2: UUID="5695a0dc-6720-99cc-2d7a-92775b13bf0b" LABEL="devilserver:0" 
TYPE="linux_raid_member"
/dev/sdb3: UUID="eccfe28c-156a-186f-be31-844598ff6361" LABEL="devilserver:1" 
TYPE="linux_raid_member"
/dev/sdc2: UUID="5695a0dc-6720-99cc-2d7a-92775b13bf0b" LABEL="devilserver:0" 
TYPE="linux_raid_member"
/dev/sdc3: UUID="eccfe28c-156a-186f-be31-844598ff6361" LABEL="devilserver:1" 
TYPE="linux_raid_member"


The first 2048 512-byte sectors of each disk are identical
The first 512-byte sector of sdb2, sdc2, sdd2 are full of 0's
The first 512-byte sector of sda2 contains:

#dd if=/dev/sda2 of=sda2_sector0.bin bs=512 count=1
# hexdump sda2_sector0.bin
0000000 804f 0000 804f 0001 804f 0002 804f 0003
0000010 804f 0004 804f 000c 804f 000d 804f 0018
0000020 804f 0028 804f 003e 804f 0079 804f 00ab
0000030 0000 0000 0000 0000 0000 0000 0000 0000
*
0000200

So I copied this sector into sdb:
#dd if=/dev/sda2 of=/dev/sdb2 bs=512 count=1

Tried to boot with sdb only.. no success.


-EOUTOFIDEAS







More information about the Pkg-grub-devel mailing list