Discussion:
gpt disk label and /boot
Jean Spirat
2009-02-25 16:40:39 UTC
Permalink
Hi,

I have some issue with gpt and grub and i just wanted to know if the
setup-storage configure the /boot with the gui
21686148-6449-6E6F-744E-656564454649 (so that grub can use it). I do not
know how to verify this at all some i am kind of lost :)

of course things get complicated when the /boot is on a raid/lvm
partition. How do you handle this case ?

regards,
JEan.


The *BIOS Boot Partition* is a partition
<http://en.wikipedia.org/wiki/Partition_%28computing%29> on a data
storage device <http://en.wikipedia.org/wiki/Data_storage_device> that
may be used by standard BIOS <http://en.wikipedia.org/wiki/BIOS>-based
machines in order to boot when the partition table of the device is a
GPT <http://en.wikipedia.org/wiki/GUID_Partition_Table> label.

The Globally Unique Identifier
<http://en.wikipedia.org/wiki/Globally_Unique_Identifier> for the BIOS
Boot Partition in the GPT scheme is
21686148-6449-6E6F-744E-656564454649. In the context of GPT labels, it
is the BIOS equivalent of the EFI System Partition
<http://en.wikipedia.org/wiki/EFI_System_Partition> (which is used by
systems based on EFI <http://en.wikipedia.org/wiki/EFI> rather than BIOS).
Michael Tautschnig
2009-02-25 22:48:02 UTC
Permalink
Post by Jean Spirat
Hi,
I have some issue with gpt and grub and i just wanted to know if the
setup-storage configure the /boot with the gui
21686148-6449-6E6F-744E-656564454649 (so that grub can use it). I do not
know how to verify this at all some i am kind of lost :)
Most probably, this is currently _not_ the case (assuming you want the
BIOS-style version and not EFI). I guess a simple "parted print" should help you
verify this. If the partition is set to bios_grub, you are fine; if it has the
flag "boot", it's an EFI boot volume. I think this will best be fixed by adding
a specific disklabel "gpt-bios" to setup-storage that deals with such specifics.
Doing so is not really hard, I would just like to make sure that it will see
some testing. If you're willing to dive into this, I'd happily prepare a patch
in the next few days.
Post by Jean Spirat
of course things get complicated when the /boot is on a raid/lvm
partition. How do you handle this case ?
Does that interfer in any way with the GPT stuff? Or is it just the possible
problems with grub?

[...]

Thanks,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20090225/8752ca9b/attachment.bin
Jean Spirat
2009-02-26 08:17:56 UTC
Permalink
Post by Michael Tautschnig
Most probably, this is currently _not_ the case (assuming you want the
BIOS-style version and not EFI). I guess a simple "parted print" should help you
verify this. If the partition is set to bios_grub, you are fine; if it has the
flag "boot", it's an EFI boot volume. I think this will best be fixed by adding
a specific disklabel "gpt-bios" to setup-storage that deals with such specifics.
Doing so is not really hard, I would just like to make sure that it will see
some testing. If you're willing to dive into this, I'd happily prepare a patch
in the next few days.
yes i can test it if this is in the next days no problem !

yes instead of primary for special case:

gpt-bios
gpt-gui:21686148-6449-6E6F-744E-656564454649

so we have a shortcut for the gpt-bios and can give any gid we want, dont know if this is usefull but...
Post by Michael Tautschnig
Does that interfer in any way with the GPT stuff? Or is it just the possible
problems with grub?
[...]
no in fact this is stupidity from me the raid will not change anything
to that... :)

regards,
Jean.
Michael Tautschnig
2009-03-05 13:04:37 UTC
Permalink
Post by Jean Spirat
Post by Michael Tautschnig
Most probably, this is currently _not_ the case (assuming you want the
BIOS-style version and not EFI). I guess a simple "parted print" should help you
verify this. If the partition is set to bios_grub, you are fine; if it has the
flag "boot", it's an EFI boot volume. I think this will best be fixed by adding
a specific disklabel "gpt-bios" to setup-storage that deals with such specifics.
Doing so is not really hard, I would just like to make sure that it will see
some testing. If you're willing to dive into this, I'd happily prepare a patch
in the next few days.
yes i can test it if this is in the next days no problem !
gpt-bios
gpt-gui:21686148-6449-6E6F-744E-656564454649
so we have a shortcut for the gpt-bios and can give any gid we want, dont know if this is usefull but...
For now, I've only added the gpt-bios stuff. Could you please try
3.2.18+experimental2?

Thanks,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20090305/619ff597/attachment.bin
Jean Spirat
2009-03-11 10:27:07 UTC
Permalink
Post by Michael Tautschnig
For now, I've only added the gpt-bios stuff. Could you please try
3.2.18+experimental2?
Thanks,
Michael
ii fai-client
3.2.18+experimental2 Fully Automatic
Installation client package
ii fai-doc
3.2.18+experimental2 Documentation for FAI


i tried but i got the error: Volume group gpt has not been declared yet.



i used this:

disk_config /dev/sda disklabel:gpt
gpt-bios - 500 - -
primary swap 2G swap sw
primary - 15G - -
primary - 500- - -


regards,
Jean.
Jean Spirat
2009-03-11 13:10:47 UTC
Permalink
Post by Michael Tautschnig
For now, I've only added the gpt-bios stuff. Could you please try
3.2.18+experimental2?
Thanks,
Michael
then i tried this:

disk_config /dev/sda disklabel:gpt-bios
primary - 500 - -
primary swap 2G swap sw
primary - 15G - -
primary - 500- - -


idem for sdb and

disk_config raid
raid1 /boot sda1,sdb1 ext3 -


and got:

Starting setup-storage 1.0.4

ERROR (line 5): Invalid file: Was expecting /\Z/ but found
"disk_config
/dev/sda disklabel:gpt-bios " instead
Syntax error
Using config file: /var/lib/fai/config/disk_config/main-1


regards,
Jean.
Jean Spirat
2009-03-11 17:05:35 UTC
Permalink
hum in fact i am unable to make it work even with dos partitions...Is
this an issue with this version ?

regards,
Jean.
Michael Tautschnig
2009-03-13 08:25:41 UTC
Permalink
Post by Jean Spirat
hum in fact i am unable to make it work even with dos partitions...Is
this an issue with this version ?
Sorry for the late reply; using disklabel:gpt-bios should finally work with
3.2.18+experimental3, at least the problem in the parser has been fixed :-)

Best,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20090313/8554372a/attachment.bin
Jean Spirat
2009-03-17 13:33:53 UTC
Permalink
Post by Michael Tautschnig
Sorry for the late reply; using disklabel:gpt-bios should finally work with
3.2.18+experimental3, at least the problem in the parser has been fixed :-)
Best,
Michael
i just tested it fails here:

sh-3.2# parted -s /dev/sdb mklabel gpt-bios

parted: invalid token: gpt-bios
Error: Expecting a disk label type.

regards,
Jean
Michael Tautschnig
2009-03-17 20:52:37 UTC
Permalink
Post by Jean Spirat
Post by Michael Tautschnig
Sorry for the late reply; using disklabel:gpt-bios should finally work with
3.2.18+experimental3, at least the problem in the parser has been fixed :-)
Best,
Michael
sh-3.2# parted -s /dev/sdb mklabel gpt-bios
parted: invalid token: gpt-bios
Error: Expecting a disk label type.
That one should be fixed in 3.2.18+experimental4 which is just about to be built
and uploaded, but please be ready for more errors...

Thanks a lot for testing all the stuff,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20090317/dbe86445/attachment.bin
Jean Spirat
2009-03-18 18:25:28 UTC
Permalink
Post by Michael Tautschnig
That one should be fixed in 3.2.18+experimental4 which is just about to be built
and uploaded, but please be ready for more errors...
Thanks a lot for testing all the stuff,
Michael
this one worked for me with one issue only: in grub_pc the following
line fails for mdx as it says:


grub_dev=$(device2grub $BOOT_DEVICE)
if [ -z "$grub_dev" ] ; then
grub_dev=$(echo $BOOT_DEVICE | sed 's#/dev/##g')
fi


if boot_device is /dev/md0 it give (sda /dev/sdb) for grub_dev so it
fails. I searched for device2grub but cannot find any clue about how it
works.

in anycase the setup-storage part works for me.

regards,
Jean.
Michael Tautschnig
2009-03-18 18:45:22 UTC
Permalink
Post by Jean Spirat
Post by Michael Tautschnig
That one should be fixed in 3.2.18+experimental4 which is just about to be built
and uploaded, but please be ready for more errors...
Thanks a lot for testing all the stuff,
Michael
this one worked for me with one issue only: in grub_pc the following
grub_dev=$(device2grub $BOOT_DEVICE)
if [ -z "$grub_dev" ] ; then
grub_dev=$(echo $BOOT_DEVICE | sed 's#/dev/##g')
fi
if boot_device is /dev/md0 it give (sda /dev/sdb) for grub_dev so it
fails. I searched for device2grub but cannot find any clue about how it
works.
Hmm, do you have any idea whether the version of grub that you are using has
proper support for RAID devices? setup-storage does some hackery in that it sets
BOOT_DEVICE to the actual devices that make up the RAID device because earlier
versions of grub had no idea about RAID and LVM. I think, newer versions should
support it properly, but that will then depend on the version of grub you are
acutally using, meaning that we can either modify setup-storage to set
BOOT_DEVICE to /dev/md0 or hack the script to call device2grub for each device
(sda, sdb).
Post by Jean Spirat
in anycase the setup-storage part works for me.
Nice to know!

HTH,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20090318/eb8c7a04/attachment.bin
Jean Spirat
2009-03-18 18:56:39 UTC
Permalink
Post by Michael Tautschnig
Hmm, do you have any idea whether the version of grub that you are using has
proper support for RAID devices? setup-storage does some hackery in that it sets
BOOT_DEVICE to the actual devices that make up the RAID device because earlier
versions of grub had no idea about RAID and LVM. I think, newer versions should
support it properly, but that will then depend on the version of grub you are
acutally using, meaning that we can either modify setup-storage to set
BOOT_DEVICE to /dev/md0 or hack the script to call device2grub for each device
(sda, sdb).
i use grub_pc so it is grub2 ( 1.96) it support lvm/raid without any
problem.


ii grub-pc
1.96+20080724-16 GRand Unified Bootloader, version 2 (PC/BIOS


regards,
Jean
Michael Tautschnig
2009-03-18 19:38:11 UTC
Permalink
Post by Jean Spirat
Post by Michael Tautschnig
Hmm, do you have any idea whether the version of grub that you are using has
proper support for RAID devices? setup-storage does some hackery in that it sets
BOOT_DEVICE to the actual devices that make up the RAID device because earlier
versions of grub had no idea about RAID and LVM. I think, newer versions should
support it properly, but that will then depend on the version of grub you are
acutally using, meaning that we can either modify setup-storage to set
BOOT_DEVICE to /dev/md0 or hack the script to call device2grub for each device
(sda, sdb).
i use grub_pc so it is grub2 ( 1.96) it support lvm/raid without any
problem.
ii grub-pc
1.96+20080724-16 GRand Unified Bootloader, version 2 (PC/BIOS
Ok; it'll take me a few days to come up with a better solution (I don't think we
can yet fully switch to grub-pc). Could you, in the meantime, just put some hack
into your scripts to set BOOT_DEVICE to /dev/md0 to see which further errors we
need to get fixed?

Thanks,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20090318/705d3de7/attachment.bin
Jean Spirat
2009-03-20 10:55:33 UTC
Permalink
Post by Michael Tautschnig
Ok; it'll take me a few days to come up with a better solution (I don't think we
can yet fully switch to grub-pc). Could you, in the meantime, just put some hack
into your scripts to set BOOT_DEVICE to /dev/md0 to see which further errors we
need to get fixed?
Thanks,
Michael
for what i tested it works if i force the boot_device to md0.

So there is left in my plate:

lvm options
md options

and then i will be out of idea to tourment you Michael ! :)

regards,
Jean.
Michael Tautschnig
2009-03-20 12:27:04 UTC
Permalink
Post by Jean Spirat
Post by Michael Tautschnig
Ok; it'll take me a few days to come up with a better solution (I don't think we
can yet fully switch to grub-pc). Could you, in the meantime, just put some hack
into your scripts to set BOOT_DEVICE to /dev/md0 to see which further errors we
need to get fixed?
Thanks,
Michael
for what i tested it works if i force the boot_device to md0.
So, GPT (with BIOS) works? That would be great :-)
Post by Jean Spirat
lvm options
md options
Sure, that one is still in my inbox and definitely not forgotten!!
Post by Jean Spirat
and then i will be out of idea to tourment you Michael ! :)
Never say never ...

Best,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20090320/ec7d6f97/attachment.bin
Michael Tautschnig
2009-03-20 16:58:08 UTC
Permalink
Post by Michael Tautschnig
Post by Jean Spirat
Post by Michael Tautschnig
Hmm, do you have any idea whether the version of grub that you are using has
proper support for RAID devices? setup-storage does some hackery in that it sets
BOOT_DEVICE to the actual devices that make up the RAID device because earlier
versions of grub had no idea about RAID and LVM. I think, newer versions should
support it properly, but that will then depend on the version of grub you are
acutally using, meaning that we can either modify setup-storage to set
BOOT_DEVICE to /dev/md0 or hack the script to call device2grub for each device
(sda, sdb).
i use grub_pc so it is grub2 ( 1.96) it support lvm/raid without any
problem.
ii grub-pc
1.96+20080724-16 GRand Unified Bootloader, version 2 (PC/BIOS
Ok; it'll take me a few days to come up with a better solution (I don't think we
can yet fully switch to grub-pc). Could you, in the meantime, just put some hack
into your scripts to set BOOT_DEVICE to /dev/md0 to see which further errors we
need to get fixed?
Hmm, there seems to be some other problem, possibly with your config. Could you
send your disk_config file (of course, if you prefer, in private mail).

Thanks,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20090320/1f205a59/attachment.bin
Stephan Hermann
2009-03-13 08:26:43 UTC
Permalink
Hi,


On Wed, 11 Mar 2009 18:05:35 +0100
Post by Jean Spirat
hum in fact i am unable to make it work even with dos partitions...Is
this an issue with this version ?
The last time I played with GPT partition labels, there was no way to
tell grub to boot from gpt labeled partitions...I wonder if this
changed in the earlier past...I hope not.

Regards,

\sh
--
Stephan '\sh' Hermann | OSS Developer &
Systemadministrator JID: sh at linux-server.org |
http://www.sourcecode.de/ GPG ID: 0xC098EFA8 |
http://leonov.tv/ 3D8B 5138 0852 DA7A B83F DCCB C189 E733 C098 EFA8
Continue reading on narkive:
Loading...