Mail archive
alpine-devel

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

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Fri, 28 Mar 2014 17:05:07 +0100

On Thu, 27 Mar 2014 16:46:52 -0300
Alan Messias <alancordeiro_at_gmail.com> wrote:

> Is it useful to be placed on wiki.al.o ?

I first though no, because this should not happen, but on the other
hand, it might be useful to have a general rescue wiki page.

-nc

 
> On Thu, Mar 27, 2014 at 4:45 PM, Natanael Copa <ncopa_at_alpinelinux.org>wrote:
>
> > Hi,
> >
> > 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
> > session)
> >
> > * 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
> > reboot
> >
> > That should be it.
> >
> > -nc
> >
> >
> > ---
> > Unsubscribe: alpine-devel+unsubscribe_at_lists.alpinelinux.org
> > Help: alpine-devel+help_at_lists.alpinelinux.org
> > ---
> >
> >
>
>



---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Fri Mar 28 2014 - 17:05:07 UTC