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 3 monthsMy laptop lost battery during an update, so the linux kernel got truncated. After
arch-chrooting into it and reinstallinglinux, it's OK, but/boot/initramfs-linux.img(and the fallback) are empty. Also,/etc/mkinitcpio.d/linux.presetis empty. How can I fix this, and how can I generate a preset?ls /etc/mkinitcpio.d/returns nothing -
R Harrington almost 3 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 almost 3 yearsYes, it's installed and I've reinstalled it -
GAD3R almost 3 years@RHarrington could you add thels /etc/mkinitcpio.d/ -
GAD3R almost 3 years@RHarrington See my edit please. -
R Harrington almost 3 yearsI'm chrooted in, so I get==> ERROR: '/lib/modules/5.1.0-050100-generic' is not a valid kernel module directorybecause of my host's kernel. How can I fix this? -
GAD3R almost 3 years@RHarrington see unix.stackexchange.com/questions/395402/… -
R Harrington almost 3 yearsLet us continue this discussion in chat. -
7beggars_nnnnm about 1 yearit is worked! correct -
colin about 1 yearDown-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 about 1 yearThis is a better answer because it fixes the problem permanently -
GAD3R about 1 year@GaryvanderMerwe downvote is used for the wrong answer, not for the accepted answer.