Page 1 of 1

How to edit fstab from a tty1 prompt (SOLVED)

Posted: Sun Dec 29, 2019 8:26 pm
by Larry78723
This started with a problem getting my machine to boot at all (see viewtopic.php?f=46&t=308349). I managed to get it to a tty1 prompt and ran blkid and cat /etc/fstab and found an error for sda2(/) UUID in fstab. Now I need to know how to edit fstab while in a tty prompt. I tried startx to get into the desktop but it failed.

EDIT: Tried running sudo nano /etc/fstab from the tty prompt and editing the UUID but tells me system is read only when I try to save it. How do I fix this?

TIA,
Larry

Re: How to edit fstab from a tty1 prompt

Posted: Sun Dec 29, 2019 10:11 pm
by rickNS
Don't know Larry, I was just able to do exactly that, log into tty1, and edit fstab (save change, and exit)

I guess my question is do you have more than one user on your machine, who did you log into tty1 as ? Would that even make a difference, don't know.

Re: How to edit fstab from a tty1 prompt

Posted: Sun Dec 29, 2019 10:18 pm
by rickNS
EDIT; didn't read title of other thread well enough.

Re: How to edit fstab from a tty1 prompt

Posted: Sun Dec 29, 2019 10:23 pm
by rene

Code: Select all

sudo mount -o remount,rw /

Re: How to edit fstab from a tty1 prompt

Posted: Sun Dec 29, 2019 10:33 pm
by Larry78723
Thanks for the reply, Rick. I'm the only user on this machine. For some reason, the entire partition is now read only so can't edit anything. I'm running 19.3 and set a root password so I may try logging into tty1 as root and changing permissions.

Note: I found that I can boot from a legacy USB, but not an EFI USB. From a legacy USB, I can mount the / partition but can't make any changes because it's 'Read Only'.

EDIT: @rene just saw your response and will let you know what happens,

Re: How to edit fstab from a tty1 prompt

Posted: Sun Dec 29, 2019 10:48 pm
by Larry78723
@rene thanks for the effort but it didn't work. The UUID has changed and I get the following message. :mount: /: can't find UUID=xxxxx-xxx-xxxx-xxxxx

Is there a way to mount a partition by identifying the UUID? I got the new id by running blkid.

Re: How to edit fstab from a tty1 prompt

Posted: Sun Dec 29, 2019 10:53 pm
by rene
Pardon brevity; commenting from tablet. Try more fully mount -o remount,rw /dev/sda2 /

Re: How to edit fstab from a tty1 prompt

Posted: Sun Dec 29, 2019 10:56 pm
by Larry78723
@rene - that took me to the login and desktop. A big thank you. Now I'll edit fstab so it has the correct UUID.

Re: How to edit fstab from a tty1 prompt

Posted: Sun Dec 29, 2019 10:58 pm
by rene
cheers, and g'night :D

Re: How to edit fstab from a tty1 prompt

Posted: Sun Dec 29, 2019 11:19 pm
by Larry78723
I spoke to early, on reboot I'm back to the grub prompt. :cry:

Going to bed. Will work on it tomorrow.

Re: How to edit fstab from a tty1 prompt

Posted: Sun Dec 29, 2019 11:20 pm
by trytip
next time just boot with a live mint and edit as root

Re: How to edit fstab from a tty1 prompt

Posted: Sun Dec 29, 2019 11:23 pm
by Larry78723
trytip, it wont boot from a USB that's EFI, only Legacy. I need EFI support.

g'night.

Re: How to edit fstab from a tty1 prompt (SOLVED)

Posted: Mon Dec 30, 2019 2:19 am
by Larry78723
Solved by first deleting sda1 (EFI) and sda2 (/) with GParted then reinstalling