System booting in emergency mode

Hi there, after a couple of days with the PC running qBitttorrent I tried to log in this morning but the main screen was unresponsive on login (wasnt being detected, succuesfully loged in blindly but the second screen was ultra slugish) so after some more unresponsiveness I decided to shutdown the computer by long pressing the power button.

After some seconds I powered it on again and the computer only defaults to emergency mode, after some troubleshooting I don’t really know what I’m doing so some help would be apreciated

Thanks in advance

After seeing an issue with /dev/sdb1 on journalctl I run smartctl -x on it with the following result

1 Like

The issue detected on sdb1

Is that about a ntfs partition that you mount at boot via an entry in fstab?

There seems to be some data inconsistency/corruption in it preventing it from being mounted.

Try commenting it out in your /etc/fstab and see if your system will boot.

That was the issue, thanks a lot. For reference for other newbies:

cd ..
cd etc
nano fstab
(Adding # to the line where mounts my faulty drive dev/sdb1)
Ctl+O / Ctl+C / enter 

Now the question is how do I fix my drive?

If you are dualbooting with windows and ntfs being a Windows filesystem, my suggestion would be to run a filesystem check from Windows.

If not,

ntfs3 will not mount a partition where the volume is marked dirty without the force option. dmesg explicitly helps recognizing the situation, saying:

sdb1: volume is dirty and “force” flag is not set!

You can try passing the --clear-dirty argument to ntfsfix(8) to clean it. [1]

So that would be:

sudo ntfsfix --clear-dirty /dev/sdb1

See also:

would be helpful if you could provide your fstab content.
Is the drive identified by uuid? Whats the file system? whats your current kernel?

If you use Windows dual-boot make sure to disable windows fast startup.

I don’t use dual boot, this drive is just data (I have another drive with an older copy of windows 10 that I should delete tbh)

this seemed to fix the issue again!

This was the output:

➜  ~ sudo ntfsfix --clear-dirty /dev/sdb1
[sudo] contraseña para daisyKutter:
Mounting volume... $MFTMirr does not match $MFT (record 3).
Attempting to correct errors...
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... FAILED
Correcting differences in $MFTMirr record 3...OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdb1 was processed successfully.

I though that those Failed messages indicated more fixes were going to be needed but it seems I can get into the drive normally…? Should I uncomment the line for the mounting drive on fstab now?

# /etc/fstab: static file system information.
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=E399-89AA                            /efi           vfat    fmask=0137,dmask=0027 0 2
UUID=8ccb688e-8ab3-4049-abc1-4dc76a1d9d30 /              ext4    noatime    0 1
UUID=398cfff9-7b63-423f-95f9-728d49765d53 swap           swap    defaults   0 0
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
#/dev/sdb1	/nave	ntfs3	defaults	0	0

Yes. After editing the fstab, do:

sudo systemctl daemon-reload

sudo findmnt --verify

If all is fine, run:

sudo mount -a

to mount/remount your partitions in fstab.

You need to identify the drive by UUID like the drives above. Use blkid like advised in the fstab comment to get the drive UUID.
The name /dev/sdb1 is only assigned temporarily by the kernel. It may change on any boot and therefore is not a reliable way to point to a drive.

OK got it, I got a warning:

➜  /etc nano fstab
➜  /etc sudo nano fstab
[sudo] contraseña para daisyKutter:
➜  /etc sudo systemctl daemon-reload
➜  /etc sudo findmnt --verify
   [W] ntfs3 no casa con ntfs en disco

0 errores de sintaxis, 0 errores, 1 aviso
➜  /etc

I’m going to restart, but first I’m going to edit again fstab in order to do what @Ganimede told me

As long as no errors, it should be fine.

Did you also run sudo mount -a with no errors? If positive, things should be fine upon rebooting.

➜  ~ blkid /dev/sdb1
➜  ~ ls -l /dev/sdb1
brw-rw---- 1 root disk 8, 17 jul  1 09:45 /dev/sdb1
➜  ~ lsblk -f
                                                                         0   100% /var/lib/snapd/snap/bare/5
                                                                         0   100% /var/lib/snapd/snap/core20/2318
                                                                         0   100% /var/lib/snapd/snap/gnome-3-38-2004/143
                                                                         0   100% /var/lib/snapd/snap/gtk-common-themes/1535
                                                                         0   100% /var/lib/snapd/snap/icloud-for-linux/283
                                                                         0   100% /var/lib/snapd/snap/icloud-for-linux/267
                                                                         0   100% /var/lib/snapd/snap/snapd/21759
│    vfat   FAT32             BE73-D275
│    ext4   1.0               22347bee-dcdb-4f1b-8857-c70b5e6a0900
│    ntfs                     D41C7BC51C7BA0E2
     ntfs                     5E48D22948D1FFA7
     ntfs         Nave        BAEC7046EC6FFB51                      363,6G    87% /nave
│    vfat   FAT32             E399-89AA                               897M    12% /efi
│    ext4   1.0   endeavouros 8ccb688e-8ab3-4049-abc1-4dc76a1d9d30  261,7G    36% /
     swap   1     swap        398cfff9-7b63-423f-95f9-728d49765d53                [SWAP]
➜  ~

Is BAEC7046EC6FFB51 the UUID I’m looking for? It seems the disk has no identifier…

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