"Gave Up waiting for root device. Alert! /dev/disk/by-uuid/ does not exist. Dropping to a shell" while booting
Since the root filesystem is detected after some time, you can add a rootdelay
or a rootwait
. From the kernel documentation:
rootdelay= [KNL] Delay (in seconds) to pause before attempting to
mount the root filesystem
...
rootwait [KNL] Wait (indefinitely) for root device to show up.
Useful for devices that are detected asynchronously
(e.g. USB and MMC devices).
To set either, edit /etc/default/grub
, and change the value of GRUB_CMDLINE_LINUX
. Use your preferred editor, like nano
or gedit
, with sudo
or gksudo
as needed:
sudo nano /etc/default/grub
Add rootdelay=10
inside the quotes. If you'd rather not edit manually, then run this command:
sudo sed -i.bak 's/^GRUB_CMDLINE_LINUX="/& rootdelay=10 /' /etc/default/grub
Then run:
sudo update-grub
This will tell the kernel to wait 10 seconds before proceeding to mount the root filesystem. To see if this change was applied, run
grep rootdelay /boot/grub/grub.cfg
If some output was shown, then it was applied. Now reboot.
If it still threw an error, press CtrlAltDel to reboot, wait for the GRUB OS selection menu to show up and press e. Edit the value of rootdelay
, and increase it. Press F10 to boot. Repeat.
If it booted correctly, try the above process, and decrease the value.
None of the solutions above worked for me. I booted the computer from the same USB thumbdrive I used to install Ubuntu, but my ssd wasn't listed with df -h
/ sudo fdisk -l
/ sudo blkid
/ lsblk
/ sudo parted -l
. I had to do two things to fix this:
- Disable
Fast Boot
. Doing this from the BIOS was not sufficient (try rebooting and looking again - it kept going back to enabled). I had to disable it in the Windows' settings first, then in BIOS. - I had to switch from RST back to AHCI. You need to Google this and find all the steps. My BIOS warned me that everything would be lost, and luckily it wasn't.
The next time I booted from my thumbdrive I could see my ssd disk (at /dev/nvme01n1
). I then installed boot-repair
, ran it and rebooted. Voila.
I came cross the same issue after repairing partition table. The message was actually straightforward. Checked the directory /dev/disk/by-uuid/, the uuid in the message did miss. Instead, there was another uuid that linked to the partion (../../sda5 for mine) what was expected the right partition.
Eventually I solved the problem simply: edit /boot/grub/grub.cfg, replace the wrong uuid with the right one.