grub problem

Rashkae ubuntu at tigershaunt.com
Mon May 25 20:16:11 UTC 2009


Luca Ferrari wrote:
> On Friday 22 May 2009 01:05:43 pm Karl F. Larsen wrote:
> 

> 
> No way to make the system boot.
> I've disassembled the raid boot partitions, so that I've got /dev/cciss/c0d0p2 
> and /dev/cciss/c0d1p2 containing the boot directory. The root filesystem is 
> /dev/md0, I'm able to start from a live cd, mount /dev/md0 as root, mount 
> /boot as /dev/cciss/c0d0p2 and execute grub-install /dev/cciss/c0d0 and 
> update-initramfs -u. No problems, but when I try to boot from (hd0,1) I got an 
> alert saying tha md0 does not exist and I'm dropped to a busybox shell again.
> Is there any way to get more messages from grub, so to understand what Iìm 
> doing wrong?
> 
> Is there something I can do except reinstalling the system?
> 
> Thanks,
> Luca
> 
> 

How was the raid array created in the first place.  Was it set up as
part of the installation, or did you use mdadm from a live cd of some type?

When mdadm creates a raid array, it encodes the 'hostname' of the pc
into the raid array.  The theory is, if the raid array finds itself in a
different pc, it mdadm refuses to automatically assemble it, so that
raid devices don't get mussed when hard drives are being moved from
system to system.

Unfortunately for this great plan, the Ubuntu initramfs, which must
assemble any raid array for your root device, has a blank hostname.
Therefore, if you create a raid array for root when you are booted into
a fully operational system, that raid array will not assemble when you
reboot into initramfs. (major catch 22)

To fix it, you have to assemble the md0 from the busybox shell.  So from
busybox, try something like this:

mdadm assemble /dev/md0 /dev/sd?? /dev/sd??  --update=homehost

Assuming busybox is able to find all your hard drives, and you don't
have some other kind of really bizare problem happening, that should
start your md0, and will update the homehost information needed in the
superblocks for automatic assembly to happen in future reboots.






More information about the ubuntu-users mailing list