Archlinux pacman -Syu (with IgnorePkg = linux) renders the machine non bootable.

January 24, 2014 2.9k views
When trying to upgrade the image using pacman -Syu (with the exclusion of the "linux" kernel package) after a reboot the image ends up being non bootable with the folling message : "Root device mounted successfully, but /sbin/init does not exist." It's stuck in the initial image with busybox. I followed this : I even tried adding syslinux,mkinticpio* and linux-firmware in "IgnorePkg" line of pacman.conf. There are currently 118 packages to upgrade, I could not find which one renders the machine non bootable.
4 Answers
Solved itself a few hours later with newer packages (retried -Syu)
Please a tutorial for repair (?)
by Etel Sverdlov
This tutorial provides a solution caused by the kernel management on DigitalOcean. Because DigitalOcean kernels come from the hypervisor, at a certain time, updating Arch Linux caused some of the modules to be lost. This tutorial explains how to prevent pacman from update the kernel when upgrading.

So I found this question when running into the errors you are describing above when updating my kernel. Just to clarify the current standing of the situation regarding ArchLinux and DigitalOcean for any future viewers...

Since DigitalOcean is deprecating ArchLinux and is no longer providing updates, the latest kernel we are allowed to use as of this writing is 3.14.1-1-ARCH. As part of the base image that DigitalOcean provides, it seems that the article kamal shared with us is already applied to pacman. If it isn't on your system, please do so!

The main culprit of this non-booting issue is that ArchLinux has an update pushed out around 2013-06-03 that changes the structure of the filesystem (the package has been updated since then, but the fix is still the same). Due to this update, paths will be changing and many updates will need to be applied before the filesystem change. At this time, the package is at version: filesystem-2014.06-1.

If you have custom applications that are not part of a package, they will need to be moved before the update. This link guide you though the steps of finding those applications and steps to move them manually:

In short, you must:

  1. Move non-official package files in /bin, /sbin or /usr/sbin and to put them files in /usr/bin
  2. Update ArchLinux with Pacman ignoring filesystem & bash: pacman -Syu --ignore filesystem,bash 2a. If you get an error regarding keyrings, see: 2b. If you get keyring error, update your keyserver and then run: pacman-key --populate archlinux 2c. Retry updating ArchLinux with the two ignored packages.
  3. Update Bash after previous updates: pacman -S bash
  4. Update the rest of the updates (ignored packages and future packages): pacman -Su
  5. Reboot and cross your fingers for good luck!

This process has worked for me and hopefully it will for you too!
(If any of you are trying to update to the 3.14.1-1-ARCH, you will still need to update your linux modules and headers... in order for certain applications to continue to function as well (e.g.: iptables, docker, etc). This topic is a little out-of-scope, but just an FYI for any future readers.)

Have another answer? Share your knowledge.