Stuck in emergency mode

Ubuntu Version:
Example: 24.04 Server LTS

Desktop Environment (if applicable)
Not sure

Problem Description:
Out of nowhere ubuntu server started to put me into an endless emergency mode that i’ve been trying to get out of. Usually I would start the pc and it would boot up normally and use my plex server but eventually it started putting me into the emergency mode but after a minute or so it would take me right to the desktop (Weird).

Relevant System Information:
Nvidia 1660 ti, Lenovo thinkcentre m710s

Screenshots or Error Messages:
These are all the images from before I took out my plex drive (sorry for the bad pics)

These are the pics after I took out the drive

More error stuff

What I’ve Tried:
I tried to mount the hard drive but for some reason it wasn’t working in that boot screen and probably screwed up the filesystem using the wrong command and now it wont boot to desktop at all anymore. I’m using an old 1660 ti gpu if that could be causing any issues. I also took out my hard drive with my movies because I wanted to see if it could boot up without it but it still gave me the boot error.

Can you boot from a Live ISO, then scan your boot logs and syslogs (on the internal hard drive) to see if there is anything that you can spot out that is being flagged as an error of recognition/existince during the boot from internal?

1 Like

I’ve uploaded some more images not sure if they help, even using the live usb to get more information it freezes and then crashes quite often.

1 Like

To clarify what we are working with, you have a Live ISO image “burned” onto a USB stick, not an installed OS on a USB stick. Correct?

From the live ISO, can you open a terminal and share the info provided by the following command:

inxi -Fxxx
2 Likes

Yes i’m using a live iso image on the usb.

One of your pictures shows Dirty bit is set

During a live session, open a terminal and enter

sudo fsck /dev/sda1

Remove dirty bit

sudo fsck /dev/sda2

Please post the output within code tags </> for legibility

That shows, under Network, that your enp2s0 interface is up and running. You should be able to confirm that using ifconfig.

More importantly, you can use the browser from Live to connect to the forum if that makes life easier for you!



To clarify, is the reference to /dev/sdb in your first snapshots referring to the remaining drive that is now referenced as /dev/sda from Live?



Did you previously have “Automatic Unattended Updates” turned on?

If so (usually the cause of unexpected events like this), you will need to review the logs on the disk to see what were the most recent updates performed, in order to identify the likely suspect(s) package(s). Maybe, during those updates, there would have been a message(s) indicating a failed step, but not necessarily so.



Please confirm that this is not intended to be a dual-boot Win+Ubuntu setup.

1 Like
ubuntu@ubuntu:~$ ^C
ubuntu@ubuntu:~$ sudo fsck /dev/sda1
fsck from util-linux 2.41.3
fsck.fat 4.2 (2021-01-31)
/dev/sda1: 11 files, 1572/274657 clusters
ubuntu@ubuntu:~$ sudo fsck /dev/sda2
fsck from util-linux 2.41.3
e2fsck 1.47.2 (1-Jan-2025)
/dev/sda2: clean, 427414/15564800 files, 9412633/62238976 blocks
ubuntu@ubuntu:~$ 

Yes I believe the sdb mentioned is the remaining drive I currently have in right now which is my main internal drive and i’m not using a dual boot or wanting it to be one.

I avoided any kind of updates on my system whenever I thought it unnecessary.

ubuntu@ubuntu:~$ ifconfig
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
         netmask 255.255.255.0  broadcast 10.0.0.255
        inet6 2607:fea8:3564:f100:96c6:91ff:fe7a:2660  prefixlen 64  scopeid 0x0<global>
          prefixlen 128  scopeid 0x0<global>
          prefixlen 64  scopeid 0x20<link>
          txqueuelen 1000  (Ethernet)
        RX packets 36444  bytes 43681059 (43.6 MB)
        RX errors 0  dropped 48  overruns 0  frame 0
        TX packets 11363  bytes 1968744 (1.9 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2283  bytes 254084 (254.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2283  bytes 254084 (254.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

It is inadvisable to use fsck for repair of a Windows-type partition/disk which is what is being shown by the reference to “fsck.fat

Also, you are showing both the FAT partition (#1 on /dev/sda) and the EXT2/3/4 partition (#2 on the same /dev/sda).

          (3 lines deleted, per the following note)

EDIT: Revised stance, following the report publishing the lsblk results below. Proper interpretation per @tea-for-one 's interpretation below.


Also, you did not confirm that you have unattended updates/upgrades turned off. If not, you need to look at the logs to see what updates were performed just prior to when you started having problems booting.

As for repairing anything involving /dev/sda2, be sure to use the form

sudo   e2fsck  -f -y -v -t -C 0 "/dev/sda2" 2>&1

That way, you know it will not skip any testing.

1 Like

I’m not really sure whats on sda1 but originally when I bought the pc it had windows 11 on it which I wiped to install ubuntu on so maybe it could be something with that?

ubuntu@ubuntu:~$ sudo   e2fsck  -f -y -v -t -C 0 "/dev/sda2" 2>&1
e2fsck 1.47.2 (1-Jan-2025)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure                                           
Pass 3: Checking directory connectivity                                        
Pass 4: Checking reference counts
Pass 5: Checking group summary information                                     
                                                                               
      427414 inodes used (2.75%, out of 15564800)
        1192 non-contiguous files (0.3%)
         584 non-contiguous directories (0.1%)
             # of inodes with ind/dind/tind blocks: 0/0/0
             Extent depth histogram: 389726/471
     9412633 blocks used (15.12%, out of 62238976)
           0 bad blocks
          20 large files

      317806 regular files
       69651 directories
           8 character device files
           0 block device files
           0 fifos
          65 links
       39856 symbolic links (37117 fast symbolic links)
          84 sockets
------------
      427470 files
Memory used: 15572k/0k (2803k/12770k), time:  2.42/ 1.45/ 0.28
I/O read: 555MB, write: 1MB, rate: 229.70MB/s

Your picture in post 5 shows:-
/dev/sda vendor: Intel model SSDSC2KF256GB SATA 256GB

I’m a bit confused by these details?

Can you boot into a “Try Ubuntu” live session, open a terminal and enter:-

lsblk -e 7 -o name,size,pttype,type,fstype,fsuse%,fsavail,mountpoint

Please post the output within </>

If you have no critical file systems in your fstab then I’d suggest you comment them out in the live USB session then see if the system boots OK. May help

I have no need for whatever that sda1 is if its safe to get rid of, I haven't been trying to do anything complicated.

ubuntu@ubuntu:~$ lsblk -e 7 -o name,size,pttype,type,fstype,fsuse%,fsavail,mountpoint
NAME     SIZE PTTYPE TYPE FSTYPE FSUSE% FSAVAIL MOUNTPOINT
sda    238.5G gpt    disk                       
├─sda1     1G gpt    part vfat                  
└─sda2 237.4G gpt    part ext4                  
sdb     14.3G dos    disk                       
└─sdb1  14.3G dos    part vfat      42%    8.2G /cdrom

sda1 is your Efi System Partition - you need it.

After running fsck, where the file systems did not report any errors, have you rebooted?

I think that you should apply updates, assuming that you can boot?

Given what the OP is seeing, is it possible that he needs to do some of the following:

  • grub-install       or       grub-bios-setup ?

  • update-grub ?

  • update-initramfs       or       mkinitramfs ?

1 Like

That picture shows that local-fs.target has failed, which is a hard requirement to bring up the rest of the system. By the looks of it, it’s due to a timeout waiting for /media/homeserv/fd33d786-... (sorry, I am not going to type all the rest :slight_smile: ), which for some reason fails. One reason could of course be that you removed the device on which that partition resides. :wink:

You should even be able to fix that from the emergency shell:

nano /etc/fstab

(no need for sudo in the emergency shell, since you are root already)

and just comment out the line referencing that device; put a # at the start of the line; or just set the nofail mount option for it. After that run systemctl daemon-reload, because it’s ultimately systemd that’s parsing fstab and generating those .mount units. Then you should be able to just continue the boot by simply exiting the emergency shell; run exit or press CtrlD.

On a more general note, /media is meant for automatically mounting removable media, so shouldn’t be used in /etc/fstab at all, because that’s where Udisks2 does its thing when plugging in such media.

Addendum

You should also make sure that said /etc/fstab entry is not referencing /dev/sdb1 directly, which may be the cause of the initial error (dev-sdb1.device timeout); use the /dev/disk/by-* hierarchies instead.

https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/managing_storage_devices/persistent-naming-attributes_managing-storage-devices

This topic was automatically closed 18 hours after the last reply. New replies are no longer allowed.