Fix Archlinux
22 Jun 2013 Category: ArchlinuxIf you are an Archlinux user, you might have noticed the latest news - Binaries move to /usr/bin requiring update intervention. The same problem was encountered on my laptop during update:
error: failed to commit transaction (conflicting files)
filesystem: /bin exists in filesystem
Following the instruction, I just uninstalled Grub and some other programs. But accidentally hit POWER OFF button right after. No surprise I cannot login to Archlinux after reboot. Here is the procedure how I fixed it.
-
Download latest Linux ISO and creat Live USB via LinuxLive USB Creator.
-
Get into Live CD mode and set up internet connect according to Beginners’ Guide.
Here is an example of wireless connection.
# iw dev # ip link set wlp3s0 up # wifi-menu wlp3s0
-
Check disk partitioning.
# lsblk /dev/sda # fdisk -l
On my laptop, sda 7/8/9/10 are Linux partitions.
- sda 7: 200M boot directory
- sda 8: 2G SWAP
- sda 9: 4.7G root directory
- sda 10: 28.6G home directory
-
Mount the directories respectively.
# mkdir /mnt/arch # mount /dev/sda9 /mnt/arch # mount /dev/sda7 /mnt/arch/boot/ # mount /dev/sdb10 /mnt/arch/home/
-
Chroot according to wikipage Change Root.
# arch-chroot /mnt/arch
-
Use the same internet connection.
# cp -L /etc/resolv.conf etc/resolv.conf
-
Assign the shell.
# chroot . /bin/bash
-
Install syslinux.
# pacman -S syslinux # syslinux-install_update -i -a -m # nano /boot/syslinux/syslinux.cfg
Change sda9 to the root directory.
... LABEL arch ... APPEND root=/dev/sda9 ro ...
To prevent below error. You still need the following steps.
/sbin/init does not exist
-
Install systemd-sysvcompat.
Find below line in ‘/boot/syslinux/syslinux.cfg’.
LINUX ../vmlinuz-linux
Add init as:
LINUX ../vmlinuz-linux init=/usr/lib/systemd/systemd
-
Exit chroot.
# exit # umount /mnt/arch/
-
Reboot and now you will get into the nice bootload interface.