I have rendered my system unbootable. Help?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
redshirtsteve

I have rendered my system unbootable. Help?

Post by redshirtsteve »

I have shot myself in the foot by getting cocky and editing my stab and rebooting. Now my MacBook Pro (ext4) will only boot to a command line with the fs in read-only mode.

I have my ext4 live usb stick, but cannot seem to figure out how to boot from it in this state. Can any assist?

TIA for any and all assistance!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
JerryF
Level 16
Level 16
Posts: 6572
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: I have rendered my system unbootable. Help?

Post by JerryF »

How did you boot from the USB originally to install?
Mute Ant

Re: I have rendered my system unbootable. Help?

Post by Mute Ant »

From the read-only command line, you can try...
sudo mount -o remount,rw /
...which often allows the waiting-in-the-wings Xorg to start.
User avatar
wallyUSA
Level 6
Level 6
Posts: 1439
Joined: Thu Jun 08, 2017 2:31 pm
Location: Top of Georgia

Re: I have rendered my system unbootable. Help?

Post by wallyUSA »

Hold down the Option key while you boot should give you the boot from USB option.
> If your query has been resolved, edit your original post and add <SOLVED> to the beginning of the subject line. This may help others find solutions. <

Dell Latitude 7490 Mint 21.3 Ker 5.15.0-105 Cinn 6.0.4
prestonR

Re: I have rendered my system unbootable. Help?

Post by prestonR »

First you'll need to either figure out how to boot your LiveUSB or work out how to edit fstab from the command line. Should be something like:

Code: Select all

cd /etc
to change to the 'etc' folder

Code: Select all

sudo leafpad fstab
where 'leafpad is your text editor
That should open fstab. Here you find the UUIDs of the boot, root and swap partitions that your system is expecting to find.

Now open a second terminal to check the real UUIDs of the partitions currently connected to your machine. Do:

Code: Select all

sudo blkid
to list all and try to identify the relevant partitions and if there are discrepancies go back to the terminal with your open fstab and correct the entry.
User avatar
Pierre
Level 21
Level 21
Posts: 13227
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: I have rendered my system unbootable. Help?

Post by Pierre »

if you insist on getting cocky and editing things like the /fstab
( don't be shy, we've all done something similar )
then - - always, always,, create a backup file - it's so easy to do, that you will think that you don't need to :lol:
- - File - Save As - OriginalFileName.bak ( I'll sometimes use *.org - - original )
and Then, only Then,, make the changes that you are testing out.

if worst, comes to worst,, then you boot into an Live Environment & change the filename, back again.
- and delete the faulty file, of course . .
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
redshirtsteve

Deleted / entry from fstab -- please assist in getting a new install on my MacBook Pro?

Post by redshirtsteve »

I have linux-mint 18.3 installed on my MacBook Pro (2012.)

I have shot myself in the foot by getting cocky and editing my fstab and rebooting. I am pretty sure I removed the line to mount /.

Now my MacBook Pro (ext4) will only boot to a command line with the / fs in read-only mode.
I have my ext4 live usb stick, but cannot seem to figure out how to boot from it in this state. Can you assist? I am just looking to get a clean install of linux-mint 18.3 cinnamon back on this machine.

TIA for any and all assistance!
WharfRat

Re: Deleted / entry from fstab -- please assist in getting a new install on my MacBook Pro?

Post by WharfRat »

See if you can use sudo mount -o remount,rw / to remount it read/write then you can fix the fstab file with nano.
User avatar
all41
Level 19
Level 19
Posts: 9524
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Deleted / entry from fstab -- please assist in getting a new install on my MacBook Pro?

Post by all41 »

I usually copy an fstab entry, place a # at the beginning of the line to comment it out,
then paste the copied line below it and make changes there.
This makes reversing the process or spotting entry errors easy.
Everything in life was difficult before it became easy.
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: Deleted / entry from fstab -- please assist in getting a new install on my MacBook Pro?

Post by fabien85 »

This is a duplicata of the following post: viewtopic.php?f=46&t=259325&p=1400193#p1400193
Maybe a moderator can merge the threads. Answers are given in both.

@redshirtsteve please make a single post about your problem next time
Mute Ant

Re: Deleted / entry from fstab -- please assist in getting a new install on my MacBook Pro?

Post by Mute Ant »

You can boot a USB without any other drive attached, so whatever you did in /etc/fstab is, really, irrelevant to getting your machine to boot, if all you want to do is re-install Mint.
User avatar
Moem
Level 22
Level 22
Posts: 16238
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: I have rendered my system unbootable. Help?

Post by Moem »

Mod note:
Topics merged. Please don't double post. Thanks!
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
redshirtsteve

Re: Deleted / entry from fstab -- please assist in getting a new install on my MacBook Pro?

Post by redshirtsteve »

WharfRat wrote:See if you can use sudo mount -o remount,rw / to remount it read/write then you can fix the fstab file with nano.
Thank you so much!

I have gotten my install booted, and will attempt to figure out the next steps! Actually, any advice you may have regarding what those next steps might in fact be would be greatly appreciated!

Thanks again!
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: I have rendered my system unbootable. Help?

Post by fabien85 »

The next step was given by prestonR above:
- use blkid to find out what your partitions are and their uuid
- edit the fstab as root to correct it: sudo nano /etc/fstab (ctrl+O to save the file, ctrl+X to quit)

For reference, the following are excerpts of my fstab, if you need example of the syntax and options

Code: Select all

# / 
UUID=blabla  /               ext4    errors=remount-ro  0       1
# EFI partition 
UUID=blabla   /boot/efi       vfat    noatime,utf8,fmask=0133,errors=remount-ro      0       1
# Swap
UUID=blabla  none  swap  defaults  0  0
Locked

Return to “Installation & Boot”