Edit 4: I've reinstalled Ubuntu and erased the disk, now its working again and I learned my lesson on system backups. Thank you for your support nonetheless.
I've been stuck all day trying to get my custom-built Ubuntu 18 computer for a robotics application to boot again.
Here is what happened:
It has been disconnected from the internet for a month or so and I ran sudo apt update && apt upgrade
where the second command led to a bunch of errors, I unfortunately did not document. Rerunning it failed as well and starting Firefox to google the problem showed that it is already running and cannot be opened again (although it was not running).
Therefore, I rebooted and was greeted with this: /dev/sda4: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
I followed this answer. Afterwards, I was able to boot again.
Then, I re-ran sudo apt update && apt upgrade
, when it suggested to run sudo apt autoremove
, which I did. The system then said, it required a restart which led me to the error mentioned in the title:
Gave up waiting for root file system device. Common problems:
-Boot args (cat /proc/cmdline)
- Check rootdelay=(did the system wait long enough?)
-Missing modules (cat /proc/modules; ls /dev)
ALERT! UUID=b80b71b0-f0c6-4532-963f-4b92db7137e1 does not exist. Dropping to a shell
BusyBox v1.27 2 (Ubuntu 1:1.27.2-2ubuntu3.3) built in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs)
First of all, my keyboard is not working in this shell (initramfs), so I could only shutdown the computer with the on/off-button (by now I've tested another keyboard which won't work either). After a couple of desperate hard reboots, I still ended with the above view every time.
What I tried: After reading a lot of forum entries because I've got absolutely no idea about EFI, bootloaders, grub and all of this, I finally got my Ubuntu install USB stick and booted into it. Here, I tried this solution and had a look here. Furthermore, I installed and used boot-repair. Unfortunately, all to no avail.
Edit: I forgot to mention that I already edited grub.cfg (In the GRUB menu, I pressed 'e' and replaced all instances of the UUID ...37e1 with /dev/sda4) but the problem remained. Edit 3: I also removed "ro" from the line containing "linux" which also did not solve the problem.
Edit 2: I tried to edit grub.cfg again from the GRUB menu and changed the UUID to d7851347-5b99-4bb5-adf9-47c49f33611a as suggested by ubfan1 in the comments. Well, didn't work either. But I've added some photos of the GRUB config and command line prompts at the bottom of this post.
These are the results:
- Using the live stick, I am able to see my SSD, mount and access it. All steps from this solution executed without errors. But rebooting with unmounting the stick, led me to the same error as before.
- I had a look at my BIOS settings, but my SATA settings are configured for AHCI and boot options allow EFI and legacy options.
- Boot-repair was also unable to solve the problem. After executing it and rebooting, the problem persists. But below is the info generated by boot-repair.
The computer: The sytem is a rugged, custom-built computer for mobile robotics with a main board running an American Megatrends BIOS (Version 2.20.1271) and a single 1TB Samsung SSD 860. It has an Intel CoffeeLake i7-8700T processor and 64GB RAM as well as an NVIDIA graphic card (if this is of any relevance).
The question: Can someone please show me how to fix this error or point me in the right direction, so that I won't have to reinstall Ubuntu and configure the system all over again?
Edit 3: Here are the results from running 'sudo blkid' from the live stick:
/dev/sda1: UUID="1429-CC00" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="e4bb4583-22c0-4bc6-a1fa-d1bb1b3f27a0"
/dev/sda4: UUID="b80b71b0-f0c6-4532-963f-4b92db7137e1" TYPE="ext4" PTUUID="d8a8d274" PTTYPE="dos" PARTUUID="d7851347-5b99-4bb5-adf9-47c49f33611a"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/sda2: PTUUID="2f6ca792" PTTYPE="dos" PARTUUID="e6e6ec4d-80d0-46b5-bc3d-28f9ccf59e16"
/dev/sda3: UUID="ff161f87-866c-44d3-8fc3-5a44f5263535" TYPE="swap" PARTUUID="18d1b724-907d-49bc-bdaa-5d9708e843d7"
/dev/sdb1: UUID="2020-02-03-18-40-13-00" LABEL="Ubuntu 18.04.4 LTS amd64" TYPE="iso9660" PTUUID="6e037a9d" PTTYPE="dos" PARTUUID="6e037a9d-01"
/dev/sdb2: SEC_TYPE="msdos" UUID="D055-8513" TYPE="vfat" PARTUUID="6e037a9d-02"
Here is the report from boot-repair: (any advice on how to properly format it here is also appreciated):
The results show my Samsung SSD (sda) and the live stick (sdb)
boot-repair-4ppa130 [20210818_1128]
============================== Boot Info Summary ===============================
=> Grub2 (v1.99-2.00) is installed in the MBR of /dev/sda and looks at sector
1050624 of the same hard drive for core.img, but core.img can not be found
at this location.
sda1: __________________________________________________________________________
File system: vfat
Boot sector type: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sda2: __________________________________________________________________________
File system: BIOS Boot partition
Boot sector type: -
Boot sector info:
sda3: __________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sda4: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 18.04.5 LTS
Boot files: /boot/grub/grub.cfg /etc/fstab /etc/default/grub
sdb: ___________________________________________________________________________
File system: iso9660
Boot sector type: Unknown
Boot sector info:
Operating System:
Boot files: /boot/grub/grub.cfg
================================ 1 OS detected =================================
OS#1: Ubuntu 18.04.5 LTS on sda4
============================ Architecture/Host Info ============================
CPU architecture: 64-bit
Live-session OS is Ubuntu 64-bit (Ubuntu 18.04.4 LTS, bionic, x86_64)
===================================== UEFI =====================================
BIOS is EFI-compatible, and is setup in EFI-mode for this live-session.
SecureBoot disabled.
efibootmgr -v
BootCurrent: 0006
Timeout: 1 seconds
BootOrder: 0000,0006,0005,0004,0007
Boot0000* ubuntu HD(1,GPT,e4bb4583-22c0-4bc6-a1fa-d1bb1b3f27a0,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)
Boot0004* Hard Drive BBS(HD,,0x0)..GO..NO........o.S.a.m.s.u.n.g. .S.S.D. .8.6.0. .P.R.O.
.1.T.B....................A...........................>..Gd-.;.A..MQ..L.4.S.N.2.F.N.M.0.0.5.2.5.5.5.
.Y. . . .
........BO..NO........s.T.O.S.H.I.B.A....................A.......................F..Gd-.;.A..MQ..L.0.0.2.2.C.F.F.6.B.8.A.6.C.3.5.1.E.2.5.C.D.3.D.4........BO
Boot0005* UEFI: Built-in EFI Shell VenMedia(5023b95c-db26-429b-a648-bd47664c8012)..BO
Boot0006* UEFI: TOSHIBA PciRoot(0x0)/Pci(0x14,0x0)/USB(4,0)/CDROM(1,0x2eec,0x4d00)..BO
Boot0007* UEFI: TOSHIBA, Partition 2 PciRoot(0x0)/Pci(0x14,0x0)/USB(4,0)/HD(2,MBR,0x6e037a9d,0x2eec,0x1340)..BO
This session has been detected as 'live' because /proc/cmdline contains (boot=casper)
This session has been detected as 'live' because df -Th / contains overlay
78415fb8fb9b909f8029858113f1335f sda1/BOOT/bkpbootx64.efi
78415fb8fb9b909f8029858113f1335f sda1/BOOT/bootx64.efi
2895d47544fd587b26c7e29be1295c27 sda1/BOOT/fbx64.efi
621356d82b109cd860ad92cdf241c58b sda1/BOOT/grubx64.efi
82894bcbe4f010664226ba7591372538 sda1/ubuntu/fwupx64.efi
621356d82b109cd860ad92cdf241c58b sda1/ubuntu/grubx64.efi
dc3c47be2f78a78e5e57d097ae6c5c84 sda1/ubuntu/mmx64.efi
78415fb8fb9b909f8029858113f1335f sda1/ubuntu/shimx64.efi
============================= Drive/Partition Info =============================
Disks info: ____________________________________________________________________
sda : is-GPT, hasBIOSboot, has---ESP, not-usb, not-mmc, has-os, 2048 sectors * 512 bytes
Partitions info (1/3): _________________________________________________________
sda1 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
sda4 : is-os, 64, apt-get, signed grub-efi , grub2, grub-install, grubenv-ok, update-grub, farbios
Partitions info (2/3): _________________________________________________________
sda1 : is---ESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
sda4 : isnotESP, fstab-has-goodEFI, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
Partitions info (3/3): _________________________________________________________
sda1 : not-sepboot, no-boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, std-grub.d, sda
sda4 : not-sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, std-grub.d, sda
fdisk -l (filtered): ___________________________________________________________
Disk sda: 953.9 GiB, 1024209543168 bytes, 2000409264 sectors
Disk identifier: 33BF281B-620C-4EE0-9E23-F71A72F15DE5
Start End Sectors Size Type
sda1 2048 1050623 1048576 512M EFI System
sda2 1050624 1052671 2048 1M BIOS boot
sda3 1998407680 2000408575 2000896 977M Linux swap
sda4 1052672 1998407679 1997355008 952.4G Linux filesystem
Partition table entries are not in disk order.
Disk sdb: 14.5 GiB, 15518924800 bytes, 30310400 sectors
Disk identifier: 0x6e037a9d
Boot Start End Sectors Size Id Type
sdb1 * 0 4153407 4153408 2G 0 Empty
sdb2 12012 16939 4928 2.4M ef EFI (FAT-12/16/32)
parted -lm (filtered): _________________________________________________________
sda:1024GB:scsi:512:512:gpt:ATA Samsung SSD 860:;
1:1049kB:538MB:537MB:fat32:EFI System Partition:boot, esp;
2:538MB:539MB:1049kB:::bios_grub;
4:539MB:1023GB:1023GB:ext4::;
3:1023GB:1024GB:1024MB:linux-swap(v1)::;
sdb:15.5GB:scsi:512:512:unknown:TOSHIBA TransMemory:;
blkid (filtered): ______________________________________________________________
NAME FSTYPE UUID PARTUUID LABEL PARTLABEL
sda
├─sda1 vfat 1429-CC00 e4bb4583-22c0-4bc6-a1fa-d1bb1b3f27a0 EFI
System Partition
├─sda2 e6e6ec4d-80d0-46b5-bc3d-28f9ccf59e16
├─sda3 swap ff161f87-866c-44d3-8fc3-5a44f5263535 18d1b724-907d-49bc-bdaa-5d9708e843d7
└─sda4 ext4 b80b71b0-f0c6-4532-963f-4b92db7137e1 d7851347-5b99-4bb5-adf9-47c49f33611a
sdb iso9660 2020-02-03-18-40-13-00 Ubuntu 18.04.4 LTS amd64
├─sdb1 iso9660 2020-02-03-18-40-13-00 6e037a9d-01 Ubuntu 18.04.4 LTS amd64
└─sdb2 vfat D055-8513 6e037a9d-02 Ubuntu 18.04.4 LTS amd64
df (filtered): _________________________________________________________________
Avail Use% Mounted on
sda1 501.4M 2% /mnt/boot-sav/sda1
sda4 861G 3% /mnt
sdb 0 100% /cdrom
Mount options: __________________________________________________________________
sda1 rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
sda4 rw,relatime
sdb ro,noatime,nojoliet,check=s,map=n,blocksize=2048
====================== sda4/boot/grub/grub.cfg (filtered) ======================
Ubuntu b80b71b0-f0c6-4532-963f-4b92db7137e1
Ubuntu, with Linux 5.4.0-81-generic b80b71b0-f0c6-4532-963f-4b92db7137e1
Ubuntu, with Linux 5.4.0-77-generic b80b71b0-f0c6-4532-963f-4b92db7137e1
Ubuntu, with Linux 4.15.0-154-generic b80b71b0-f0c6-4532-963f-4b92db7137e1
### END /etc/grub.d/30_os-prober ###
System setup uefi-firmware
### END /etc/grub.d/30_uefi-firmware ###
========================== sda4/etc/fstab (filtered) ===========================
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda4 during installation
UUID=b80b71b0-f0c6-4532-963f-4b92db7137e1 / ext4 errors=remount-ro 0 1
/swapfile none swap sw 0 0
UUID=1429-CC00 /boot/efi vfat defaults 0 1
======================= sda4/etc/default/grub (filtered) =======================
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
==================== sda4: Location of files loaded by Grub ====================
GiB - GB File Fragment(s)
322.627021790 = 346.418126848 boot/grub/grub.cfg 1
5.173885345 = 5.555417088 boot/vmlinuz-4.15.0-154-generic 1
6.823253632 = 7.326412800 boot/vmlinuz-5.4.0-77-generic 2
698.909198761 = 750.448037888 boot/vmlinuz-5.4.0-81-generic 1
5.173885345 = 5.555417088 vmlinuz 1
698.909198761 = 750.448037888 vmlinuz.old 1
699.384670258 = 750.958571520 boot/initrd.img-4.15.0-154-generic 2
6.003189087 = 6.445875200 boot/initrd.img-5.4.0-77-generic 5
6.352848053 = 6.821318656 boot/initrd.img-5.4.0-81-generic 2
699.384670258 = 750.958571520 initrd.img 2
6.352848053 = 6.821318656 initrd.img.old 2
===================== sda4: ls -l /etc/grub.d/ (filtered) ======================
-rwxr-xr-x 1 root root 12808 Feb 24 19:47 10_linux
-rwxr-xr-x 1 root root 11298 Feb 24 19:47 20_linux_xen
-rwxr-xr-x 1 root root 12059 Feb 24 19:47 30_os-prober
-rwxr-xr-x 1 root root 1418 Feb 24 19:47 30_uefi-firmware
-rwxr-xr-x 1 root root 214 Feb 24 19:47 40_custom
-rwxr-xr-x 1 root root 216 Feb 24 19:47 41_custom
====================== sdb/boot/grub/grub.cfg (filtered) =======================
Try Ubuntu without installing
Install Ubuntu
OEM install (for manufacturers)
Check disc for defects
==================== sdb: Location of files loaded by Grub =====================
GiB - GB File Fragment(s)
?? = ?? boot/grub/grub.cfg 1
======================== Unknown MBRs/Boot Sectors/etc =========================
Unknown BootLoader on sdb
00000000 45 52 08 00 00 00 90 90 00 00 00 00 00 00 00 00 |ER..............|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 33 ed fa 8e d5 bc 00 7c fb fc 66 31 db 66 31 c9 |3......|..f1.f1.|
00000030 66 53 66 51 06 57 8e dd 8e c5 52 be 00 7c bf 00 |fSfQ.W....R..|..|
00000040 06 b9 00 01 f3 a5 ea 4b 06 00 00 52 b4 41 bb aa |.......K...R.A..|
00000050 55 31 c9 30 f6 f9 cd 13 72 16 81 fb 55 aa 75 10 |U1.0....r...U.u.|
00000060 83 e1 01 74 0b 66 c7 06 f3 06 b4 42 eb 15 eb 02 |...t.f.....B....|
00000070 31 c9 5a 51 b4 08 cd 13 5b 0f b6 c6 40 50 83 e1 |1.ZQ....[...@P..|
00000080 3f 51 f7 e1 53 52 50 bb 00 7c b9 04 00 66 a1 b0 |?Q..SRP..|...f..|
00000090 07 e8 44 00 0f 82 80 00 66 40 80 c7 02 e2 f2 66 |[email protected]|
000000a0 81 3e 40 7c fb c0 78 70 75 09 fa bc ec 7b ea 44 |.>@|..xpu....{.D|
000000b0 7c 00 00 e8 83 00 69 73 6f 6c 69 6e 75 78 2e 62 ||.....isolinux.b|
000000c0 69 6e 20 6d 69 73 73 69 6e 67 20 6f 72 20 63 6f |in missing or co|
000000d0 72 72 75 70 74 2e 0d 0a 66 60 66 31 d2 66 03 06 |rrupt...f`f1.f..|
000000e0 f8 7b 66 13 16 fc 7b 66 52 66 50 06 53 6a 01 6a |.{f...{fRfP.Sj.j|
000000f0 10 89 e6 66 f7 36 e8 7b c0 e4 06 88 e1 88 c5 92 |...f.6.{........|
00000100 f6 36 ee 7b 88 c6 08 e1 41 b8 01 02 8a 16 f2 7b |.6.{....A......{|
00000110 cd 13 8d 64 10 66 61 c3 e8 1e 00 4f 70 65 72 61 |...d.fa....Opera|
00000120 74 69 6e 67 20 73 79 73 74 65 6d 20 6c 6f 61 64 |ting system load|
00000130 20 65 72 72 6f 72 2e 0d 0a 5e ac b4 0e 8a 3e 62 | error...^....>b|
00000140 04 b3 07 cd 10 3c 0a 75 f1 cd 18 f4 eb fd 00 00 |.....<.u........|
00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001b0 dc 03 00 00 00 00 00 00 9d 7a 03 6e 00 00 80 00 |.........z.n....|
000001c0 01 00 00 7e e0 fd 00 00 00 00 40 60 3f 00 00 fe |...~......@`?...|
000001d0 ff ff ef fe ff ff ec 2e 00 00 40 13 00 00 00 00 |..........@.....|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200
=============================== StdErr Messages ================================
File descriptor 63 (pipe:[103038]) leaked on lvs invocation. Parent PID 24939: /bin/bash
Suggested repair: ______________________________________________________________
The default repair of the Boot-Repair utility would reinstall the grub-efi-amd64-signed of
sda4,
using the following options: sda1/boot/efi,
Additional repair would be performed: unhide-bootmenu-10s use-standard-efi-file restore-efi-backups
Final advice in case of suggested repair: ______________________________________
Please do not forget to make your UEFI firmware boot on the Ubuntu 18.04.5 LTS entry (sda1/efi/****/shim****.efi (**** will be updated in the final message) file) !