I was editing my windows partition smaller, from within windows (the partition was on not on the main windows drive, but on my fedora drive). When I wanted to log in to fedora again I was in emergency mode. I need to give my root password, but it doesn’t work (The system says it’s wrong). I have tried changing the password with a live usb and chroot, still didn’t work. Could someone help me?
Edit: The screen where I am need to give my root password looks like this:
Did you do any changes, while partitioning, that could have affected the entries in /etc/fstab?
I have had a similar issue (I didn’t have enough time to conclude if it was a bug and file it), where a LUKS-encrypted disk in /etc/fstab was not accessible anymore (deleted the corresponding entry in /etc/crypttab, but forgot to delete it in /etc/fstab) and was greeted with a similar message as yours.
If so, then while booting, on the GRUB selection menu you can edit the entry you’d like to boot from, and add rw init=/bin/bash to the kernel arguments. This will bring you to a console where you can perform basic commands.
Removing the entry from fstab referring to your altered partition might solve the issue.
Now I can get to the login screen, but my password doesn’t work. I tried to reset them from a live os, still nothing. The message I get is “Sorry, password authentication didn’t work. Please try again”.
You probably have a default US keyboard when you log in to the emergency mode. So if you have a password with swapped characters this will not work.
Did you set a root user while installing Fedora? If not you have to set a password for the root user and not for your user you installed your system. By default fedora has no password set on the root user and a restriction that root can not login without it.
Can you detail the steps taken when stuck in emergency mode, and after reaching the console? Is it possible that you tried to set/reset the root password? See also this quick doc.
When I in emergency mode my root password wasn’t recognized. I tried reseting my password with arch on a usb. The password still wasn’t recognized.
Then I saw you comment and commented out a line in the fstab file. After I did this I could boot to the graphical login screen. This is where I’m stuck because my user and root password don’t work.
I suggest you try to boot again into Rescue Mode, and follow the link that I’ve posted above to change root password, but instead change your user’s password, with passwd your-user-name (didn’t test if persistent).
I said, to enter in to the emergency mode you need the root password set and not your sudo password.
Please do not use Arch, use fedora F40 boot iso at least. And yes, you need to set a root password. The linked doc from @tqcharm is last edited in F36. As I do remember in the meantime we changed the behavior that on a workstation edition, you need to set root pw separately, to using the rescue mode.
Agree, you know that not the user name is decisive in linux, it is the ID behind it? So if you use another Distros as Fedora Linux, you might not set the password for the correct id. An you will have a mess.
Yes it can be painful when the power-save function not works fine in the live ISO.
When you bot, please check first in the power settings, if you can put the highest values or turn it off if possible. So it not should try suspend or siwtch of monitor.
You should be able to log in by temporarily enabling SELinux permissive mode at kernel level, by adding enforcing=0 to kernel arguments. Once logged in, you have to reset your permissions.
Normally when you are making a request, you have to give enough information, so that we do not have to guess to much. A good start point for your issues is Start Here. And please at least give some more tags to see on what you are woking.
Even if this topic has a solution I would like to know which edition/spin it was and after which action this happened that you had to enter in to the emergency mode?
Did you remove the Windows partition on your Fedora Linux drive and create a other one or just make it smaller?
So you did remove the Windows partition and it was still listed in fstab, what caused the issue that it not went further to the login screen?
After some testing I managed to reproduce my older issue, and possibly the OP’s one[1].
Oftentimes partitions/disks are being added to /etc/fstab with the defaults mount options. While this is suitable for system partitions, such as /boot, it can cause issues with non system-critical partitions, when these are not available at boot time for whatever reason. If instead of defaults, the nofail mount option (besides other specific ones[2]) is being used, then a non-mountable partition or disk will not be reported with errors and, hence, no emergency mode prompted.
Hopefully the OP will provide you with the details requested. ↩︎