Since some time, I have been experimenting with archlinux as guest in VirtualBox. Due to some unknown reasons the VirtualBox hanged during package upgrade on the arch setup (pacman -Syyu). I had no other choice than to kill the VirutulBox process in the middle. I think it happened when the packages were being configured. After that when I rebooted the guest OS, it gave me the “ramfs$” prompt and refused to mount any disks. There were some errors stating the uuids of the disks, but for me the errors were beyond comprehension. Being a beginner in archlinux usage, I didn’t know how to recover from this situation.
Purely instinctively, I downloaded the latest iso of archlinux and mounted it as cd drive on the virtual machine and booted the virtual machine from that iso. I logged in as root and mounted the corrupted archlinux drives / and /home and chrooted to my installation root. After chrooting, I started upgrading the system with pacman as usual. Here the summary of the commands I used almost in the same order.
# mount /dev/sda1 /media/oldroot (of course I had to create the directory under /media) # mount /dev/sda2 /media/oldhome # chroot /media/oldroot # pacman -Syyu
The upgrade went fine and after rebooting I got the arch setup exactly how I left it. I don’t know if this recovery was method was a fluke or recommended way to recover arch, but it worked for me. I would definitely like to know what could have happened and the correct procedure to recover from such cases. Although, it was a virual machine and there was no data at risk, It would have taken a lot of time and effort to get the same archlinux setup which I had. I must say chroot is an amazing tool.