How to edit fstab from a tty1 prompt (SOLVED)

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
Larry78723
Level 7
Level 7
Posts: 1810
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

How to edit fstab from a tty1 prompt (SOLVED)

Post 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
Last edited by Larry78723 on Mon Dec 30, 2019 2:16 am, edited 1 time in total.
Image

rickNS
Level 5
Level 5
Posts: 695
Joined: Tue Jan 25, 2011 11:59 pm

Re: How to edit fstab from a tty1 prompt

Post 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.
Mint 19.0 mate on 2 identical Thinkpad T420's

rickNS
Level 5
Level 5
Posts: 695
Joined: Tue Jan 25, 2011 11:59 pm

Re: How to edit fstab from a tty1 prompt

Post by rickNS »

EDIT; didn't read title of other thread well enough.
Last edited by rickNS on Sun Dec 29, 2019 10:50 pm, edited 1 time in total.
Mint 19.0 mate on 2 identical Thinkpad T420's

rene
Level 14
Level 14
Posts: 5270
Joined: Sun Mar 27, 2016 6:58 pm

Re: How to edit fstab from a tty1 prompt

Post by rene »

Code: Select all

sudo mount -o remount,rw /

User avatar
Larry78723
Level 7
Level 7
Posts: 1810
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: How to edit fstab from a tty1 prompt

Post 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,
Image

User avatar
Larry78723
Level 7
Level 7
Posts: 1810
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: How to edit fstab from a tty1 prompt

Post 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.
Last edited by Larry78723 on Sun Dec 29, 2019 10:53 pm, edited 1 time in total.
Image

rene
Level 14
Level 14
Posts: 5270
Joined: Sun Mar 27, 2016 6:58 pm

Re: How to edit fstab from a tty1 prompt

Post by rene »

Pardon brevity; commenting from tablet. Try more fully mount -o remount,rw /dev/sda2 /

User avatar
Larry78723
Level 7
Level 7
Posts: 1810
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: How to edit fstab from a tty1 prompt

Post 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.
Image

rene
Level 14
Level 14
Posts: 5270
Joined: Sun Mar 27, 2016 6:58 pm

Re: How to edit fstab from a tty1 prompt

Post by rene »

cheers, and g'night :D

User avatar
Larry78723
Level 7
Level 7
Posts: 1810
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: How to edit fstab from a tty1 prompt

Post by Larry78723 »

I spoke to early, on reboot I'm back to the grub prompt. :cry:

Going to bed. Will work on it tomorrow.
Last edited by Larry78723 on Sun Dec 29, 2019 11:21 pm, edited 1 time in total.
Image

User avatar
trytip
Level 12
Level 12
Posts: 4499
Joined: Tue Jul 05, 2016 1:20 pm

Re: How to edit fstab from a tty1 prompt

Post by trytip »

next time just boot with a live mint and edit as root
Image

User avatar
Larry78723
Level 7
Level 7
Posts: 1810
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: How to edit fstab from a tty1 prompt

Post by Larry78723 »

trytip, it wont boot from a USB that's EFI, only Legacy. I need EFI support.

g'night.
Image

User avatar
Larry78723
Level 7
Level 7
Posts: 1810
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

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

Post by Larry78723 »

Solved by first deleting sda1 (EFI) and sda2 (/) with GParted then reinstalling
Image

Post Reply

Return to “Newbie Questions”