Broke my system with fstab

Hi. I need help please.
Today I formatted and converted my secondary drive (HDD) from FAT32 to Ext4.
After doing so my system wouldn’t mount it. So I tried to see if it was a problem with fstab (where I set it up so that it would mount the HDD automatically). I did a backup before modifying it. When I rebooted the system it wouldn’t even boot. My motherboard asks for a bootable device. I’m using a Live USB now and even after restoring the backup the result is the same. My /dev/sdb1 partition on SSD (the primary drive) has still the boot flag on, the only thing strange is that now i see this /dev/loop* devices that I never created. All the SSD files are still there. Anyone knows how can I make my system to boot again?
Thank you for your time.

What change did you make to fstab?
Revert it if you can - via booting the live USB.

Formatting overwrites / changes the UUID of the hard disk. So the new UUID must also be entered in the fstab, otherwise the mount goes nowhere.

UUID=72c7f3df-ad4d-4ca1-9437-be88ce71b3f1 / ext4 defaults,noatime 0 1 tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

This is the only not commented line on fstab. It mounts the SSD. I commented the HDD mounting line to see if the problem was there. It is:
UUID=5641-8FA6 /home/sicro/hdd auto uid=sicro,gid=sicro,nosuid,nodev,nofail,x-gvfs-show 0 0

these are two lines - not just one:
UUID=72c7f3df-ad4d-4ca1-9437-be88ce71b3f1 / ext4 defaults,noatime 0 1
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

That UUID is quite short …
but it’s commented out, as you say - so it doesn’t (shouldn’t) have an effect
To be more clear: that UUID … isn’t one - it’s way too short

Did you make a backup of your /etc/fstab … ?

Yes I did. That was actually the backup as I restored it to see if it could change something. It didn’t. I’m also concerned about that /dev/loop* devices that appeared from nowhere. It’s so weird, /dev/sdb1 which is my boot and primary partition is fine and has the boot flag on.

That’s all pretty convoluted and unstructured.
I (for one) don’t understand what is what here - what is actual, what is backup, what is working, what is not …

I’m really sorry. I’m not that good at writing in English (not native).
The fstab lines that I shared are all from the backup. Since I already made a couple of attempts to restore the system. The only thing that is not working is that when I power up the computer it asks for a bootable device, but the fstab seems fine and the boot partition is still safe and sound with all it’s files there. I just don’t know where to look at to solve this.

sudo blkid shows you all your drives with their UUID. You then enter this UUID into fstab, done. I don’t really understand what can go wrong. Here is my fstab as an example:

UUID=5B6D-FCAC                              /boot/efi       vfat     umask=0077                   0        2
UUID=b5012ef2-4ba4-4dc7-a61e-153ed928846d   /               ext4     defaults,noatime             0        1
UUID=76c9bf53-88a4-4d70-8949-b23a590140a8   /home           ext4     defaults,noatime             0        2
UUID=03e72912-f57a-434f-94ce-951af2a06023    none           swap     defaults                     0        0
tmpfs                                       /tmp            tmpfs    defaults,noatime,mode=1777   0        0

I did it. But somehow my motherboard is still putting a black screen asking for a bootable device to be inserted. I have a boot partition with its flag on. I paste my fdisk -l here, maybe you can see if there’s something off. sdb is my SSD and boot partition with all the Linux files. sdc is the Live Usb and sda is the HDD.

Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-08W
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x2428da27

Device     Boot Start        End    Sectors   Size Id Type
/dev/sda1        2048 1953525167 1953523120 931.5G 83 Linux


Disk /dev/sdb: 447.13 GiB, 480103981056 bytes, 937703088 sectors
Disk model: WDC WDS480G2G0A-
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x77872cd3

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdb1  *     2048 937697984 937695937 447.1G 83 Linux


Disk /dev/loop0: 27.49 MiB, 28823552 bytes, 56296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 620.53 MiB, 650674176 bytes, 1270848 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 1.65 GiB, 1775550464 bytes, 3467872 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 667.84 MiB, 700276736 bytes, 1367728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdc: 14.44 GiB, 15502147584 bytes, 30277632 sectors
Disk model: DataTraveler 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot   Start     End Sectors Size Id Type
/dev/sdc1  *         64 6300795 6300732   3G  0 Empty
/dev/sdc2       6300796 6308987    8192   4M ef EFI (FAT-12/16/32)

Sorry, I can’t take anything from that. But there are many smart people here. Surely someone will soon appear here with the solution to your problem … :innocent:

1 Like

Thank you very much. I really hope so. :grin:

1 Like

I hate fstab. Fstab should die. Also you shouldn’t have to be ‘smarter’ to deal with stuff like this… to pretend to be smarter, as you solve these things you should keep some notes.

You can basically delete your fstab entries (except for your swap and system) and reboot… probably it’d work even if you removed fstab but no promises that’ll work. Be sure you have a handy dandy USB to boot from when it all goes t1ts up.

Then set up your mounts using gnome-disks which I found more idiot-friendly than editing fstab.

I also like names, so I don’t personally use UUID opting for partition names instead… I understand, for example, that my 4TB Toshiba main ext4 partition is labelled ‘T4’ so I mount it as /mnt/T4 rather than messing with UUID’s.

Then look at the article about how to set up systemd mounts by creating a file/entry in /etc/systemd/system.

There’s a good page to add to your Joplin notebook :wink:
So we’ll add this page to our Joplin notebook maybe:

You need to add the correct UUID as is shown by listing then using

$ lsblk -o PATH,LABEL,NAME,UUID

I have been using fstab for years just as everyone else. Then I decided to learn how to use systemd - and I came to the conclusion - waoo - this is much easier.

A second thing I learned is that for a very basic system - you don’t need fstab - yes - you don’t. If you ensure the correct partition type UUID the system will boot without fstab.

I wrote a guide for the now archived forum. The guide has been ported and can be read following below link

1 Like