Broken Fstab

OK, firstly apologies for the noobness. I was trying to setup Timeshift snapshots and added a line incorrectly for the new subvolume in fstab, so now I can’t boot correctly. I tried to use kate to load fstab and comment out the errant line but have no idea how to actually load the file from kate then edit it. Can anyone advise how I can do this, thanks in advance!

You could use the terminal:

sudo nano /etc/fstab

When you have finished editing press Ctrl-X and answer Y(es) to save.

3 Likes

you boot on USB live Iso ,
you open a terminal

sudo lsblk -fs 
sudo parted -l 

after you can do a chroot to update /etc/fstab

<chroot>
nano /etc/fstab ( Ctrl + X for save )
sync
exit ( end chroot ) 

do not forget to update grub or systemd-boot if UUID concerns / or swap

1 Like

Many thanks for the quick replies, opening and fixing the file in nano did the job :slight_smile:

1 Like

There is another option while using kate. In the File Open dialog box inside kate, there will be a text field “Name”. There enter the name admin:///etc/fstab. You will be asked for password. This will open the fstab file in edit mode using root privileges. It is based on GVFS.

1 Like

Kate asks for a password when saving a file that needs elevated permissions.

1 Like

Haha you highlighted one issue I have with editing fstab… and whilst I can’t say I completely avoid it, I find it just better to load up gnome-disks…

No more typos :vulcan_salute: