You are not logged in.

#1 2013-06-21 15:17:19

KillerRobot007
Member
Registered: 2013-06-21
Posts: 3

[SOLVED] Unable to find root device <empty string>

Hello,

I'm pretty new to Linux, so it wouldn't surprise me if I'm missing something incredibly obvious.

I finally got Arch Linux to boot into my OS using rEFInd on my UEFI motherboard.  Now it comes up with this:

:: Triggering uevents...
ERROR: device '' not found.  Skipping fsck.
ERROR: Unable to find root device ''.

Every other thread that I've found for "unable to find root device" has something filled in for the string and is not empty, so I can't figure out what I goofed up.  I'm assuming I goofed up the rEFInd configuration.

/dev/sda1 has PARTUUID of 22d5ffbb-417f-4c39-aa9d-71cc658df2f8 and is my UEFI bootloader (/boot/efi).
/dev/sda2 has PARTUUID of 70b8ed8c-4229-432d-90ce-bb4d0ad24d51 and is my root (/)
/dev/sda3 has PARTUUID of 824518c0-ef4d-4cb3-9772-ac7246198506 and is my home directory (/home)
(PARTUUIDs are results of ls -l /dev/disk/by-partuuid/)

Here is what I have in my /boot/refind_linux.conf file.

"Boot with defaults"     "root=PARTUUID=70b8ed8c-4229-432d-90ce-bb4d0ad24d51 rootfstype=ext4 ro add_efi_memmap systemd.unit=graphical.target"
"Boot to terminal"     "root=PARTUUID=70b8ed8c-4229-432d-90ce-bb4d0ad24d51 rootfstype=ext4 ro add_efi_memmap systemd.unit=multi-user.target"


I ran "mkinitcpio -p linux" and it was successful (warnings about firmware for aic94x and bfa, which according to some Google searches are no big deal).  This has not fixed the issue though.

My build is 3.9.6-1-ARCH.

Thanks in advance to anyone who can help.

KillerRobot007

Last edited by KillerRobot007 (2013-06-23 03:56:09)

Offline

#2 2013-06-21 15:35:31

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Unable to find root device <empty string>

I have never tried to use PARTUUIDs.  Theoretically they should work, but I feel that there are much better (and more human readable) options out there.  I think to make your life easier, you need to learn about filesystem labels.  So instead of having UUID's (whether PART of filesystem), you can just make then whatever you want (ie. arch-root and arch-home). 

Look into the e2label command (it works with ext4, it is "e2" because ext2-ext4 all use the tools from e2fs-progs) to change/make a label for your filesystems. 

I am assuming that /boot/efi is your EFI System Partition, and is therefore a FAT32 partition (the only other option would be HFS+ if you use a Mac).  So there is the fatlabel command that will handle this.

Then you can use either "root=LABEL=arch-root" or "root=/dev/disk/by-label/arch-root".  This of course assumes that you are using arch-root as the filesystem label.  You should also know that if you use the root=/dev/disk/by-* method, you must have udev (or systemd) in your initramfs.

Offline

#3 2013-06-21 18:34:18

KillerRobot007
Member
Registered: 2013-06-21
Posts: 3

Re: [SOLVED] Unable to find root device <empty string>

I made the suggested change and created labels for arch-root and arch-home and it did not fix the problem.

I definitely appreciate the information though - having labels for my drives will make things easier to configure later (I assume).

Offline

#4 2013-06-21 21:14:40

grte
Member
From: Canada
Registered: 2007-03-21
Posts: 42

Re: [SOLVED] Unable to find root device <empty string>

I'm having this same error, however I am able to boot and get a tty if I select the fallback image.  Is this also true for you?

Offline

#5 2013-06-21 21:17:07

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Unable to find root device <empty string>

Oh, you also need to specify an initrd (or initramfs) which is not listed in what you posted above.  So although we use initramfs' these days, the kernel still refers to them an initrd.  Namely you would need "initrd=/path/to/initramfs".  If you are using the filesystem drivers included with rEFInd, and are keeping your kernel and initramfs separate from the ESP, then you would need to give the path from /boot, but if it is on the ESP, you need to give it that path relative to the root on the ESP. 

So in my case, I have /boot/EFI/arch/vmlinuz-linux.efi and I have /boot/EFI/arch/initramfs-linux.img (I mount the ESP as the boot partition, or directly on /boot).  Therefore I would have "root=/dev/disk/by-label/arch-root initrd=/EFI/arch/initramfs-linux.img ...."

Offline

#6 2013-06-22 00:13:15

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [SOLVED] Unable to find root device <empty string>

If this is right - and the docs for rEFInd suggest it is - then the Beginners' Guide should be modified to include it.

I am confused, though, because according to my records, I never included initrd in refind_linux.conf, even when I used that file and even when booting with rEFInd worked. (I switched to just specifying stanzas in refind.conf or an included file and can see that I included initrd in those so this isn't why rEFInd doesn't work for me, unfortunately. But it is rather odd that it worked before I edited refind.conf manually despite my not using that option.)

Also https://bbs.archlinux.org/viewtopic.php … 3#p1290783.

Last edited by cfr (2013-06-22 00:15:03)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#7 2013-06-22 00:26:21

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Unable to find root device <empty string>

I have only ever tried the autodetection with rEFInd once, and I thought I remembered it detecting the kernels, but matching up an initramfs to it was a maual job.  But I could just be remembering things totally wrong.  I have tried just about any and every bootloader I could find, so it is quite possible that I am simply confused here.  Since then, I have rEFInd set up but i just use manual stanzas as well.  I just find taht to be so much more sane of an approach.

You know... I think that I remembered it that way because I had some issues with autodetection of something.  I know that Arch names its kernel and initramfs' quite different than other distributions. So maybe that was it.  Again, I might just be confiused.

Edit: So browsing through Rod Smith's rEFInd documentation on his site, it would seem that rEFInd's autodetction scans for things in teh smae directory that start with init*.  Then it matches the version of the rest of the file name with the version of the kernel.  So if for example you had vmlinuz-3.9.6.efi and you had initramfs-3.9.6.img, those two would be paired together.  So I assume that because the kernel is calle vmlinuz-linux and the initramfs is named initramfs-linux.img, those two should be matched up with each other.  Though i am not entirely sure what happens to the initramfs-linux-fallback.img.  Does it just live a sad and lonely life of no matches?

Last edited by WonderWoofy (2013-06-22 00:35:45)

Offline

#8 2013-06-22 00:48:39

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [SOLVED] Unable to find root device <empty string>

I was thinking that because it searches on everything from the first number in the kernel name, that it would not necessarily find Arch's initrd automatically just because that string will be entirely empty.

Hopefully the developer of rEFInd will see one or other of these threads and clarify things.

My records are pretty good. I essentially archive config files so I can see what I've changed and I clearly never included initrd in refind_linux.conf even though I always did in refind.conf when I switched to that method. But I am almost positive that I had it working with the refind_linux.conf method and not just the refind.conf one. So that suggests your reading of the docs is correct...

Also I checked the history of the Beginners' Guide and if this is a mistake, it has been there for a considerable time (at least six months) and caused remarkably few problems if the forums are anything to go by.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#9 2013-06-23 02:02:36

KillerRobot007
Member
Registered: 2013-06-21
Posts: 3

Re: [SOLVED] Unable to find root device <empty string>

All,

Thank you for your assistance.  You all three helped me immensely.

I had created three different profiles in UEFI and I never selected different ones.  Once I selected the one that contained both the refind_linux.conf file and the initramfs-linux.img file, it worked perfectly.  So once I was able to boot in successfully, I was then able to remove the other profiles systematically.  And now everything makes much more sense.

So now in my /boot/efi/EFI/arch folder, I have vmlinuz-linux, refind_linux.conf (configured as suggested above), initramfs-linux.img, and initramfs-arch-fallback.img.  This is what rEFInd needs to boot into.

Also, just as a note, I get a kernel panic if I don't include the initrd variable in my refind_linux.conf file.

Many thanks again to all.  I'm sure in about 15 seconds I'll be needing help again....

Offline

#10 2013-06-23 02:24:31

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Unable to find root device <empty string>

From what srs5694 says, rEFInd will simply try to read the configuration files from the directory it is started from.  So, for example, if you were to have it as your default bootloader (\EFI\boot\bootx64.efi), then you would need to have the configuration files in \EFI\boot as well.

Please mark the thread as [Solved].  This can be done by editing the first post, which will allow you to edit the title.

Offline

#11 2013-06-23 02:56:16

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [SOLVED] Unable to find root device <empty string>

I think that refind_linux.conf is supposed to live in the directory with the kernel and initramfs. refind.conf needs to be in the same directory as the refind binary, though, which might be what you are thinking of?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#12 2013-06-23 03:00:45

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Unable to find root device <empty string>

This must be what I was thinking of because you are absolutely right, refind_linux.conf has to live in the same directory as the kernel (and initramfs) so that it knows what to apply it to.

Offline

Board footer

Powered by FluxBB