Re: grub2/grub-pc install not possible on mdadm

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

 



On 05/03/2012 10:14, Lars Täuber wrote:
Hi John,

Am Mon, 05 Mar 2012 09:38:34 +0000
John Robinson<john.robinson@xxxxxxxxxxxxxxxx>  schrieb:
On 05/03/2012 07:50, Stefan Priebe - Profihost AG wrote:
Am 02.03.2012 16:32, schrieb Lars Täuber:
Hi Stefan,

the metadata versions 1.0 and 1.1 and 1.2 are the same but for the
position of the metadata on disk. Simply use metadata version 1.0 and
everything works as with 0.9.

Grub does to read partition tables inside raid devices.

Sure it does, but that's not the point.

that's new to me. This is true for grub2 only?
You mean if Stefan would have used an old fashioned partition table inside a
Linux SW-RAID with metadata 1.2, grub would have booted like normal?

Yes, both grub2 and grub legacy (0.97) read partition tables. Only grub2 can really read inside RAID arrays - any metadata, any RAID level - while grub legacy can only read the first drive of RAID-1 with 0.90 or 1.0 metadata, and that only because they look like bare drives/partitions.

Because a raid1 with metadata 1.0 or 0.9 looks like a plain disk to grub
it can read a partition table like there was no raid array.

For the fourth time, no.

Because a RAID1 with metadata 0.9 or 1.0 looks like a plain disc to the
BIOS, it can read a partition table like there was no RAID array, and
therefore the BIOS can load GRUB.

This might be true for UEFI firmware but for the plain old BIOS too?
I thought the BIOS isn't interested in partitions at all.

That's true, but it is interested in the MBR, sector zero of the drive it's booting from, which is also where the partition table lives, so for plain old BIOS you have to put the stage 1 boot loader there, which can only happen with metadata 0.90 and 1.0 if you use whole-drive arrays.

With plain old BIOS, grub legacy and grub2 also depend on the next 31K of the disc, up to sector 62, being unused, as traditionally the first partition starts at sector 63. (More recent fdisk make it 1023.5K, sector 2047 and sector 2048 respectively). This means you have to have a partition table, and though the plain old BIOS doesn't use it, grub does, to find the /boot or / partition to load a kernel from. With grub legacy, it has to be an MBR partition table, not one buried inside an array with metadata 1.1 or 1.2.

I suppose you could possibly contrive to have no MBR partition table for grub2, but you'd still need that space on the drive for the stage 1.5 code, which isn't available with a whole-drive metadata 1.2 array (because its metadata starts 4K into the drive, leaving 3.5K after the stage 1 on the MBR), so you do effectively need an MBR partition table to reserve the space.

But you're right, plain old BIOS don't use the MBR partition table, just the MBR. I was fashioning my sentence after yours, so sorry for any confusion. My point - that it's the BIOS that has to be able to read the array like it was a bare drive, rather than grub - remains.

Cheers,

John.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux