No mkinitcpio preset present
10,321
Solution 1
Regenerate a new initramfs-linux.img
accordingly to the archlinux wiki:
mkinitcpio -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img -k 5.5.7-arch1-1
use ls /usr/lib/modules
to get the available kernel.
Solution 2
Had this recently. My solution was to chroot into the system from an Arch live system. Delete the empty linux.preset
in /etc/mkinitcpio.d/
and then run pacman -S linux
.
This regenerated the linux.preset
and the initramfs
was rebuild. After that Arch booted as usual.
Related videos on Youtube
Author by
R Harrington
Updated on September 18, 2022Comments
-
R Harrington over 1 year
My laptop lost battery during an update, so the linux kernel got truncated. After
arch-chroot
ing into it and reinstallinglinux
, it's OK, but/boot/initramfs-linux.img
(and the fallback) are empty. Also,/etc/mkinitcpio.d/linux.preset
is empty. How can I fix this, and how can I generate a preset?ls /etc/mkinitcpio.d/
returns nothing -
R Harrington about 4 yearsI just get
/usr/sbin/mkinitcpio: line 265: /etc/mkinitcpio.d/linux.preset: No such file or directory ==> ERROR: Failed to load preset: /etc/mkinitcpio.d/linux.preset'
on the second command -
R Harrington about 4 yearsYes, it's installed and I've reinstalled it
-
GAD3R about 4 years@RHarrington could you add the
ls /etc/mkinitcpio.d/
-
GAD3R about 4 years@RHarrington See my edit please.
-
R Harrington about 4 yearsI'm chrooted in, so I get
==> ERROR: '/lib/modules/5.1.0-050100-generic' is not a valid kernel module directory
because of my host's kernel. How can I fix this? -
GAD3R about 4 years@RHarrington see unix.stackexchange.com/questions/395402/…
-
R Harrington about 4 yearsLet us continue this discussion in chat.
-
7beggars_nnnnm over 2 yearsit is worked! correct
-
colin over 2 yearsDown-voted as this is not a permanent fix. You'll have to do this manually every time you upgrade linux. The other answer is a permanent fix.
-
colin over 2 yearsThis is a better answer because it fixes the problem permanently
-
GAD3R over 2 years@GaryvanderMerwe downvote is used for the wrong answer, not for the accepted answer.