F-42 no boot, root locked

Hello all,

Decided to put F-42 on wifes laptop, all went well until I edited fstab for second drive wrong.

Root locked, I edited grub, ro to rw init=/sysroot/bin/sh and have /root# command line.

Now lost, no cammand I try works.

Thanks in advance,
zzwolfz

Assuming normal USB conections, you should be able to boot a Fedora Live CD. From there you can mount the unbootable partition and edit file /etc/fstab.

Thanks…

Yes usb and iso

Currently I’m in bash using init=/bin/bash
fixed the error and now trying to figure out how to save the edit

You need to open the editor with root privileges, e.,g, sudo vi ...

did sudo .. made edit.. how to save and exit

Which editor? vi, vim, nano, or ? vi or vim uses <Esc>:x, nano has reminders at the bottom of the screen.

vi.. nano with sudo said unwritable.. tried vi again and again.. it also says unwritable (didn’t see it, is such fine print)

All this time, could of removed that second drive or just re-install, even tried umount on drive, said wasn’t mounted

Not giving up, will try LIVE usb.

You should be able to mount the root partition on the system drive using Gnome Disks, then edit using sudo vi <mount_location>/etc/fstab. Note that Linux may mount a damaged filesystem as read-only.

There is a chance that file ‘/etc/fstab’ has read-only permissions. If so you can save any changes made with vi or vim using the command string 'w!" (lower case w followed by !)

While in rescue mode, you can check if it’s a general permission issue by trying to create a file with:

# touch /etc/testfile

Do you receive any error message, or is the file being created? Please also see this HowTo, to make sure you’re following the right steps[1].

It’s generally a good idea for non-system drives to be added in fstab with the nofail flag, so that potential issues don’t make the system unbootable.


  1. Except that instead of changing the root password, you’re editing /etc/fstab. ↩︎

1 Like

Thanks all,

Used live usb, mounted, instead of fixing fstab I gave root a password just to see if bash bin worked, and it did. I also removed the password afterwards.

I’ve never used vi, found a command cheat, no idea how to execute, but will load a vm to learn a bit.

KDE

Was done when I fixed wrong mount point

After all this time of learning a bit more, a gallon of super glue putting my last grey hair over the hole in my head, I yanked that second drive out. The laptop is several years old, bought new with Win 10pro with 256g hd, it booted. Wife gave to somebody for Arch install, 1tb os and 2tb storage, there was 22g used. Four bios entries for os, fat32 storage, etc.

Biggest leason learned, NEVER touch wifes laptop without a signed certified agreement.

Thanks all,
zzwolfz

[1]F-42 KDE wasn’t bloated like everyone elses, but I’ll still go Gnome, add 2 of 50+/- kde packages. Have the enviroment with no dolphin, konsole, wobblely windows, etc.


  1. Footnotes ↩︎

1 Like

You can use nano instead. When trying to fix a problem, that is not a good time to learn vi.