17

I had formatted efi partition and installed windows again. I have dual boot Windows and Linux, then I installed the grub bootloader again from a live usb using these commands:

 mount /dev/sda* /mnt
 mount --bind /dev /mnt/dev
 mount --bind /proc /mnt/proc
 mount --bind /sys /mnt/sys
 mount /dev/sda* /mnt/boot/efi
 mount /mnt/hostrun
 mount --bind /run /mnt/hostrun
 chroot /mnt
 grub-install /dev/sda
 update-grub
 exit

Then I unmounted all of this again. When I tried to boot, I got this messages:

 [ TIME ] Timed out waiting for device dev-disk-by\x2duuid-C829\x2dC4C1.device.
 [DEPEND] Dependency failed for file system check on /dev/disk/by-uuid/C829-C4C1.
 [DEPEND] Dependency failed for /boot/efi.
 [DEPEND] Dependency failed for Local File System.

and it turns me into emergency mode. How can I solve this problem?

3
  • 1
    Welcome , Check the UUID's in your /etc/fstab using blkid command.
    – GAD3R
    Commented Sep 27, 2018 at 17:39
  • I've experienced this sort of issue before. It's because when you reformat a file system its UUID changes and your /etc/fstab is using the old UUID. As a filesystem with the old UUID no longer exists udev fails to find it and you get this error. Update the UUID in /etc/fstab using blkid and your system will manage to correctly boot again as this error will be gone.
    – Josh Pinto
    Commented Sep 28, 2018 at 11:34
  • thanks, i checked it and it was with different UUID. now it's working
    – Mido Ahmed
    Commented Sep 28, 2018 at 15:42

1 Answer 1

34

Windows formatted you EFI partition and thus its ID changed...
you need to add the UUID of the new partition to the one in your /etc/fstab.
if you enter maintenance mode or have a terminal which seems you do, do this...

sudo blkid

write down the UUID of the EFI partition then

sudo nano /etc/fstab

change the UUID of the old EFI partition to the one you wrote down.
if you don't know which is your EFI partition look in sudo blkid output. the should be a partition where it says type=efi...

6
  • 1
    I am fighting with a similar issue - maybe you have an advice.
    – JJD
    Commented Jan 24, 2019 at 14:57
  • Great answer. I added a uuid to /etc/fstab because I was having issues with usb permissions. This was the wrong thing to do. When I rebooted, Ubuntu kept returning to emergency mode. I took your advice and opened fstab and removed the entry and Ubuntu works as expected. Thank you. @NhlalukoG
    – sectechguy
    Commented May 17, 2019 at 18:34
  • 1
    Great answer. I had a similar problem after reformatting my swap partition, advice worked.
    – ummw
    Commented May 27, 2019 at 11:45
  • What if there is no efi partition, only ntfs and ext4? Anyway, had a partition in my fstab that did not exist anymore, so there is that.
    – br4nnigan
    Commented Apr 22, 2021 at 18:51
  • You can also find the UUIDs of any partition, by using the ls -lha command in the /dev/disk/by-uuid folder Commented Nov 8, 2021 at 11:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .