Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move /boot filesystem to partition 3 #669

Closed
bgilbert opened this issue Nov 10, 2020 · 3 comments · Fixed by coreos/coreos-assembler#1820
Closed

Move /boot filesystem to partition 3 #669

bgilbert opened this issue Nov 10, 2020 · 3 comments · Fixed by coreos/coreos-assembler#1820
Assignees

Comments

@bgilbert
Copy link
Contributor

Describe the enhancement

The current x86_64 partition layout looks like this:

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          788479   384.0 MiB   8300  boot
   2          788480         1048575   127.0 MiB   EF00  EFI-SYSTEM
   3         1048576         1050623   1024.0 KiB  EF02  BIOS-BOOT
   4         1050624        16777182   7.5 GiB     8300  root

with the BIOS-BOOT partition omitted from the 4Kn image. Change it to look like this:

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            4095   1024.0 KiB  EF02  BIOS-BOOT
   2            4096          264191   127.0 MiB   EF00  EFI-SYSTEM
   3          264192         1050623   384.0 MiB   8300  boot
   4         1050624        16777182   7.5 GiB     8300  root

with the BIOS-BOOT partition included in the 4Kn image. Likewise move /boot to partition 3 on non-x86 arches.

System details

All platforms

Additional information

We're planning to implement #581 via Dracut glue in the initramfs, activated by an Ignition config. Users will be able to write some FCC sugar to specify a mirrored disk layout. This will desugar to an Ignition config which creates the appropriate partitions on each of the mirrored disks, and the Dracut glue will then handle copying the necessary data. The detailed proposal is in coreos/enhancements#3 and a WIP PR is in coreos/fedora-coreos-config#718.

To avoid rerunning grub-install from the initramfs, the recreated BIOS-BOOT partition needs to be at the same offset as the old one. Currently that offset is 512 MiB, since BIOS-BOOT comes after /boot and the ESP. That constant is awkward to hardcode into FCCT. Thus, we're planning to swap BIOS-BOOT and /boot so BIOS-BOOT is at the beginning of the disk.

Everything that wants to mount /boot should be doing it by filesystem label (or partition label), not by index, but we wanted to raise this issue for visibility.

@jamescassell
Copy link
Collaborator

Everything that wants to mount /boot should be doing it by filesystem label (or partition label), not by index, but we wanted to raise this issue for visibility.

I admire your optimism!

Are there plans to transition existing systems? (would bootupd handle something like this?)

@bgilbert
Copy link
Contributor Author

Are there plans to transition existing systems?

Nope. The change should only affect Ignition, which isn't relevant after the first boot.

dustymabe added a commit to dustymabe/fedora-coreos-config that referenced this issue Dec 3, 2020
The boot filesystem was moved to partition 3 recently. Let's
update the code to be a little more dynamic about finding the
boot paritition so we can be forward and backward compatible.

For more context see:

- coreos/fedora-coreos-tracker#669
- coreos/coreos-assembler#1820
cgwalters pushed a commit to coreos/fedora-coreos-config that referenced this issue Dec 3, 2020
The boot filesystem was moved to partition 3 recently. Let's
update the code to be a little more dynamic about finding the
boot paritition so we can be forward and backward compatible.

For more context see:

- coreos/fedora-coreos-tracker#669
- coreos/coreos-assembler#1820
@dustymabe
Copy link
Member

The fix for this went into stable stream release 32.20201104.3.0.

kelvinfan001 pushed a commit to kelvinfan001/fedora-coreos-config that referenced this issue Dec 14, 2020
The boot filesystem was moved to partition 3 recently. Let's
update the code to be a little more dynamic about finding the
boot paritition so we can be forward and backward compatible.

For more context see:

- coreos/fedora-coreos-tracker#669
- coreos/coreos-assembler#1820
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants