FSTAB CONQUERED ME. ;D My computer will not start

And I’m to stubborn to comment out the drives that I added…

I was fixing a lot with my computer, and then I got this nice error yesterday, I couldn’t delete anything either… Talking about Snapper, and it’s chaotic way of doing things, eventually I gave up on it, since i couldn’t get anything loaded, because it was 4 TB backups on a 250GB nvme storage.

So I came up with the brilliant Idea of having something of both worlds, I could mount another drive to that folder, and then format it every time it got full, because of it not deleting the images often enough.

I have been working on some changes on the ArchTitus script. I’m calling my fork of it ArchTitus-Q, even though it’s still named ArchTitus out of convenience, but later on I’m probably going to just change the path etc, and when I learn more about settings etc.

I’m probably going to make a full on change on that script, but I’m currently working on a couple of others scripts, that will automate my hell start-up, but I needed to try it out first, but I think I fudged up the fstab table royally.

I don’t think I have the right settings at all. It might be because of the error messages that I get, and I can’t log in at all, so I had to live boot another system, I recommend Garuda … Only the Dragonized though, because, apparently I could go about and live my life with the root drive as if it’s a windows harddisk. hahaha

This is what I have done with /etc/fstab

The text in the top is because my script opens up kate, and lets after basically this here fstab was written, but I don’t know what to do now. I have been searching around for hours now, and I still don’t get it, there are 4 million ways to give privileges, there are as many ways to mount a drive, but I have always preferred fstab, BUT, i haven’t been in one for years now…

Can’t even remember what to use. It would be nice with some hints to where I can read up on what to use, or if someone can give me a plain answer for what’s best for the sake of the computer.

I actually got everything to work with my script… It’s just this damn fstab… "/ When I said that I have been looking at it for hours, that’s because when I did the script, I tried to re-create what I had before the re-install, but It was not really working for me. "/ At all.

1 Like

what was the output of journalctl -xb? it might give us an indication as to whats failing in the fstab

fstab entries get parsed by systemd and get turned into units that end up being required for various things… so when mounting fails you end up being dropped into “recovery”

There’s various mount options that only make sense to systemd - for example you can make some mount points non-essential and can control retries and late mounting and so on.

OTOH I think they’re described in man systemd-mount but I’d have to check.


nofail,x-systemd.device-timeout=99999h

I have this specified for one of my encrypted filesystems in order to allow most of my system to boot, except the things that depend on this mount point… until I unlock the volumes.

It may work for your use case as well.

Did you miss the other thing? Console failed, so I couldn’t write anything.

Going to check that. I need a default setting for harddrives though. I was thinking, I might just change the /.snapshots to default and see what happens…

UPDATE!!

I am now able to get into my system…

This is however the status for the moment. I don’t get it why it’s a red asterisk… Also I have this fail when I try to create a snapshot. I think it’s because of the timeline. I will have to disable and re-enable or restart the service.

If you are working with the fstab a lot, and labelling the volumes carefully, why not use the labels? They’re much more readable and less error-prone than UUIDs. (Though I must admit, yours is the most readable one using UUIDs I’ve seen.) Here’s mine:

#file system   mount       type    options                      dump pass 
LABEL=main     /           btrfs   defaults,subvol=@r,noatime     0   1
LABEL=main     /home       btrfs   defaults,subvol=@h,noatime     0   2
PARTLABEL=swap none        swap    sw                             0   0
LABEL=EFI      /boot/efi   vfat    umask=000,noatime,noauto,user  0   1
#
#john's extra mounts
# the true root of the btrfs volume for convenience
LABEL=main     /t          btrfs   defaults,noatime               0   0
# the new hard drive for miscellaneous stuff
LABEL=stuff    /mnt/stuff  btrfs   defaults,noatime,noauto,user   0   2

# mounts on the old Seagate, which is MBR
LABEL=pics     /mnt/pics   ext4    defaults,noatime,noauto,user   0   2
LABEL=vm       /mnt/vm     ext4    defaults,noatime,noauto,user   0   2  
LABEL=work     /mnt/work   btrfs   defaults,noatime,noauto,user   0   2
LABEL=qhome    /mnt/qhome  ext4    defaults,noatime,noauto,user   0   2

If I want to boot into a snapper snapshot, I usually snapshot it to some nice name first. I have a grub menu entry referring to “@link”, and link that to the name I want to use.

1 Like

That was awesome, are those the only rights that are needed? because there was some really strange settings on mine, I get it with the SSD thing etc, but you have the label main three times, how does that work? I should change my settings… Why is main /t loaded at the same time as the swap, and then the system and boot and then the rest? I will have to look into it. Also I should probably change the home folder to a separate partition, but I don’t know how big the system actually needs to be to be honest. 25? 30? 45? Should I make a main partition that is 50GB and then have the rest for home?

The main mounts are different btrfs subvolumes. Ubuntu installs root to “@” and /home to “@home”, which I’ve renamed to @r and @h to make scripts neater. The /t mount, to the btrfs root subvolume, is unnecessary, but very convenient; for example, for renaming subvolumes. With btrfs the multiple mounts into the same fs are just like bind mounts, with the same potential for confusion, both of the user and the system.

1 Like

Are you referring to the “pass” column? IIUC that’s from an ancient setting for the order “fsck” would run on boot to detect unclean shutdowns; I imagine modern boots are done in parallel, and fsck is superseded on journalling file systems anyway.

1 Like

I don’t get your question, sorry. A major advantage of btrfs is that you don’t need separate partitions, subvolumes separate things nicely, and free space is pooled. That juggling and sizing of partitions is left behind. Great for smallish SSDs. Anyway, the size of /home is nearly entirely up to your data, though I suppose browser caches go in /home by default, and one should allow at least 1 GB for each browser if you keep them there. (For backup purposes IMO it’s a good idea to move them somewhere else.)

Wait, I have had a bit of a problem comprehending this whole thing with subvolumes. Can I mount the drive in one place and then have it link it from a subvolume?

Say I want to mount a drive to a file in the root system, and then choose subvolume at a whole other place?

LABEL=TEST /test btrfs defaults,noauto,noatime,user,subvol=/@home/$user/Destiny 0 2

ALSO! I’m testing what you said, but I’m not going to do it without a backup plan. :stuck_out_tongue_winking_eye: haha

# Static information about the filesystems.
# See fstab(5) for details.

###################################################  /etc/fstab  ####################################################
#
#                       <FILE SYSTEM> <DIR> <FILE/PARTITION> <MOUNTING OPTIONS> <DUMP> <PASS>
#
#################################################### SYSTEM DISK #####################################################
# /dev/nvme0n1p3 LABEL=ROOT
# UUID=e7573650-15de-4a72-97d6-3df66b677e21 / btrfs rw,relatime,ssd,space_cache=v2,subvolid=256,subvol=/@       0 0
LABEL=ROOT      /       btrfs   rw,relatime,ssd,space_cache=v2,subvolid=256,subvol=/@   0 0

# /dev/nvme0n1p2 LABEL=EFIBOOT
# UUID=198D-5496 /boot  vfat    rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro   0 1
LABEL=EFIBOOT   /boot   vfat    rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro   0 1

# /dev/sdc1 LABEL=SNAPS
# UUID=f90bf1bc-28da-4210-9e52-9c0e3b10b698 /.snapshots btrfs defaults,subvol=/@.snapshots 0 1
LABEL=SNAPS     /.snapshots     btrfs   defaults,subvol=/@.snapshots    0 1

# /dev/sdc2     LABEL=SWAP
# UUID=4b6c95d9-bc87-445a-a675-92c06820b9a4 none swap defaults 0 1
LABEL=SWAP      none    swap    defaults        0 0

################################################### SIDE-SHOW BOB ####################################################

# /dev/sda1     LABEL=VIDEO 
# UUID=B0B25B2CB25AF5F6 /home/querzion/Video/M-S ntfs defaults,auto,noatime,subvol=/@home/querzion/Video/M-S 0 2
LABEL=VIDEO     /home/querzion/Video/M-S        ntfs    defaults,noatime,noauto,user,subvol=/@home/querzion/Video/M-S    0 2

# /dev/sdb1     LABEL=SLOW
# UUID=59cfb494-9180-4842-a25b-e028d166a382 /home/querzion/Games/Slow ext4 defaults,noatime,auto 0 2
LABEL=SLOW      /home/querzion/Games/Slow       ext4    defaults,noatime,noauto,user,subvol=/@home/querzion/Games/Slow    0 2

# /dev/nvme1n1p1  LABEL=FAST
# UUID=18379480-32ad-42b4-b251-75571a7ddc20 /home/querzion/Games/Fast btrfs defaults,auto,noatime,ssd,space_cache=v2 0 2
LABEL=FAST      /home/querzion/Games/Fast       btrfs   defaults,noauto,noatime,user,ssd,space_cache=v2,subvol=/@home/querzion/Games/Fast        0 2```

Firstly, “$user” in an fstab would not be good. So let’s use “querzion”.
Secondly, “@home/querzion/Destiny” has to be a subvolume, made with btrfs subvolume create, or btrfs subvolume snapshot, not just a directory called Destiny in /home/querzion. (Though you could use a bind mount for an ordinary directory, in most file system types.)

If so, yes, you can do that. I tried it and here’s the last line of the output of “mount”:

    /dev/sda2 on /test type btrfs (rw,relatime,ssd,space_cache,subvolid=12827,subvol=/@h/querzion/Destiny)

A reason to do this would be to have a different backup strategy and schedule for the files in there, with btrfs send/receive incrementals. And you’d have to be mindful of this, a send/receive backup of @h would not include @h/querzion/Destiny.

With these mounts the file system is not really a directed acyclic graph (aka “tree”, loosely) any more, which can lead to the confusion I mentioned earlier.

Something else was bugging with your scheme. Snapper (at least on my Ubuntu 21.10) puts its snapshots in a subvolume called “.snapshots” in the subvolume that gets snapshotted. You’ve got a separate partition… you can’t have a snapshot of x in partition p of y in partition q, that’s not how snapshots work. (Snapshotting is nearly instant, it’s just a new node in the b-tree.) Maybe you’re using a snapper add-on that does backups like that; I suppose x can be a backup of y. If so, I find it confusing.

1 Like

Lulw

Very interesting lecture. Thanks. ^^

I removed all the subvolumes, because it was confusing for me too. "/ :stuck_out_tongue_winking_eye: