[2.x+] Setting a 'boot' flag on a disk on a EFI system causes a GPT header/partition to be created even if '/boot/ef'i is on a different disk.

Bug #1774665 reported by Jason Hobbs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Medium
Unassigned

Bug Description

I have a machine with two available disks of the same size, without any partitions or partition table (sda and sdb):

http://paste.ubuntu.com/p/zfXZKFqf9N/

I then create a raid-1 set of the two disks, telling maas to use the entire disks. However, maas creates a partition on one of the disks, and uses all of the other disk:

http://paste.ubuntu.com/p/39Sh7y7j2V/

The expected behavior is that all of both disks are used for the raid set. In a 2 disk raid 1 setup, either disk could be lost, so there shouldn't be anything special about either disk.

Apparently this is because it wants to install grub on one of the disks. This system uses UEFI to boot - it doesn't need grub installed that way; there will be a /boot/efi partition on another disk.

This is with maas 2.3.3.

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Why was this marked as a duplicate? I don't want grub installed on either disk.

description: updated
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Jason,

Based on your last comment, then your bug report is unclear.

In the bug description you have said:

"I then create a raid-1 set of the two disks, telling maas to use the entire disks. However, maas creates a partition on one of the disks, and uses all of the other disk:"

and

"The expected behavior is that all of both disks are used for the raid set. In a 2 disk raid 1 setup, either disk could be lost, so there shouldn't be anything special about either disk."

So, based on your description "Since maas is using the entire disk, and both disk shouldn't be anything special, and either disk could be lost" then both disk in the RAID require the GPT partition for the bootloader.

All machines in EFI are installed with GPT, and hence, require a partition.

As such, could you please clarify your bug report?

Changed in maas:
status: New → Incomplete
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

This seems like a shortcoming in how maas models efi vs bios. On an efi system, there should not be a 'Boot' flag available for disks.

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Andres, I'm not using either of these disks to host the efi partition, and that's not being created by maas in any case. It's just putting a gpt partition table on one disk and making one partition, which is being put into the raid set. I believe it's doing this because it thinks grub for bios will be installed on that disk since it's marked with the 'boot' flag.

"All machines in EFI are installed with GPT, and hence, require a partition." I don't understand this. You don't need a GPT on all disks when using EFI, only on the disk that is hosting the EFI partition.

In this setup I have:

1 x NVME - this hosts /boot/efi, /
2 x HDD - this is a raid 1 set

After commissioning, the 'boot' flag is set on one of the HDD's, and when I go to create the raid set with the entire disk, it creates a GPT on one of the HDD's so it can install grub there, even though I'm using EFI on the system and don't want grub installed that way.

The workaround is to set the boot flag on the nvme disk instead, but I shouldn't have to set the boot flag - it is only for legacy/bios boot, which I'm not using, and should have no effect.

Changed in maas:
status: Incomplete → New
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Ok, I see what you are saying.

So to be clear, what we are saying is that the GPT partition should only ever be where /boot/efi is defined regardless of the 'boot' flag. In other words, the 'Boot' flag doesn't really matter on a EFI system since /boot/efi defines where the GPT is.

Changed in maas:
importance: Undecided → Medium
milestone: none → 2.5.0
status: New → Triaged
summary: - MAAS creates GPT header and partition on one disk when creating a 2 disk
- raid-1 set
+ [2.x+] Setting a 'boot' flag on a disk on a EFI system causes a GPT
+ header/partition to be created even if /boot/efi is on a different disk.
summary: [2.x+] Setting a 'boot' flag on a disk on a EFI system causes a GPT
- header/partition to be created even if /boot/efi is on a different disk.
+ header/partition to be created even if '/boot/ef'i is on a different
+ disk.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

A potential solution could be to automatically create /boot/efi on the disk with the boot flag, and/or allow to override it if the user manually creates /boot/efi and/or MAAS does.

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

How about actually modeling whether or not a machine is EFI or BIOS?

Revision history for this message
Andres Rodriguez (andreserl) wrote : Re: [Bug 1774665] Re: [2.x+] Setting a 'boot' flag on a disk on a EFI system causes a GPT header/partition to be created even if '/boot/ef'i is on a different disk.

That’s already modeled.

On Fri, Jun 1, 2018 at 3:41 PM Jason Hobbs <email address hidden>
wrote:

> How about actually modeling whether or not a machine is EFI or BIOS?
>
> --
> You received this bug notification because you are subscribed to MAAS.
> https://bugs.launchpad.net/bugs/1774665
>
> Title:
> [2.x+] Setting a 'boot' flag on a disk on a EFI system causes a GPT
> header/partition to be created even if '/boot/ef'i is on a different
> disk.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/maas/+bug/1774665/+subscriptions
>
> Launchpad-Notification-Type: bug
> Launchpad-Bug: product=maas; milestone=2.5.0; status=Triaged;
> importance=Medium; assignee=None;
> Launchpad-Bug-Tags: cdo-qa foundations-engine
> Launchpad-Bug-Information-Type: Public
> Launchpad-Bug-Private: no
> Launchpad-Bug-Security-Vulnerability: no
> Launchpad-Bug-Commenters: andreserl jason-hobbs
> Launchpad-Bug-Reporter: Jason Hobbs (jason-hobbs)
> Launchpad-Bug-Modifier: Jason Hobbs (jason-hobbs)
> Launchpad-Message-Rationale: Subscriber (MAAS)
> Launchpad-Message-For: andreserl
>
--
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Fantastic - then 'boot' flag should be ignored on EFI systems.

On Fri, Jun 1, 2018 at 3:31 PM, Andres Rodriguez
<email address hidden> wrote:
> That’s already modeled.
>
> On Fri, Jun 1, 2018 at 3:41 PM Jason Hobbs <email address hidden>
> wrote:
>
>> How about actually modeling whether or not a machine is EFI or BIOS?
>>
>> --
>> You received this bug notification because you are subscribed to MAAS.
>> https://bugs.launchpad.net/bugs/1774665
>>
>> Title:
>> [2.x+] Setting a 'boot' flag on a disk on a EFI system causes a GPT
>> header/partition to be created even if '/boot/ef'i is on a different
>> disk.
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/maas/+bug/1774665/+subscriptions
>>
>> Launchpad-Notification-Type: bug
>> Launchpad-Bug: product=maas; milestone=2.5.0; status=Triaged;
>> importance=Medium; assignee=None;
>> Launchpad-Bug-Tags: cdo-qa foundations-engine
>> Launchpad-Bug-Information-Type: Public
>> Launchpad-Bug-Private: no
>> Launchpad-Bug-Security-Vulnerability: no
>> Launchpad-Bug-Commenters: andreserl jason-hobbs
>> Launchpad-Bug-Reporter: Jason Hobbs (jason-hobbs)
>> Launchpad-Bug-Modifier: Jason Hobbs (jason-hobbs)
>> Launchpad-Message-Rationale: Subscriber (MAAS)
>> Launchpad-Message-For: andreserl
>>
> --
> Andres Rodriguez (RoAkSoAx)
> Ubuntu Server Developer
> MSc. Telecom & Networking
> Systems Engineer
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1774665
>
> Title:
> [2.x+] Setting a 'boot' flag on a disk on a EFI system causes a GPT
> header/partition to be created even if '/boot/ef'i is on a different
> disk.
>
> Status in MAAS:
> Triaged
>
> Bug description:
> I have a machine with two available disks of the same size, without
> any partitions or partition table (sda and sdb):
>
> http://paste.ubuntu.com/p/zfXZKFqf9N/
>
> I then create a raid-1 set of the two disks, telling maas to use the
> entire disks. However, maas creates a partition on one of the disks,
> and uses all of the other disk:
>
> http://paste.ubuntu.com/p/39Sh7y7j2V/
>
> The expected behavior is that all of both disks are used for the raid
> set. In a 2 disk raid 1 setup, either disk could be lost, so there
> shouldn't be anything special about either disk.
>
> Apparently this is because it wants to install grub on one of the
> disks. This system uses UEFI to boot - it doesn't need grub installed
> that way; there will be a /boot/efi partition on another disk.
>
> This is with maas 2.3.3.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/maas/+bug/1774665/+subscriptions

Changed in maas:
milestone: 2.5.0 → 2.5.x
Revision history for this message
Adam Collard (adam-collard) wrote :

This bug has not seen any activity in the last 6 months, so it is being automatically closed.

If you are still experiencing this issue, please feel free to re-open.

MAAS Team

Changed in maas:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.