You are not logged in.

#1 2022-09-11 12:51:27

Registered: 2020-03-26
Posts: 223

[improvement / idea] Mkinitcpio / pacstrap / (dracut ?) --uefi flag


I'm not sure where to post this, because even though it's mostly mkinitpcio stuff, it does span multiple projects (Arch installation Guide / pacstrap / possibly Dracut)

I would like to suggest an idea for the initramfs generation workflow. Basically, the idea would be to include some kind of a switch during the installation process (and in mkinitcpio), to choose between standard initramfs images and unified kernel images, and remember that choice. That switch would stay in that position unless switched to the other position.

For example, one would be able to run something similar to

# mkinitcpio -P --uefi --save 

This would be the equivalent of the current mkinitcpio command in the Installation Guide, except that :
* an EFI bundle is generated instead of an initramfs image
* the setting is saved (possibly in mkinitcpio.conf, or elsewhere) so that the next time mkinitcpio is triggered, it automatically generates an EFI bundle again.

pacstrap could have a similar switch :

# pacstrap --uefi /mnt base linux linux-firmware

This would pass on the switch to mkinitcpio, and possibly to dracut as well if this is used instead, so that the very first generation can be an EFI bundle (currently not easily feasible to my knowledge)

Without changing any of Arch's defaults or forcing anything onto anybody, this would would be a very easy way for a fresh install to use a unified kernel image instead of a regular initramfs. There's no reason for EFI bundles to become the default, but they're still very convenient and should be easier to use.

Right now mkinitpcio only understands

# mkinitcpio--uefi *filename*

which is nice, but needs to be run manually every time. Alternatively, the preset file must be manually modified, which is a very strange thing to do during the installation process. As a result, there is no simple way to perform a fresh install which leaves you with an EFI bundle instead of an initramfs img, even though an EFI bundle is a very convenient thing (automatic discovery by systemd-boot, future use with Secure Boot...)

Thanks for reading through this, hope to read your comments and ideas !

Jotting down other ideas

--save could be optional (automatic switching, but needs another flag for regular initrds)
--uefi yes/no

Last edited by Cvlc (2022-09-11 12:57:39)


#2 2022-09-12 12:17:12

From: Netherlands, Europe
Registered: 2005-10-04
Posts: 10,411

Re: [improvement / idea] Mkinitcpio / pacstrap / (dracut ?) --uefi flag

The arch wiki page mentions 2 options for booting a unified kernel image, systemd-boot and directly from efi firmware .
Can other bootloaders like ReFind and grub work with this ?

I feel this doesn't fit with pacstrap but should be dealt with in the "bootloader install" part of an installation .

Adding templates or presets for creating unified kernel images to mkinitcpio does seem like a reasonable idea.

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)


#3 2022-09-12 12:53:04

Registered: 2020-03-26
Posts: 223

Re: [improvement / idea] Mkinitcpio / pacstrap / (dracut ?) --uefi flag

It shouldn't be a problem for any bootloader.
See … rnel_image

The problem is in making that unified kernel image.

The only issue with pacstrap (not really pacstrap related) is that when mkinitcpio is installed it will be run for the first time and a very first initramfs will be generated, before there's a chance to configure it.


Board footer

Powered by FluxBB