You are not logged in.

#1 2024-02-17 18:03:31

foux
Member
Registered: 2024-02-17
Posts: 3

Deleting initramfs after generating UKI

Hi there,

I've switch to UKI and am happy with them. But I'd like to automatically delete the (now useless) initramfs each time the generation of the UKI is done (I'm using mkinitcpio).

Is there a way to automate this?

Thanks!

Offline

#2 2024-02-17 22:11:48

ectospasm
Member
Registered: 2015-08-28
Posts: 273

Re: Deleting initramfs after generating UKI

This depends highly on how you're building the UKI.  If you're using mkinitcpio, you should be able to pass a hook or install script that cleans up the initrd images after the UKI is built and placed where it needs to go.

I use kernel-install with ukify, so I'd want to place the commands to clean up the initrd images in /etc/kernel/install.d/99-clean-initrd.install.  I haven't tested this, but that should run after all the other kernel-install plugins run.

Offline

#3 2024-02-18 08:27:13

foux
Member
Registered: 2024-02-17
Posts: 3

Re: Deleting initramfs after generating UKI

Yeah, I guess that's the way but I can't seem to find the way to run a post-install script with mkinitcpio

Offline

#4 2024-02-18 09:00:09

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 607

Re: Deleting initramfs after generating UKI

https://wiki.archlinux.org/title/Unifie … reset_file:

Unified kernel image#.preset file wrote:

Optionally, comment out PRESET_image= to avoid storing a redundant initramfs-*.img file

Offline

#5 2024-02-18 09:02:39

foux
Member
Registered: 2024-02-17
Posts: 3

Re: Deleting initramfs after generating UKI

nl6720 wrote:

https://wiki.archlinux.org/title/Unifie … reset_file:

Unified kernel image#.preset file wrote:

Optionally, comment out PRESET_image= to avoid storing a redundant initramfs-*.img file

Damn, it was under my nose....

Thanks!

Offline

Board footer

Powered by FluxBB