splitbrain.org

electronic brain surgery since 2001

ArchLinux: Fix Init Ramdisk

Quick memo to myself: When you abort pacman for some reason while it updates the linux kernel it will not have built a new init ramdisk. The next time you reboot, your kernel will not find any hard disk to boot from!

And because you will mess this up again, here's how to fix it:

  • boot into the Arch installer from your USB stick
  • mount the disk
    mount /dev/sda3 /mnt
  • chroot into it
    chroot /mnt /bin/bash
  • mount the virtual file systems
    mount -t proc proc /proc
    mount -t sysfs sys /sys
    mount -t devtmpfs udev /dev
  • create the ramdisk
    mkinitcpio -p linux
  • reboot

You're welcome, future self.

Tags:
archlinux, admin, mkinitcpio
Similar posts: