You are not logged in.

#1 2020-01-14 19:52:02

syamajala
Member
From: here, there, everywhere
Registered: 2005-01-25
Posts: 617
Website

[SOLVED] initcpio not being generated after kernel upgrade with pacman

The pacman hook for generating a new initcpio when there is a kernel update no longer seems to be working for me. I see its running something because it prints ( 6/15) Updating linux initcpios... but there is never a initcpio image in /boot after it runs.

Last edited by syamajala (2020-01-20 00:52:36)

Offline

#2 2020-01-15 00:06:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: [SOLVED] initcpio not being generated after kernel upgrade with pacman

With what kernel package and what mkinitcpio package?

Offline

#3 2020-01-15 00:08:29

syamajala
Member
From: here, there, everywhere
Registered: 2005-01-25
Posts: 617
Website

Re: [SOLVED] initcpio not being generated after kernel upgrade with pacman

Packages are linux 5.4.11.arch1-1 and mkinitcpio 27-2

Offline

#4 2020-01-20 00:52:23

syamajala
Member
From: here, there, everywhere
Registered: 2005-01-25
Posts: 617
Website

Re: [SOLVED] initcpio not being generated after kernel upgrade with pacman

I finally figured it out. The issue is /etc/mkinitcpio.d/linux.preset no package seems to own that file, but it was empty for some reason. It needs to have this in it:

# mkinitcpio preset file for the 'linux' package

ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"

PRESETS=('default' 'fallback')

#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
#default_options=""

#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-fallback.img"
fallback_options="-S autodetect"

Offline

#5 2020-01-20 01:09:58

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED] initcpio not being generated after kernel upgrade with pacman

/etc/mkinitcpio.d/linux.preset should have been created by the pacman hook /usr/share/libalpm/hooks/90-mkinitcpio-install.hook
I would suggest checking /var/log/pacman.log to see if the hook was called and if it was if it failed.

Last edited by loqs (2020-01-20 01:10:13)

Offline

#6 2020-03-30 19:09:29

tbw
Member
Registered: 2017-01-01
Posts: 9

Re: [SOLVED] initcpio not being generated after kernel upgrade with pacman

I'm bumping this thread since I happened to have the very same issue and solved it very simply: I deleted the empty linux.preset file syamajala mentioned, and re-run the install of the linux package. The linux.preset file was correctly generated and all worked fine from there.

As to why and how the linux.preset file ended up being empty in the first place, I have no idea.

Offline

#7 2021-05-31 11:10:48

josealb77
Member
Registered: 2013-06-23
Posts: 90

Re: [SOLVED] initcpio not being generated after kernel upgrade with pacman

tbw wrote:

I'm bumping this thread since I happened to have the very same issue and solved it very simply: I deleted the empty linux.preset file syamajala mentioned, and re-run the install of the linux package. The linux.preset file was correctly generated and all worked fine from there.

As to why and how the linux.preset file ended up being empty in the first place, I have no idea.

I love you tbw. Same problem here and same solution, and as you, I have no idea why my linux.preset file was empty. THANK YOU A LOT.

Offline

#8 2023-03-08 15:51:16

probackup-nl
Member
From: Delft
Registered: 2017-11-15
Posts: 83
Website

Re: [SOLVED] initcpio not being generated after kernel upgrade with pacman

For the fellows that think that they can pacstrap without the "base" package, and somewhere along the way encounter:

(11/12) Updating linux initcpios...
/usr/share/libalpm/scripts/mkinitcpio: line 31: sed: command not found
==> WARNING: Preset file `/etc/mkinitcpio.d/linux.preset' is empty or does not contain any presets.

That will result in having an

empty /etc/mkinitcpio.d/linux.preset file

To resolve this situation, it might be wise to install the "base" package after all. Delete the preset.

# rm /etc/mkinitcpio.d/linux.preset

And when inside the arch-chroot already run

# pacman -S linux 

to re-generate /etc/mkinitcpio.d/linux.preset with the correct default content.

Offline

#9 2023-03-12 21:47:14

scruffidog
Member
Registered: 2010-01-10
Posts: 26

Re: [SOLVED] initcpio not being generated after kernel upgrade with pacman

Just out of curiosity, would it not make sense for the mkinitcpio pkg itself to have sed as a dependency explicitly listed ? This way, if base is not used for whatever reason, then at least it will get pulled in as part of the dependency resolution. The bonus is that dependency resolution gets more granular and detailed.

Last edited by scruffidog (2023-03-12 22:05:53)

Offline

#10 2023-03-13 13:37:28

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,096

Re: [SOLVED] initcpio not being generated after kernel upgrade with pacman

Without base, it isn't an Arch Linux install:

base package description wrote:

Minimal package set to define a basic Arch Linux installation

Offline

#11 2023-12-09 22:29:02

korimitsu
Member
Registered: 2016-08-14
Posts: 122

Re: [SOLVED] initcpio not being generated after kernel upgrade with pacman

Offline

#12 2023-12-09 22:32:04

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,783
Website

Re: [SOLVED] initcpio not being generated after kernel upgrade with pacman


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB