You are not logged in.
/etc/mkinitcpio.d/linux.preset
ALL_kver=$(ls /usr/lib/modules)
PRESETS=
_uki=/efi/efi/boot/bootx64.efiSee my config under.
I tested (well by
sudo mkinitcpio -P, I not reinstalled my Arch Linux KDE) it works! /boot/vmlinuz-linux not even exists (I used a /etc/mkinitcpio.d/linux.preset like https://wiki.archlinux.org/title/Unifie … reset_file , with _kver=/boot/vmlinuz-linux).
Since in
man mkinitcpio& https://wiki.archlinux.org/title/Unified_kernel_image there isn't the *_kver=$(ls /usr/lib/modules) technique, I wonder if it's OK? No problemo? If yes, need update, add this technique in this man page & this wiki page .
Last edited by jebez (2025-12-19 19:26:41)
Arch Linux KDE, my config https://bbs.archlinux.org/viewtopic.php … 5#p2221235
Offline
Moderator Note
Not an installation topic, moving to Kernel & Hardware.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
It's a value that is irrelevant and will not be read. If you unset $PRESETS it will simply default to a "sane" set of standard values: https://gitlab.archlinux.org/archlinux/ … tcpio#L104 -- so yes unsetting PRESETS could be an option if you don't have/want to have any presets
But this would also mean that your _uki path won't get parsed so you'll likely break on the next actual kernel update because bootx64.efi isn't getting updated. So no for your usecase and assuming you are actually booting that boot64.efi you'd break
Last edited by V1del (2025-12-18 11:11:48)
Offline
Do you mean e.g.:
ALL_kver=$(ls /usr/lib/modules)
PRESETS=a
a_uki=/efi/efi/boot/bootx64.efi? Well I like minimalism, the linux.preset of my 1st post works:
[a@archlinux ~]$ sudo mkinitcpio -P
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: ''
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k 6.18.1-arch1-2 -U /efi/efi/boot/bootx64.efi
==> Starting build: '6.18.1-arch1-2'
-> Running build hook: [base]
-> Running build hook: [systemd]
-> Running build hook: [autodetect]
findmnt: /etc/fstab: parse error at line 1 -- ignored
-> Running build hook: [microcode]
-> Running build hook: [modconf]
-> Running build hook: [kms]
==> WARNING: Possibly missing firmware for module: 'nouveau'
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [sd-vconsole]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Creating unified kernel image: '/efi/efi/boot/bootx64.efi'
==> Unified kernel image generation successfulthe 2nd line: Building image from preset: /etc/mkinitcpio.d/linux.preset: '' so empty counts as a preset name as "a" or whatever, you're wrong V1del.
Last edited by jebez (2025-12-19 08:19:35)
Arch Linux KDE, my config https://bbs.archlinux.org/viewtopic.php … 5#p2221235
Offline
As https://bbs.archlinux.org/viewtopic.php?id=307447 see my previous post.
Arch Linux KDE, my config https://bbs.archlinux.org/viewtopic.php … 5#p2221235
Offline
1. don't parse ls
2. what happens if there're more than one kernels installed or stale residual modules?
3. $(pacman -Q linux | cut -d" " -f 2)
4. What are you trying to achieve here?
Offline
1. because of 2.?
2. the latest version? It would be nice.
3. oh an other way, now I hesitate...
4. well an UKI, see my config, my signature.
Feature request:
If no _kver in /etc/mkinitcpio.d/linux.preset , by default mkinitcpio takes the latest installed version of Linux (that can be later than the running kernel, after upgrade of Linux).
https://archlinux.org/packages/core/any/mkinitcpio/ , https://gitlab.archlinux.org/archlinux/ … mkinitcpio , but I'm still not registered to gitlab.archlinux.org ...
Last edited by jebez (2025-12-18 16:37:43)
Arch Linux KDE, my config https://bbs.archlinux.org/viewtopic.php … 5#p2221235
Offline
In a shell script you can use globbing or `find` instead of trying to parse the output of `ls` which was not designed for that use case.
Offline
If no _kver in /etc/mkinitcpio.d/linux.preset , by default mkinitcpio takes the latest installed version of Linux (that can be later than the running kernel, after upgrade of Linux).
https://man.archlinux.org/man/mkinitcpi … UT_PRESETS
Why would there be no *_kver in the preset and what is the "latest installed version of Linux" and how is that different from /boot/vmlinuz-linux ?
Offline
no *_kver in the preset: why not? If nothing, by default mkinitcpio takes the latest /usr/lib/modules/a_version .
Read entirely my 1st post:
/boot/vmlinuz-linux not even exists
Arch Linux KDE, my config https://bbs.archlinux.org/viewtopic.php … 5#p2221235
Offline
Yeah, sure, but you can direct that to any file…
why not?
Because then the file is underspecified and a user error (could be a typo) leads to hidden errors (and some kernel version is picked up for a completely different kernel)
Offline
I not understood... but as I said https://bbs.archlinux.org/viewtopic.php … 6#p2278626 I wanna create the feature request but same story: I'm still not registered to gitlab.archlinux.org ; argh!
Arch Linux KDE, my config https://bbs.archlinux.org/viewtopic.php … 5#p2221235
Offline
I apologize for intrusion, I re-read the topic several times but didn't get what problem you are trying to solve. What is the goal?
Offline
See
man mkinitcpioMy question was if
/etc/mkinitcpio.d/linux.preset
ALL_kver=$(ls /usr/lib/modules)
PRESETS=
_uki=/efi/efi/boot/bootx64.efiis OK, no problemo, since I've 1 kernel on my PC, 1 /usr/lib/modules/a_version : it's OK.
Now I wanna create the feature request to https://gitlab.archlinux.org/archlinux/ … mkinitcpio :
If no *_kver in /etc/mkinitcpio.d/linux.preset (*_kver is required), by default mkinitcpio takes the latest version of a linux* package, the linux* packages classified with linux in 1st, & why not e.g. ALL_kver=*-lts for the latest linux-lts .
But as https://bbs.archlinux.org/viewtopic.php … 2#p2277712 I'm still not registered at gitlab.archlinux.org , so I can't.
Last edited by jebez (2025-12-19 09:29:04)
Arch Linux KDE, my config https://bbs.archlinux.org/viewtopic.php … 5#p2221235
Offline
The preset is generated from a template that has to work with *all* kernels. This will not work.
Offline
My question was if ... is OK, no problemo, since I've 1 kernel on my PC, 1 /usr/lib/modules/a_version : it's OK.
ALL_kver=$(ls /usr/lib/modules) is not ok. In addition to mentioned `ls` output parsing and multiple kernels installed, presets in a single /etc/mkinitcpio.d/* file allow to generate different images for the same kernel package. In particular, /etc/mkinitcpio.d/linux.preset is for kernel provided by linux package. For another kernel variant another preset file can be used.
In your /etc/mkinitcpio.d/linux.preset you can write whatever works for you, but why change mkinitcpio?
Now I wanna create the feature request to https://gitlab.archlinux.org/archlinux/ … mkinitcpio :
If no *_kver in /etc/mkinitcpio.d/linux.preset , by default mkinitcpio takes the latest /usr/lib/modules/a_version (*_kver is required).
What existing problem such feature is supposed to solve?
6.12.62-1-lts
6.17.11-hardened1-1-hardened
6.18.1-arch1-2
6.18.1-arch1-2-test
Which one is the latest?
Offline
ALL_kver=$(ls /usr/lib/modules) in my case is OK, but justly my feature request to throw in the nettles ALL_kver=$(ls /usr/lib/modules) .
Indeed, see my edited previous post.
Arch Linux KDE, my config https://bbs.archlinux.org/viewtopic.php … 5#p2221235
Offline
justly my feature request
Spoiler: this is not gonna happen for all the reasons mention in this thread.
You're turning aspects about your personal system into general assumptions.
And you've never addressed
What are you trying to achieve here?
What existing problem such feature is supposed to solve?
Because this has nothing do do w/ UKIs at all.
Offline
My feature request to throw in the nettles ALL_kver=$(ls /usr/lib/modules) justly for all cases, not only mine, & I said I like minimalism so a /etc/mkinitcpio.d/linux.preset even minimal.
Last edited by jebez (2025-12-19 09:08:55)
Arch Linux KDE, my config https://bbs.archlinux.org/viewtopic.php … 5#p2221235
Offline
The preset /is/ minimal.
A preset w/o a kver simply doesn't cover any kernel
Turning that into it covering any random kernel, that might or not exist, serves no benefit and if you install a second kernel you'll now have edit one of them manually anyway.
Offline
See my again edited https://bbs.archlinux.org/viewtopic.php … 4#p2278714 .
Arch Linux KDE, my config https://bbs.archlinux.org/viewtopic.php … 5#p2221235
Offline
Referring to the same nonsense again and again doesn't make it less nonsensical and that's pretty much all I got left to say.
Offline
Again edited, I not understand your nonsense.
Arch Linux KDE, my config https://bbs.archlinux.org/viewtopic.php … 5#p2221235
Offline
The thing is that that ls makes no sense in a general context, as soon as you have more than one kernel setting any form of _kver that way will be wrong anyway. Or is you goal a single preset that autogenerates multiple images based on an arbitrary identifier? Since you don't have multiple kernels and that's want you want to operate you can well just drop the _kver entirely, or just have it statically refer to the one version you already have anyway, why do you want a pseudo dynamic ls call there?
Last edited by V1del (2025-12-19 11:03:40)
Offline
In computer science, in general, when a setting is not set, there must be a default.
It's not the case for *_kver:
/etc/mkinitcpio.d/linux.preset
PRESETS=
_uki=/efi/efi/boot/bootx64.efi[a@archlinux ~]$ sudo mkinitcpio -P
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: ''
==> WARNING: No kernel version specified. Skipping image ''Yes I bet it's possible to do my feature request with
ls /usr/lib/modules|some commandsLast edited by jebez (2025-12-19 15:04:50)
Arch Linux KDE, my config https://bbs.archlinux.org/viewtopic.php … 5#p2221235
Offline