You are not logged in.

#1 2014-03-12 06:02:17

sandy8925
Member
Registered: 2013-06-25
Posts: 22

[SOLVED] mkinitcpio silently fails to build initramfs image

I faced this annoying problem where mkinitcpio kept generating 20-byte initramfs images (for normal and fallback).

The first symptom was being unable to boot. Kept getting error messages about junk in the initramfs image. I suspected a corrupted file. Used chroot, tried reinstalling the linux package, regenerating using mkinitcpio - didn't solve the problem.

Then, I checked the /boot directory and found that the initramfs images were 20 bytes! mkinitcpio was generating 20-byte images (essentially empty images). It had done so on the last kernel upgrade.

I was able to copy initramfs images from another Arch installation (same architecture, same kernel version) and boot Arch. I was unable to figure out why mkinitcpio was doing so. I tried reinstalling a few core packages (the build tools, grep etc.) but they didn't help.

I gave up and tried the brute force method of reinstalling all packages. It was then that pacman complained about conflicting files for libarchive - libarchive! I remembered that there had been a forced shutdown at some time when packages were being updated. libarchive.so was corrupted/missing and had to be copied from another system (pacman wouldn't function without it). I hadn't reinstalled libarchive then. I did so now, and voila! mkinitcpio worked properly again.

TLDR - If mkinicpio is not generating images properly, some tool it depends on (or mkinitcpio) is failing silently/is missing/is corrupt. Reinstall those things.

Offline

#2 2014-03-12 06:03:55

sandy8925
Member
Registered: 2013-06-25
Posts: 22

Re: [SOLVED] mkinitcpio silently fails to build initramfs image

I feel silly!

 pactree -u mkinitcpio 

would have given me the list of packages I needed to reinstall.

Offline

Board footer

Powered by FluxBB