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

arch: handle more boot paths for installs #247

Closed
wants to merge 2 commits into from

Conversation

c3Ls1US
Copy link
Contributor

@c3Ls1US c3Ls1US commented Sep 29, 2023

Fixes #246

Fixes anatol#246

In Arch Linux, we currently build and install the initramfs/kernel at /boot and assume that's the layout of the users' system. However, if /boot does not exists then the script will fail, thus leaving it up to the user to build the image and install at a boot path like /efi manually.
@@ -3,15 +3,25 @@
# find out all installed kernels
mapfile -d '' kernels < <(find /usr/lib/modules -maxdepth 1 -type d ! -name "modules" -print0)

# paths to boot partition for the initramfs image and kernel
boot_paths=("/efi" "/boot")
Copy link
Contributor Author

@c3Ls1US c3Ls1US Sep 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/boot/efi is technically also a valid boot partition path for systemd and from the mkinitcpio presets it appears Arch Linux assumes /efi by default. Since boot paths should be distribution dependent, choosing not to include /boot/efi

@anatol
Copy link
Owner

anatol commented Sep 29, 2023

Thank you! The change looks reasonable.

@Zile995
Copy link
Contributor

Zile995 commented Oct 7, 2023

The Arch Linux user actually needs to choose whether ESP will be mounted to /boot or /efi , ie. to decide whether initramfs will be installed on the ESP or the /boot directory (root partition)

For example, amd-ucode and intel-ucode are always installed in the /boot directory...
https://gitlab.archlinux.org/archlinux/packaging/packages/linux-firmware/-/blob/main/PKGBUILD?ref_type=heads#L111
https://gitlab.archlinux.org/archlinux/packaging/packages/intel-ucode/-/blob/main/PKGBUILD?ref_type=heads#L28
mkinitcpio also installs initramfs there by default, right?

So why change?

@c3Ls1US
Copy link
Contributor Author

c3Ls1US commented Oct 11, 2023

The Arch Linux user actually needs to choose whether ESP will be mounted to /boot or /efi , ie. to decide whether initramfs will be installed on the ESP or the /boot directory (root partition)

For example, amd-ucode and intel-ucode are always installed in the /boot directory... https://gitlab.archlinux.org/archlinux/packaging/packages/linux-firmware/-/blob/main/PKGBUILD?ref_type=heads#L111 https://gitlab.archlinux.org/archlinux/packaging/packages/intel-ucode/-/blob/main/PKGBUILD?ref_type=heads#L28 mkinitcpio also installs initramfs there by default, right?

So why change?

I'm closing this PR in favor of aligning to the distribution's current default paths. Going against the distro's standards just makes life harder and not having /boot doesn't appear to be common.

@c3Ls1US c3Ls1US closed this Oct 11, 2023
@c3Ls1US c3Ls1US deleted the boot-paths branch October 11, 2023 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

systemd-boot now can default to /efi as the folder for initramfs images. How does booster cope with that?
4 participants