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)
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?
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.
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.
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
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
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
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 ), which for some reason fails. One reason could of course be that you removed the device on which that partition resides.
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.