You are not logged in.

#1 2025-01-16 11:18:46

jebez
Member
Registered: 2025-01-15
Posts: 50

The source file(s) related to Unified kernel images of archinstall?

Hi

Unified kernel images: Enabled, I search how archinstall makes /boot/efi/boot/Linux/arch-linux.efi & arch-linux-fallback.efi ?

I don't find in https://github.com/archlinux/archinstall ...

It's to do it the Arch Linux, command line way.

Offline

#2 2025-01-16 11:34:38

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,738
Website

Re: The source file(s) related to Unified kernel images of archinstall?

I presume archinstall uses mkinitcpio to generate the UKIs. EDIT: mkinitcpio uses ukify(1) in the background.

There is a manual method in the wiki: https://wiki.archlinux.org/title/Unifie … e#Manually

Needs bash for the alignment maths and the GNU versions of objcopy & awk though, which caught me out trying to use it on a non-GNU system.

Last edited by Head_on_a_Stick (2025-01-16 11:38:34)


Para todos todo, para nosotros nada

Offline

#3 2025-01-16 16:47:09

Torxed
Member
Registered: 2013-01-10
Posts: 202

Re: The source file(s) related to Unified kernel images of archinstall?

Correct, we use `mkinitcpio -P`.
There's no magic invovled in archinstall in that regard.

If you want to follow along specifically how we do it:

The guided installer invokes the start for mkinitcpio here: https://github.com/archlinux/archinstal … ded.py#L75
Which calls a helper function here: https://github.com/archlinux/archinstal … er.py#L879

And here's how we call `mkinitcpio -P`: https://github.com/archlinux/archinstal … #L700-L731

Note, if you select UKI, archinstall will not run `mkinitcpio -P` but instead proceed to the bootloader step and set it up: https://github.com/archlinux/archinstal … py#L89-L92

Offline

#4 2025-01-16 17:04:22

jebez
Member
Registered: 2025-01-15
Posts: 50

Re: The source file(s) related to Unified kernel images of archinstall?

Thanks Torxed!

I finally found, how I installed Arch Linux CLI cool :

fdisk /dev/sdb
mkfs.f2fs /dev/sdb1
mkswap /dev/sdb2
mkfs.fat -F16 /dev/sdb3
mount /dev/sdb1 /mnt
mount --mkdir /dev/sdb3 /mnt/efi
mkdir /mnt/efi/efi
mkdir /mnt/efi/efi/boot
mkdir /mnt/etc
mkdir /mnt/etc/mkinitcpio.d
echo -e ALL_kver=/boot/vmlinuz-linux'\'nPRESETS=default'\'ndefault_uki=/efi/efi/boot/bootx64.efi>/mnt/etc/mkinitcpio.d/linux.preset
mkdir /mnt/etc/kernel
echo root=/dev/disk/by-id/usb-JetFlash_Transcend_32GB_01JDP4E3DVWKHULY-0:0-part1 resume=/dev/disk/by-id/usb-JetFlash_Transcend_32GB_01JDP4E3DVWKHULY-0:0-part2 rw>/mnt/etc/kernel/cmdline
pacstrap -K /mnt base linux linux-firmware networkmanager
sed -i 1s/x// /mnt/etc/passwd
echo unset HISTFILE>>/mnt/etc/bash.bashrc
echo -e /dev/disk/by-id/usb-JetFlash_Transcend_32GB_01JDP4E3DVWKHULY-0:0-part3 /efi'\'n/dev/disk/by-id/usb-JetFlash_Transcend_32GB_01JDP4E3DVWKHULY-0:0-part2 none swap>/mnt/etc/fstab

https://wiki.archlinux.org/title/Unified_kernel_image misses this info: it's possible to UKI to efi/boot/bootx64.efi (in the ESP), auto detected by the BIOS EFI (not legacy: MBR & PBR), no need to create a boot entry by efibootmgr.
Moreover if a boot entry is created by efibootmgr like https://wiki.archlinux.org/title/Unifie … _from_UEFI, if then the ESP is unplugged from the PC then the PC booted, the boot entry is deleted (at least for my PC), misses this info too.

Last edited by jebez (2025-01-16 20:03:47)

Offline

Board footer

Powered by FluxBB