Discussion:
Creating GPT BIOS partition with FAI 4.0.6
Bob Apodaca
2013-03-19 17:59:32 UTC
Permalink
I am trying to use a GPT partition scheme and my GRUB installation was
failing because I did not have a BIOS/GRUB partition. I've done some
searches and read the setup-storage manual page a few times, but it is
not obvious to me how to do this.

From the GRUB manual it appears parted can do it from the command-line

http://www.gnu.org/software/grub/manual/html_node/BIOS-installation.html

excerpt here:

# parted /dev/disk set partition-number bios_grub on

Here is an excerpt from my attempt:

disk_config disk1 disklabel:gpt bootable:1 fstabkey:uuid
primary - 8 bios_grub

but I get this error:

unknown/invalid filesystem type bios_grub (mkfs.bios_grub not found in PATH)

My next idea is to just create an ext2 partition with a "bios_grub"
label, then add a script to the end of the install to call parted with
the above command.

Any better ideas?
andrew bezella
2013-03-19 18:16:38 UTC
Permalink
Post by Bob Apodaca
disk_config disk1 disklabel:gpt bootable:1 fstabkey:uuid
primary - 8 bios_grub
unknown/invalid filesystem type bios_grub (mkfs.bios_grub not found in PATH)
unless this has changed in fai4, you would want to use
"disklabel:gpt-bios" instead of "gpt." the necessary bios_grub
partition should then be created automatically.
--
andrew bezella <abezella at archive.org>
Internet Archive
Bob Apodaca
2013-03-19 18:27:06 UTC
Permalink
Post by andrew bezella
unless this has changed in fai4, you would want to use
"disklabel:gpt-bios" instead of "gpt." the necessary bios_grub
partition should then be created automatically.
That's what I need to know. Thank you.
Thomas Neumann
2013-03-19 18:43:00 UTC
Permalink
Post by andrew bezella
Post by Bob Apodaca
disk_config disk1 disklabel:gpt bootable:1 fstabkey:uuid
unless this has changed in fai4, you would want to use
"disklabel:gpt-bios" instead of "gpt." the necessary bios_grub
partition should then be created automatically.
Yes this works. (But I don't like how it works.)

setup-storage will create a new partition and mark it and the location of this
'boot'-partition is at the beginning of the disk, but the partition index is
the next after the last defined partition, e.g.:

disk_config disk1 disklabel:gpt-bios
primary / 200M ext3 rw,errors=panic
primary - 400M swap -

will result in

1) sda3 - biosboot
2) sda1 - /
3) sda2 - swap

Yes this is mostly a cosmetical issue. I can understand why it has been done
this way. Still don't like 'out of order' partitioning. There's a workaround
to achieve 'ordered' partitions.

disk_config disk1 disklabel:gpt
primary - 1M - -
primary / 200M ext3 rw,errors=panic
primary - 400M swap -

However you _must_ set the required flag manually after the partitioning has
been done and before grub is being installed.

@Bob:

The reason why 'primary - 8 bios_grub' does not work is that setup-storage
only provides 'filesystem creation'- and 'filesystem mount'-options. But this
is not a filesystem issue. The required flag belongs to the partition layer.

bye
thomas
Soos Arpad
2013-03-27 08:24:43 UTC
Permalink
Post by Thomas Neumann
setup-storage will create a new partition and mark it and the location of this
'boot'-partition is at the beginning of the disk, but the partition index is
disk_config disk1 disklabel:gpt-bios
primary / 200M ext3 rw,errors=panic
primary - 400M swap -
will result in
1) sda3 - biosboot
2) sda1 - /
3) sda2 - swap
Yes this is mostly a cosmetical issue. I can understand why it has been done
this way. Still don't like 'out of order' partitioning. There's a workaround
to achieve 'ordered' partitions.
disk_config disk1 disklabel:gpt
primary - 1M - -
primary / 200M ext3 rw,errors=panic
primary - 400M swap -
However you _must_ set the required flag manually after the partitioning has
been done and before grub is being installed.
Well this is not at all a "cosmetical issue" as far my problems are
concerned. So I have to ask which programm ist doing the paetitioning.
And why it is not possible to manage it with a personal decission,
wether to do automatic paritioning or do it manually.

I?d like do have all clients trying netboot and if there's no server
using their normal installation. And if there is a fai-server, making
it possible to do fai boot but no pationing or do it on the other side.
So, partitioning is not at all just a "cosmetical issue".

Sorry for dissenting :-)
Arpad
Thomas Neumann
2013-03-27 08:56:06 UTC
Permalink
Post by Soos Arpad
Well this is not at all a "cosmetical issue" as far my problems are
concerned.
Sorry, but I fail to see the connection. I'm going to answer you further
comments step-by-step.
Post by Soos Arpad
So I have to ask which programm ist doing the paetitioning.
'setup-storage', but normally you don't have any direct contact with that.
Configuration is done via <config space>/disk_config/<classname> and performed
by the 'partition' task.
Post by Soos Arpad
And why it is not possible to manage it with a personal decission,
wether to do automatic paritioning or do it manually.
You can.

automatic: disklabel:gpt-bios
manual: disklabel:gpt

However 'gpt-bios' will result in a 'out-of-order' partition naming, like
described in my previous post.
Post by Soos Arpad
I?d like do have all clients trying netboot and if there's no server
using their normal installation.
???

This has absolutely nothing to do with this thread.
Post by Soos Arpad
And if there is a fai-server, making it possible to do fai boot but no
pationing or do it on the other side.
I don't understand. FAI isn't very useful if you netboot into a FAI-client
but don't perform some kind of partitioning. ('Keep & reuse all existing
partitions' is a special case, but it is also handled via the partitioning
task.)
Post by Soos Arpad
So, partitioning is not at all just a "cosmetical issue".
I was referring only to the 'out-of-order' issue. This was not a general
comment. Maybe that's where the misunderstanding comes from?

bye
thomas

Loading...