Edit FSTAB from live USB?

I did a really bad dumb. I setup a cache SSD drive for a large capacity HDD using lvm cache, and then set auto mounting rules for it in /etc/fstab. Unfortunatly I set it to mount with the "defaults" tag, causing the system to hang without the drives needed for the lv_cache. I didn't realize I had done something so dumb until later. After a power loss (system force shut itself off because of bad overclock) the cache became corrupted which causes the system to drop me into emergency mode EXTREMELY early in the boot process to the point where I cant even access the console locally. I was able to figure this all out by booting the system from a live usb and mounting the btrfs system and inspecting the logs with:
journalctl --directory=/mnt/sysroot/var/log/journal/ -xb
journalctl --directory=/mnt/sysroot/var/log/journal/ -xb
I tried to modify the fstab stored here:
/mnt/sysroot/ostree/deploy/default/deploy/2956c03b85761d3e89d8868ef0827059405e37df8c1daa193c6edcf75b700ce7.0/etc/fstab
/mnt/sysroot/ostree/deploy/default/deploy/2956c03b85761d3e89d8868ef0827059405e37df8c1daa193c6edcf75b700ce7.0/etc/fstab
, however its not writable? Even though I am editing it from a live USB? I thought maybe I could overlay a new one by creating one here:
/mnt/sysroot/ostree/deploy/default/var/etc/fstab
/mnt/sysroot/ostree/deploy/default/var/etc/fstab
but that didnt seem to stick when I rebooted the system. How do I modify FSTAB if I can't boot the system and its read only when not booted?
Solution:
NVM I am still dumb. Just needed to mount the btrfs volume as R/W
Jump to solution
1 Reply
Solution
Cm4nXD
Cm4nXD2mo ago
NVM I am still dumb. Just needed to mount the btrfs volume as R/W

Did you find this page helpful?