Bug 887560 - refuse to create wasted partition in a MBR partitioned disk if the user selects type biosboot for a mount point (there is no biosboot partition in the MBR partition scheme)
Summary: refuse to create wasted partition in a MBR partitioned disk if the user selec...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 19
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-16 12:46 UTC by Reartes Guillermo
Modified: 2013-05-25 22:08 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-05-24 21:42:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Snapshot #1: The ADD A MOUNT POINT DIALOG (74.03 KB, image/png)
2013-05-25 21:56 UTC, Reartes Guillermo
no flags Details
Snapshot #2: biosboot partition (69.52 KB, image/png)
2013-05-25 21:57 UTC, Reartes Guillermo
no flags Details
Snapshot #3: biosboot + other partitions (77.35 KB, image/png)
2013-05-25 21:58 UTC, Reartes Guillermo
no flags Details
Snapshot #4: Summary of Changes (101.30 KB, image/png)
2013-05-25 21:59 UTC, Reartes Guillermo
no flags Details

Description Reartes Guillermo 2012-12-16 12:46:34 UTC
Description of problem:

Currently, if one boots with 'gpt' boot parameter and one creates a 'biosboot' partition, it is used for the bootloader. That is ok.

However if one boots without the 'gpt' boot parameter, the 'biosboot' keyword will do something that is not expected. It will create a ID 83 (linux) partition and will not use it. Either a warning should be issued by anaconda or anaconda should not permit the creation of a 'biosboot' partition.
'biosboot' for msdos disk label does not exist, it is only meaningful for gpt labeled disks when booting in bios mode. 

Version-Release number of selected component (if applicable):
anaconda 18.37.2

How reproducible:
always

Steps to Reproduce:
0. Boot 
1. Enter STORAGE: INSTALLATION DESTINATION
2. Select the disk and do 'manual partitioning'
3. Delete all existing partitions if there are.
4. Create a 1mb biosboot partition
7. Create the rest of the partitons. /, swap, /boot.
8. Press 'finish partitioning'

If booting with 'gpt':
a biosboot partiton is created (gpt disklabel) for booting in bios mode.

Actual results:
If no 'gpt' parameter is specified:

No 'biosboot' partition is created since the disk will be msdos disklabel based.
in addition to that and silently, a partition id 83 'linux' is created with the size for the 'biosboot' partition and it is unused by the resulting system. It also wastes one primary partition for it.

Expected results:
when booting without 'gpt' boot parameter (using msdos disklabel) anaconda should issue a warning regarding any 'biosboot' partition that the user tries to create.

Additional info:

While it is possible to create multiple biosboot partitons with anaconda, it does not seem reasonable to have more than one biosboot partiton per gpt disk. Maybe warning should be issued when creating more than one biosboot partition per gpt disk.

Comment 1 Reartes Guillermo 2013-05-11 20:35:04 UTC
Like F18 Release, F19b TC4:

If one boots without the 'gpt' boot parameter, the 'biosboot' type of mount point will produce a wasted partition.

There is no such thing as a 'biosboot' partition in the MBR partition scheme. 

Anaconda instead (and without notice) creates an ID 83 (linux) partition and will not use it for anything.


Note: the 'gpt' boot parameter is currently broken. See bug 962104.

Comment 2 Brian Lane 2013-05-24 21:42:19 UTC
If they really want to make it there's no reason not to let them. Custom partitioning users are generally expected to know what they are doing.

Comment 3 Reartes Guillermo 2013-05-25 21:55:46 UTC
FROM: http://en.wikipedia.org/wiki/BIOS_Boot_partition

> The BIOS Boot partition is a partition on a data storage device that
> may be used by standard BIOS-based machines in order to boot when the
> partition table of the device is a GPT label.

So, bios boot partition requires a GPT disklabel.

> The Globally Unique Identifier for the BIOS Boot partition in the 
> GPT scheme is {21686148-6449-6E6F-744E-656564454649}[1] (which when
> written to a GPT in the required little endian fields, forms the ASCII 
> string "Hah!IdontNeedEFI"). 

So, bios boot partition GUID is 21686148-6449-6E6F-744E-656564454649


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

> When creating a BIOS Boot Partition on a GPT system, you should make
> sure that it is at least 31 KiB in size. (GPT-formatted disks are not 
> usually particularly small, so we  recommend that you make it larger 
> than the bare minimum, such as 1 MiB, to allow plenty of room for growth
> You must also make sure that it has the proper partition type. 

> Using GNU Parted, you can set this using a command such as the following:
 
> # parted /dev/disk set partition-number bios_grub on

> If you are using gdisk, set the partition type to ‘0xEF02’. 

> With partitioning programs that require setting the GUID directly, it 
> should be ‘21686148-6449-6e6f-744e656564454649’

> Some newer systems use the GUID Partition Table (GPT) format. This 
> was specified as part of the Extensible Firmware Interface (EFI), but
> it can also be used on BIOS platforms if system software supports it; 
> for example, GRUB and GNU/Linux can be used in this configuration.
> With this format, it is possible to reserve a whole partition for GRUB,
> called the BIOS Boot Partition. 
> GRUB can then be embedded into that partition without the risk of 
> being overwritten by other software and without being contained in a
> filesystem which might move its blocks around. 

So it has a specific function or purpose.

FROM: http://gptfdisk.git.sourceforge.net/git/gitweb.cgi?p=gptfdisk/gptfdisk;a=blob_plain;f=parttypes.cc;hb=HEADhttp://gptfdisk.git.sourceforge.net/git/gitweb.cgi?p=gptfdisk/gptfdisk;a=blob_plain;f=parttypes.cc;hb=HEAD

> // EFI system and related partitions
>   AddType(0xef00, "C12A7328-F81F-11D2-BA4B-00A0C93EC93B", "EFI System"); // Parted identifies these as having the "boot flag" set
>   AddType(0xef01, "024DEE41-33E7-11D3-9D69-0008C781F39F", "MBR partition scheme"); // Used to nest MBR in GPT
>   AddType(0xef02, "21686148-6449-6E6F-744E-656564454649", "BIOS boot partition"); // Used by GRUB
>   AddType(0xef03, "D3BFE2DE-3DAF-11DF-BA40-E3A556D89593", "Intel Fast Flash"); // Used by Intel Rapid Start technology

What is a bios boot partition?

So, a bios boot partition is a GPT partition which uses the GUID 21686148-6449-6E6F-744E-656564454649.
A bios boot partition purpose is to hold a bootloader (grub) when using a GPT disklabel on a BIOS System.
Other partitions that do not meet this criteria are not a bios boot partition.

Comment 4 Reartes Guillermo 2013-05-25 21:56:40 UTC
Created attachment 753167 [details]
Snapshot #1: The ADD A MOUNT POINT DIALOG

Comment 5 Reartes Guillermo 2013-05-25 21:57:23 UTC
Created attachment 753168 [details]
Snapshot #2: biosboot partition

Comment 6 Reartes Guillermo 2013-05-25 21:58:13 UTC
Created attachment 753169 [details]
Snapshot #3: biosboot + other partitions

Comment 7 Reartes Guillermo 2013-05-25 21:59:12 UTC
Created attachment 753170 [details]
Snapshot #4: Summary of Changes

Comment 8 Reartes Guillermo 2013-05-25 22:00:00 UTC
Bios Boot Partition in Anaconda's custom partitioning UI:


Snapshot #1:

The ADD A MOUNT POINT DIALOG:

Here you select 'biosboot' for 'bios boot partition'. 

Also please note that there are other items. Anaconda creates a swap when selecting swap,a / when creating a / etc. But not for biosboot when no gpt boot parameter is used.

Snapshot #2:

In this one, i created a 1m 'biosboot' partition.

Snapshot #3: 

In this one, i added the rest of the partitions.

Snapshot #4:  Summary of Changes:

In this one, you can see that anaconda is not creating a biosboot partition, it is creating other partiton. The diskabel is MSDOS instead of GPT (i even booted with gpt bootparameter but it is still broken due to bug 962104).

Comment 9 Reartes Guillermo 2013-05-25 22:08:16 UTC
@Brian C. Lane

> If they really want to make it there's no reason not to let them. 
Exactly, they want to create a Bios Boot Partition (biosboot) not something else.

> Custom partitioning users are generally expected to know what they are doing.
I do agree. The resulting partition table is not the expected one. It has the wrong Disklabel. (MSDOS instead of GPT).

Please re-open, for F19 it could be WONTFIX, but since it is something that needs to be changed/fixed for future versions it is best for it to remain open, even if it is not fixed for F19. 

I cannot even put ideas or comments for improvement if it is closed as a NOTABUG.

Please re-open.


Note You need to log in before you can comment on or make changes to this bug.