Arch Linux: failed to mount on real root
I updated my Arch Linux yesterday, and for the first time in 9 years of using this system, I encountered an error when after a reboot the system could not mount a disk:
ERROR: device UUID not found.
mount: /new_root: can’t find UUID.
ERROR: Failed to mount UUID on real root.
You are now being dropped into an emergency shell.
The problem is clear – either the UUID of the disk has changed, or “something went wrong” with the kernel.
That happened because, during the upgrade, free space was exhausted in the /tmp
and mkinitcpio
wasn’t able to build a new kernel’s image.
So, boot from a USB flash, and let’s try to fix it.
First, check whether the correct UUID is specified in fstab
.
Check the partitions:
[root@archiso ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 693.5M 1 loop /run/archiso/airootfs
sda 8:0 1 14.3G 0 disk
├─sda1 8:1 1 798M 0 part
└─sda2 8:2 1 15M 0 part
nvme0n1 259:0 0 953.9G 0 disk
├─nvme0n1p1 259:1 0 512M 0 part
├─nvme0n1p2 259:2 0 900G 0 part
└─nvme0n1p3 259:3 0 53.4G 0 part
/dev/nvme0n1p2 – my root partition here.
Mount it:
[root@archiso ~]# mount /dev/nvme0n1p2 /mnt/
Check the UUID from the /etc/fstab
on the old system:
[root@archiso ~]# cat /mnt/etc/fstab
Static information about the filesystems.
See fstab(5) for details.
<file system> <dir> <type> <options> <dump> <pass>
/dev/nvme0n1p2
UUID=31268b66-5fca-44f6-8e22-acc281026eaf / ext4 rw,relatime 0 1
And check the real UUID of this partiton:
[root@archiso ~]# blkid /dev/nvme0n1p2
/dev/nvme0n1p2: UUID="31268b66-5fca-44f6-8e22-acc281026eaf" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="519b201a-02"
Everything looks like correct. Okay, go next.
Run iwctl
, configure WiFi.
Find an interface:
[iwd] station list
Find available WiFi networks:
[iwd]# station wlan0 get-networks
Connect to yours. A password will be asked during the connection:
[iwd]# station wlan0 connect setevoy-linksys-5-0
Install kernel’s packages:
[root@archiso ~]# pacstrap /mnt base linux linux-firmware
And build initramfs
:
[root@archiso ~]# arch-chroot /mnt/
[root@archiso /]# mkinitcpio -p linux
Reboot – and it works now.
Similar posts
09/23/2020 Slack: Cannot read property ‘appTeams’ of undefined (0)
06/24/2020 Linux: configuring KDE Connect and connection to an Android phone (0)
04/30/2020 Linux: no sound after suspend/sleep – solution (0)
04/27/2020 Steam: Civilization V, Arch Linux and ERROR:Invalid resolutions constraints: 0x0 must not be greater than 0x0 (0)
12/13/2019 KeePass: SSH keys passwords storage and decryption on Linux (0)
The post Arch Linux: failed to mount on real root first appeared on RTFM: Linux, DevOps, and system administration.