You are not logged in.

#1 2023-03-26 08:32:38

jancici
Member
From: svk
Registered: 2011-12-04
Posts: 192

[Solved] mkinitcpio is not able to create initram

I am upgrading from linux-6.2.7.arch1-1 to linux-6.2.8.arch1-1 and mkinitcpio end with errors

here is output form console:

(1/1) checking keys in keyring                                                         [##################################################] 100%
(1/1) checking package integrity                                                       [##################################################] 100%
(1/1) loading package files                                                            [##################################################] 100%
(1/1) checking for file conflicts                                                      [##################################################] 100%
(1/1) checking available disk space                                                    [##################################################] 100%
:: Running pre-transaction hooks...
(1/1) Removing linux initcpios...
:: Processing package changes...
(1/1) upgrading linux                                                                  [##################################################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/EFI/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/EFI/initramfs-linux.img
==> ERROR: '/lib/modules/6.2.7-arch1-1' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/EFI/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/EFI/initramfs-linux-fallback.img -S autodetect
==> ERROR: '/lib/modules/6.2.7-arch1-1' is not a valid kernel module directory
error: command failed to execute correctly
:: Looking for AUR upgrades...
:: Looking for devel upgrades...
 there is nothing to do

looks that vmlinuz-linux is not updated

here is list of files while I am on 6.2.7

ll /boot/EFI
drwxr-xr-x    - root 11 máj  2022 arch
.rwxr-xr-x  72M root 26 mar 10:25 initramfs-linux-fallback.img
.rwxr-xr-x  14M root 26 mar 10:25 initramfs-linux.img
.rwxr-xr-x 7,1M root 15 feb 01:22 intel-ucode.img
drwxr-xr-x    - root  2 mar 21:35 syslinux
.rwxr-xr-x  13M root 20 mar 07:43 vmlinuz-linux

and this is after update to 6.2.8

ll /boot/EFI 
drwxr-xr-x    - root 11 máj  2022 arch
.rwxr-xr-x 7,1M root 15 feb 01:22 intel-ucode.img
drwxr-xr-x    - root  2 mar 21:35 syslinux
.rwxr-xr-x  13M root 20 mar 07:43 vmlinuz-linux

it same for /boot/vmlinuz-linux which I am copy with mkinitcpio hook

this is my /etc/mkinitcpio.d/linux.preset

ESP_DIR="/boot/EFI"
ALL_config="/etc/mkinitcpio.conf"
ALL_kver="${ESP_DIR}/vmlinuz-linux"
cp -af /boot/vmlinuz-linux "${ESP_DIR}/"
[[ -e /boot/intel-ucode.img ]] && cp -af /boot/intel-ucode.img "${ESP_DIR}/"
[[ -e /boot/amd-ucode.img ]] && cp -af /boot/amd-ucode.img "${ESP_DIR}/"

PRESETS=('default' 'fallback')

default_image="${ESP_DIR}/initramfs-linux.img"

fallback_image="${ESP_DIR}/initramfs-linux-fallback.img"
fallback_options="-S autodetect"

maybe it is not problem of mkinitcpio
anyway, trying to find what cause problem, but I am not successful
thanks for help / tip

Last edited by jancici (2023-03-26 13:09:00)

Offline

#2 2023-03-26 09:52:49

philo
Member
Registered: 2015-01-26
Posts: 275

Re: [Solved] mkinitcpio is not able to create initram

Was that a partial upgrade?

Offline

#3 2023-03-26 12:46:26

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: [Solved] mkinitcpio is not able to create initram

That first cp command in the preset is causing the problem. The kernel is already being installed to ALL_kver with the new version, so now the one in /boot is the old, left over version that you're then overwriting the new kernel with. You went for a fragile, hacky setup.

Offline

#4 2023-03-26 12:59:53

jancici
Member
From: svk
Registered: 2011-12-04
Posts: 192

Re: [Solved] mkinitcpio is not able to create initram

well, it was working until now.
I did also check wiki where I did find that preset.

Last edited by jancici (2023-03-26 13:00:06)

Offline

#5 2023-03-26 13:08:14

jancici
Member
From: svk
Registered: 2011-12-04
Posts: 192

Re: [Solved] mkinitcpio is not able to create initram

ok, I did remove that first cp and it works now.

should I ask someone to update wiki?

Offline

#6 2023-03-26 15:02:12

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

Re: [Solved] mkinitcpio is not able to create initram

You can just update the wiki page yourself.

Offline

Board footer

Powered by FluxBB