The Computer Oracle

"Unable to find root device" on a fresh ArchLinux install

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: City Beneath the Waves Looping

--

Chapters
00:00 &Quot;Unable To Find Root Device&Quot; On A Fresh Archlinux Install
02:57 Accepted Answer Score 36
03:55 Answer 2 Score 1
04:57 Answer 3 Score 0
05:18 Answer 4 Score 0
06:06 Thank you

--

Full question
https://superuser.com/questions/769047/u...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#linux #boot #grub #archlinux #macbookpro

#avk47



ACCEPTED ANSWER

Score 36


Instead of booting with the normal image, I used the fallback version and managed to boot into the system. As it turns out, Linux could not detect any drives due to the block mkinitcpio hook (responsible for block devices) missing from the default image. This was due to it being placed after autodetect in /etc/mkinitcpio.conf. To fix this, the HOOKS=... line in that file needs to be changed so that block comes before autodetect

Before the fix:

HOOKS="base udev autodetect block modconf filesystems keyboard fsck"

After the fix:

HOOKS="base udev block autodetect modconf filesystems keyboard fsck"

Running mkinitcpio -p linux to regenerate the initramfsthen fixed the problem permanently.




ANSWER 2

Score 1


I ran into a similar issue but with a different setup. I'm using ArchLinux in a virtual machine and my bootloader is syslinux. I used your trick on switching the kernel hooks order but I still ended up in a rootfs-shell.

What fixed the issue for me was changing the APPEND line in my syslinux.cfg from

APPEND root=UUID=<snip>

to

APPEND root=PARTUUID=<snip>

You can easily append the PARTUUID to the syslinux.cfg by using a command like blkid | grep sda1 | awk '{ print $7 }' >> /boot/syslinux/syslinux.cfg assuming your root partition is /dev/sda1

Afterwards you can use your favorite text-editor to move the line to the appropriate space.

EDIT: I just recognized that the column number in the small awk script may vary, so better have a look at the output before piping it into syslinux.cfg




ANSWER 3

Score 0


I had the same issue with my Dell XPS 15 (2021). I resolved it by changing the SATA/NVMe Operation setting in the bios from RAID On to AHCI/NVMe.




ANSWER 4

Score 0


I tackled with the same error when I installed Arch to the flash drive.

I looked into /usr/lib/initcpio/init_functions script and found solution for that case:

  • Mount required partition when you are in initramfs: mount /dev/sdx8 /new_root/
  • Press Ctrl+D to boot into linux.
  • Edit /etc/default/grub, add rootdelay=90 to linux command line: GRUB_CMDLINE_LINUX="rootdelay=90".
  • Update grub: grub-mkconfig -o /boot/grub/grub.cfg.