Categories
general Linux

how to fix a incorrect fstab

If you messed up your fstab you may can’t boot your linux machine. You will need a recovery usb or disk attached to the system, also a dual boot linux will do the job.

Lets say you have missconfigured a fstab entry and the server is looping through the boot loader. You can fix the fstab file after booting from a recovery media with the following commands:

lvm vgscan -v
# this will show your vgs
vgchange -a y ubuntu-vg
# this will activate your vg with the name ubuntu-vg
lvs
# this will list your lvs
mkdir /mnt/mount
mount /dev/mapper/ubuntu-vg/ubuntu-lv /mnt/mount

Now your lv should be mounted and you can edit your fstab file under /mnt/mount/etc/fstab.

Leave a Reply

Your email address will not be published.