image of the blog
ShadowThink Logo

Arch Linux Infinite Boot Loop

After upgrade gnome to 3.24 on Arch Linux, the OS crash, cannot access to login page and tty and infinite boot loop. This blog demonstrates how to figure out the problem and fix it through rollback.

Infinite Boot Loop after Upgrade

I began to use Arch Linux since March, 2016 when my Ubuntu crashed again. Although, Ubuntu is one of the standard working environment for many open source projects, it sometimes does crash unpredictably if you did some normal and right operations as you think. Most importantly, you are hesitate to upgrade system version or not and may do a lot to try new software or library features. After investigation, I decided to use Arch Linux, a full rolling-release Linux distribution. I had a painful installation procedure, but it’s worthy and everything is under my control. I had a stable OS which works almost perfectly for 13 months with rolling updates. However, it crashed after a large upgrade in few days ago. My laptop cannot access to login page and tty terminal. It’s a infinite boot loop.

Figure It Out!

Since I cannot access to login page and tty terminal, I made a Arch Linux bootable USB stick. According to the Arch Linux wiki, I change the root so that I can access my original OS environment. Please notice the difference between chroot and arch-chroot. Usually, there is no built-in arch-chroot command, you should use the guide for chroot.

Check the pacman log at /etc/log/pacman.log and make some assumptions. I tried to downgrade kernel and the display manager GDM. But it didn’t work at all. Then I tried gnome-desktop and gnome-session etc. I got the login prompt but the GUI environment crashed. I finally the problems came from gnome. Actually, you may need some experience to do so. But now, I found checking logs like boot log and Xorg log is a more reasonable approach, i.e. use journaltcl -b or less /var/log/Xorg.log.

Yeah, it’s gnome that crash Arch Linux!

Fix it!

I tried to manually downgrade gnome related packages which can be found by pacman -Qg gnome and pacman -Qg gnome-extra. It’s time consuming, but doesn’t work at end. Because it’s too hard to resolve the package dependency issues. Finally, I taken the brute force method: rollback.

Here, I used the Arch Linux rollback machine maintained by TUNA(Tsinghua University Nerds Association). It means to edit your /etc/pacman.conf as:

## Worldwide
#Server =$repo/os/$arch
## Score: 2.2, China
#Server =$repo/os/$arch
## Tsinghua
#Server =$repo/os/$arch
## Tsinghua Rollback Machine
Server =$repo/os/$arch

Notice that 2017/04-17 is the date that you want to rollback to. You should decide it according to your requirement and the rollback machine archive directory. Then pacman -Syu, it rollback!

Make Your Gnome Stable

The most simple way is to ignore its newer updates and keep at a version that works perfect for you. Through my test, your /etc/pacman.conf should contains following entries to ignore them.

IgnorePkg   = gjs gnome-autoar gnome-bluetooth gnome-desktop gnome-initial-setup gnome-online-accounts gsettings-desktop-schemas gtk-update-icon-cache gtksourceview3 libgdm libnautilus-extension libnm libnm-glib libsoup
IgnoreGroup = gnome gnome-extra

This is what I do to fix the infinite boot loop. Hope it help you.