Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1498527 - Disk partition doesn't allow 4 primary partitions on MSDOS disk layou
Summary: Disk partition doesn't allow 4 primary partitions on MSDOS disk layou
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: python-blivet
Version: 27
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
Assignee: Blivet Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
 
Reported: 2017-10-04 14:17 UTC by Peter Robinson
Modified: 2018-11-30 21:47 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-30 21:47:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
storage log (116.71 KB, text/plain)
2018-04-03 21:06 UTC, Paul Whalen
no flags Details
program log (45.77 KB, text/plain)
2018-04-03 21:06 UTC, Paul Whalen
no flags Details
packaging log (172.19 KB, text/plain)
2018-04-03 21:07 UTC, Paul Whalen
no flags Details
anaconda log (29.35 KB, text/plain)
2018-04-03 21:08 UTC, Paul Whalen
no flags Details
syslog (457.59 KB, text/plain)
2018-04-03 21:09 UTC, Paul Whalen
no flags Details

Description Peter Robinson 2017-10-04 14:17:52 UTC
4 primary partitions is a completely valid configuration for a disk layout, and while it won't allow for creation of further partitions it's still a correct and completely valid usecase.

We use an explicit 4 primary partitions for ARM SBCs which works fine with the old appliance-tools but doesn't with anaconda.

This configuration fails in the kickstart:

zerombr
clearpart --all --initlabel --disklabel=msdos
part /boot/fw --size=50 --fstype vfat --asprimary
part /boot --size=512 --fstype ext4 --asprimary --active
part swap --size=512 --fstype swap --asprimary
part / --size=2900 --fstype ext4 --asprimary

This is causing us problems (and complaints) for aarch64 SBC images in F-27 because people are expecting the same as the ARMv7 ones and they're not

Comment 1 Jiri Konecny 2017-10-05 06:27:10 UTC
Hello Peter,

Thank you for filing this bug here. As I see it, this limitation is based on our storage library so I'm changing components here.

Comment 2 David Lehman 2017-10-05 14:36:06 UTC
Please attach the logs and/or exact error messages so we can see exactly what is happening. There is nothing in blivet to prevent creation of four primary partitions on an msdos disklabel. I verified it yesterday.

Comment 3 Paul Whalen 2018-04-03 21:05:51 UTC
Using:

zerombr
clearpart --all --initlabel --disklabel=msdos
part /boot/efi --size=50 --fstype vfat --asprimary
part /boot --size=512 --fstype ext4 --asprimary --active
part swap --size=512 --fstype swap --asprimary
part / --size=3900 --fstype ext4 --asprimary

This now creates 4 partitions, but swap is created last. For disk images this prevents resizing the root partition.

Comment 4 Paul Whalen 2018-04-03 21:06:26 UTC
Created attachment 1416916 [details]
storage log

Comment 5 Paul Whalen 2018-04-03 21:06:59 UTC
Created attachment 1416917 [details]
program log

Comment 6 Paul Whalen 2018-04-03 21:07:32 UTC
Created attachment 1416918 [details]
packaging log

Comment 7 Paul Whalen 2018-04-03 21:08:15 UTC
Created attachment 1416919 [details]
anaconda log

Comment 8 Paul Whalen 2018-04-03 21:09:23 UTC
Created attachment 1416920 [details]
syslog

Comment 9 David Lehman 2018-04-04 19:06:00 UTC
It is not possible to directly control the ordering of partitions using kickstart. If you require that level of control you should create the partitions in %pre and use --onpart in the part commands.

Comment 10 Peter Robinson 2018-04-13 11:56:25 UTC
David: why does it work in ARMv7 then? Is it because of the weighting in blivet here: https://github.com/storaged-project/blivet/blob/master/blivet/devices/partition.py#L421

Comment 11 David Lehman 2018-04-13 13:52:17 UTC
Yes, weight is how we control the ordering there. To my knowledge weight is not exposed via kickstart, but it's been a while since I paid close attention to kickstart.

Comment 12 Peter Robinson 2018-04-13 13:57:06 UTC
(In reply to David Lehman from comment #11)
> Yes, weight is how we control the ordering there. To my knowledge weight is
> not exposed via kickstart, but it's been a while since I paid close
> attention to kickstart.

It works fine for the ARMv7 disk images, hence the reason this ticket was originally opened.

Comment 13 David Lehman 2018-05-29 19:47:47 UTC
I just took another look at this and I've arrived at the conclusion that your expectations here were probably quite reasonable. It seems that the missing piece is the fact that blivet.arch.is_arm() returns False on aarch64. This is probably related to word size, which is fine, but it means that, with the current code, aarch64 won't get root at the end of the disk.

I think this will require some way to differentiate between aarch64 appliances/images and servers. Once that is in place we can add code to properly weight the root fs on aarch64 images. Any suggestions for differentiating between aarch64 embedded/images and servers?

Comment 14 Peter Robinson 2018-05-30 09:59:19 UTC
> aarch64. This is probably related to word size, which is fine, but it means
> that, with the current code, aarch64 won't get root at the end of the disk.

It's checking for a string with "arm_machine.startswith('arm')" which on arm64 is 'aarch64' so it would fail.

> I think this will require some way to differentiate between aarch64
> appliances/images and servers. Once that is in place we can add code to
> properly weight the root fs on aarch64 images. Any suggestions for
> differentiating between aarch64 embedded/images and servers?

Why is there a need to differentiate?

Comment 15 David Lehman 2018-05-30 15:23:25 UTC
(In reply to Peter Robinson from comment #14)
> > aarch64. This is probably related to word size, which is fine, but it means
> > that, with the current code, aarch64 won't get root at the end of the disk.
> 
> It's checking for a string with "arm_machine.startswith('arm')" which on
> arm64 is 'aarch64' so it would fail.

Right. We probably don't want to change that, but we can expand the conditions under which we set the weight for the root fs to also include systems on which arch.is_aarch64() returns True.

> 
> > I think this will require some way to differentiate between aarch64
> > appliances/images and servers. Once that is in place we can add code to
> > properly weight the root fs on aarch64 images. Any suggestions for
> > differentiating between aarch64 embedded/images and servers?
> 
> Why is there a need to differentiate?

Will the servers also need the root fs to be at the end of the disk?

Comment 16 Ben Cotton 2018-11-27 15:33:52 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 17 Ben Cotton 2018-11-30 21:47:12 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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