Locked out of system after removing HDD

I’m looking for some help getting back into my Fedora 42 (Gnnome) workstation system.

Backstory
A harddisk in my system was reporting (SMART) that failure was imminent. This seemed reasonable given the age of the drive. This drive is used for storage, I double checked for any important files and put them somewhere else. After that I unmounted the drive and reformatted it so that I could take it out of the system and dispose of it.

Problem
When I rebooted the system with the disk removed I was greeted with a screen I haven’t seen before.

You are in emergency mode.
<snip>
Cannot open access to console, the root account is locked.
<snip>
Press Enter to continue.

Pressing enter gives the same screen again. Reconnecting the drive and rebooting also results in this screen.

Booting with any of the other kernels in grub gives the same result.

I’m not sure how to proceed from this point, so help is greatly appreciated.

I have a Fedora Live USB at the ready, so I have access to that.

It sounds like you may have had the drive configured to mount automatically in your /etc/fstab without the nofail option.

You’ll want to boot into your live USB, mount the disk for the current install, and check the fstab file there for the disk you removed!

If you can spot the disk in there (probably by mount point), you should comment out the line or remove it, and reboot the system.

4 Likes

To double-check, this drive isn’t where the /home dir was located? Root Account Locked :: Fedora Docs

(You’ll be able to see this when you check /etc/fstab like @sparrow suggested.)

Thanks for the replies, I will check fstab. I found that idea in other topics as well but didn’t understand I had to check the disk for the current install for that.

I’m unsure if /home dir was located on this drive. I did have it setup that it auto-mounted. When I clicked ‘videos’ in Nautilus it would redirect to a file on this drive. Fedora/linux maintenance is very new to me, so I’m struggeling a bit.

edit:

The disk was indeed still configured in /etc/fstab.

/dev/disk/by-uuid/DE7A99547A9929F3 /media/storage auto defaults,x-gvfs-name=Storage 0 0

I commented it out and successfully rebooted the system. great! I also saw that /home was located on my main disk.

Thanks @sparrow and @pg-tips!

2 Likes

there was an issue with false alarms regarding SMART values.
So you maybe want to update system and then check the disk again.

2 Likes

Great! One thing to note (@sparrow alluded to it earlier), you can specify nofail in the fstab so that a failure to mount doesn’t block booting.

So for example if you had this in the fstab…

/dev/disk/by-uuid/DE7A99547A9929F3 /media/storage auto defaults,nofail,x-gvfs-name=Storage 0 0

…then the system should boot even if that drive isn’t found. It can be useful to specify this for any mounts that aren’t mission-critical.

2 Likes

Well, I was going to comment on this issue and solution, but to my right it states" This topic has a solution already.
Only reply here if:

  • You have additional details on the existing solution.
    I have no additional details, just a suggestion, so… I’ll keep my mouth shut.