You are not logged in.

#1 2017-07-24 05:48:38

M0rtiferrimus
Member
Registered: 2013-03-03
Posts: 34

[SOLVED] Root partition not mounted with efibootmgr

I have installed Arch on a flash drive and added a UEFI boot menu entry using efibootmgr using the following command within chroot (although I'm not sure if that matters):

efibootmgr -d /dev/sdc -p 1 -c -L "Arch Linux" -l /efi/vmlinuz-linux -u "root=PARTUUID=$PARTUUID$ rw initrd=\efi\initramfs-linux.img"

where $PARTUUID$ is the partition UUID of my system root partition, omitted for brevity. All letters in the UUID are capitalized, if that makes a difference. My partition scheme is as follows:

/dev/sdc1: /boot
/dev/sdc2: /
/dev/sdc3: swap
/dev/sdc4: /home

However, the flash drive is not always mounted as /dev/sdc, which is why it's important for me to use the partition UUID.
When I boot, I get this far:

::running early hook [udev]
:: Triggering uevents...
Waiting 10 seconds for device /dev/disk/by-partuuid/$PARTUUID$ ...
ERROR: device 'PARTUUID=$PARTUUID$' not found. Skipping fsck.
:: mounting 'PARTUUID=$PARTUUID$' on real root
mount: can't find PARTUUID=$PARTUUID$
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ] 

What can I do to get the partition to mount on boot?

Last edited by M0rtiferrimus (2017-07-24 11:25:51)

Offline

#2 2017-07-24 05:54:35

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: [SOLVED] Root partition not mounted with efibootmgr

Stop omitting things. I can only guess that you're using the wrong UUID

Offline

#3 2017-07-24 08:19:04

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] Root partition not mounted with efibootmgr

You could be missing drivers in your initramfs, my guess is it could be the xhci driver.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2017-07-24 08:33:51

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,788
Website

Re: [SOLVED] Root partition not mounted with efibootmgr

M0rtiferrimus wrote:

All letters in the UUID are capitalized, if that makes a difference.

It does. File names are case-sensitive on linux. In my experience, only FAT and NTFS partitions have capitalized UUIDs, neither of which should be used as your root partition filesystem. Please do provide more details about your setup, and be sure to post full logs and output where needed.

https://bbs.archlinux.org/viewtopic.php?id=57855

Mod note: moving to NC.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2017-07-24 10:40:14

M0rtiferrimus
Member
Registered: 2013-03-03
Posts: 34

Re: [SOLVED] Root partition not mounted with efibootmgr

Alright, here goes:
Results of blkid | grep sdc2

/dev/sdc2: UUID="4a965e44-38ea-4681-a68a-b4f7e67085e9" TYPE="ext4" PARTLABEL="Root" PARTUUID="5b8b45cd-345e-4ba4-a645-77965fac4162"

As a result, everywhere I put $PARTUUID$ in my previous post, substitute 5B8B45CD-345E-4BA4-A645-77965FAC4162. I was following the advice found here: StackExchange
I'll try again with the PARTUUID not capitalized, since references to it everywhere else seem to be lowercase.

Offline

#6 2017-07-24 11:01:01

M0rtiferrimus
Member
Registered: 2013-03-03
Posts: 34

Re: [SOLVED] Root partition not mounted with efibootmgr

Solved! Here's what I had to do:
Make PARTUUID lowercase, i.e. enter it exactly as blkid returned it, and remake the boot entry:

efibootmgr -d /dev/sdc -p 1 -c -L "Arch Linux" -l /efi/vmlinuz-linux -u "root=PARTUUID=5b8b45cd-345e-4ba4-a645-77965fac4162 rw initrd=/efi/initramfs-linux.img"

This made the flash drive bootable, but I ran into an error during boot:

(1 of 3) A start job is running for dev-sdc1.device
(2 of 3) A start job is running for dev-sdc3.device
(3 of 3) A start job is running for dev-sdc4.device

These ran until a timeout was reached. I was then allowed to boot into a root shell, which I did. I looked at /etc/fstab to make sure everything was in order, and noticed that the UUID's were commented out, with partitions referenced as /dev/sdc1, /dev/sdc2, etc.
Without the installation flash drive plugged in, however, my Arch flash drive mounts as /dev/sdb, not /dev/sdc. I made a backup copy of /etc/fstab, then edited the file to uncomment the UUID's, place them at the beginning of each line, and put the /dev/sdcX reference in a comment for reference. For example, original file

# UUID=4a965e44-38ea-4681-a68a-b4f7e67085e9
/dev/sdc2                                                                                    /                           ext4                            rw,relatime,data=ordered            0 1

Edited file

# /dev/sdc2
UUID=4a965e44-38ea-4681-a68a-b4f7e67085e9                     /                           ext4                            rw,relatime,data=ordered            0 1

After a reboot, the system works perfectly. Thanks for the advice on UUID capitalization, that was the main problem I was having.

Last edited by M0rtiferrimus (2017-07-24 11:15:00)

Offline

#7 2017-07-24 11:11:00

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Root partition not mounted with efibootmgr


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB