[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: grub-install fails an RAID1



On Tue, Oct 11, 2011 at 11:58:52PM +0200, Kurt Flex wrote:
> 
> Hi,
> 
> I've done a safe-upgrade today which upgraded grub:
> 
>     upgrade grub-pc 1.98+20100804-14 1.98+20100804-14+squeeze1
> 
> The same for grub-common.
> 
> A dialog appeared which asked me to run grub-install. But that
> failed. So i told the dialog to skip that part. Now I've tried
> grub-install manually.
> 
>     # grub-install /dev/sda
>     /usr/sbin/grub-setup: warn: This msdos-style partition label has no post-MBR gap; embedding won't be possible!.
>     /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.
> 
> My google fu is not very good on this issue.
> 
>     # parted -l
>     Model: ATA WDC WD6400AACS-0 (scsi)
>     Disk /dev/sda: 640GB
>     Sector size (logical/physical): 512B/512B
>     Partition Table: msdos
> 
>     Number  Start   End     Size    Type     File system     Flags
>      1      512B    100MB   100MB   primary  ext2            raid
>      2      100MB   1124MB  1024MB  primary  linux-swap(v1)
>      3      1124MB  610GB   609GB   primary  ext3            raid
> 
> 
>     Model: ATA WDC WD6400AACS-0 (scsi)
>     Disk /dev/sdb: 640GB
>     Sector size (logical/physical): 512B/512B
>     Partition Table: msdos
> 
>     Number  Start   End     Size    Type     File system     Flags
>      1      512B    100MB   100MB   primary  ext2            raid
>      2      100MB   1124MB  1024MB  primary  linux-swap(v1)
>      3      1124MB  610GB   609GB   primary  ext3            raid
> 
> 
>     Model: Linux Software RAID Array (md)
>     Disk /dev/md0: 99.9MB
>     Sector size (logical/physical): 512B/512B
>     Partition Table: loop
> 
>     Number  Start  End     Size    File system  Flags
>      1      0.00B  99.9MB  99.9MB  ext2
> 
> 
>     Model: Linux Software RAID Array (md)
>     Disk /dev/md1: 609GB
>     Sector size (logical/physical): 512B/512B
>     Partition Table: loop
> 
>     Number  Start  End    Size   File system  Flags
>      1      0.00B  609GB  609GB  ext3
> 
> 
> Any hints?

Looking at your partition table, you have 512 bytes between the start of
the disk and your first partition. This is enough for a simple boot
loader, but Grub uses a multi-stage boot system. The 512 byte
"traditional" boot loader is termed "Stage 1". This jumps to "Stage 1.5"
which is a larger section of code and which contains the drivers needed
to load Stage 2. Stage 1.5, then would contain your MD driver and your
EXT2 driver so that grub can read the contents of your file system and
find /boot/grub/*. Stage 2 is then the full Grub, with the menu, the
config file and so on. See
http://en.wikipedia.org/wiki/GNU_GRUB#GRUB_version_1 for some useful
info.

Now, as you only have 512 bytes of 'free' space, Grub can't install its
Stage 1.5 so is complaining. For a regular disk, it could probably
perform a direct jump to Stage 2 and hope it doesn't move (it
shouldn't), but as you have RAID, it can't do that.

So, I think your options are to either shift your first parition up a
little (30kb seems to be the usual recommendation) or to find a boot
loader that IS capable of starting your RAID device in 512 bytes.

-- 
Darac Marjal

Attachment: signature.asc
Description: Digital signature


Reply to: