Mail archive

[alpine-devel] How to rescue your edge box after the mkinitfs incident

From: Natanael Copa <>
Date: Thu, 27 Mar 2014 19:45:22 +0000


It turned out that there were 2 bugs in mkinitfs, one that only
affected uClibc and one that affected both uClibc and musl.

I thought I'd write how I rescued my laptop after it became unbootable
after upgrading to broken mkinitfs.

* Boot a rescue boot USB, with alpine v2.7

* Configure network (run setup-alpine -q for setting up the live

* make sure you have new apk-tools:

    apk upgrade -U

* I have my root on lvm so:
    apk add lvm2
    lvchange -a y vg0

* mount the root:

    mount -t /dev/vg0/lv_root /mnt

* mount the boot partition. In my case this is /dev/sda2:

    mount /dev/sda2 /mnt/boot

* I had to mount /mnt/proc otherwise readlink -f wouldn't work in the
  chroot. Not sure if it is needed for uclibc:

    mount --bind /proc /mnt/proc

* Upgrade the broken system:

    apk upgrade -U --root /mnt

* Verify that you get mkinitfs-2.6.0-r3 and check that mkinitfs trigger
  don't give any cpio errors.

* cleanup and reboot.

    umount /mnt/proc /mnt/boot /mnt

That should be it.


Received on Thu Mar 27 2014 - 19:45:22 UTC