You are not logged in.

#1 2014-09-14 14:37:08

contiver
Member
Registered: 2013-07-31
Posts: 13

[SOLVED] Emergency mode after laptop run out of battery

Hello fellow archers, needing a hand again. Recently I started having very inaccurate battery readings ( upon reaching around 70% charged, it would suddenly jump to 100%. And when on 0%, it would last abnormally long), so after reading a bit I decided to just let the battery run out and fully charge it again. The thing is, after shutting down, and turning it on again, I'm getting the "Welcome to emergency mode!" message.
I can just press control-D, login with my user and use it as normal, but it is pretty annoying to have that pop up after every boot.
Tried logging in as root, and did a systemctl default, but it didn't fix it. So next I checked journalctl -xb, and even though the file is pretty huge (2k lines) and I'm not sure what I should look at, I think the problem is mentioned in the following lines (I'll space them since they pop up in different parts):

Sep 14 11:04:48 localhost systemd-fsck[544]: /dev/sda3 contains a file system with errors, check forced.

Sep 14 11:04:48 localhost systemd-fsck[544]: fsck failed with error code 4.
Sep 14 11:04:48 localhost systemd-fsck[544]: Running request emergency.target/start/replace

Sep 14 11:04:48 localhost kernel: EXT4-fs (sda3): warning: mounting fs with errors, running e2fsck is recommended
Sep 14 11:04:48 localhost kernel: EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: data=ordered

Sep 14 11:09:49 localhost kernel: EXT4-fs (sda3): error count since last fsck: 2808
Sep 14 11:09:49 localhost kernel: EXT4-fs (sda3): initial error at time 1410431943: ext4_mb_generate_buddy:757
Sep 14 11:09:49 localhost kernel: EXT4-fs (sda3): last error at time 1410702390: ext4_ext_find_extent:876: inode 4063924

Tried doing e2fsck, but never used it before so all I did was e2fsck -p /dev/sda3 , but that did nothing (just printed some message saying it aborted iirc).
My home partition is mounted in /dev/sda3 , but I have access to my files without a problem so far so I suppose some small part is corrupt?
Any help is welcome, thanks!

Last edited by contiver (2014-09-14 21:21:06)

Offline

#2 2014-09-14 19:46:20

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [SOLVED] Emergency mode after laptop run out of battery

EXT4 usually remounts it's partition ro (read-only) upon detecint corruption.

You said that 'login with my user and use it as normal'. You might want to elaborate on that. I thought that only root login was allowed under these circumstances (or did that change again?)

Anyway's, systemd is somewhere after jumping of initrd and before starting user services.

You might want to provide the output of

fsck /dev/sda3

You can use an usb stick, netconsole or nc to transfer the output to another computer. I recommend you use nc for this, it's really convenient.


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#3 2014-09-14 21:20:45

contiver
Member
Registered: 2013-07-31
Posts: 13

Re: [SOLVED] Emergency mode after laptop run out of battery

It gave me the option of using the root password for maintenance, or control-D to continue, so I just pressed control-D, logged in, started my window manager, edited files, browsed the internet, downloaded stuff, no problem whatsoever. That's what I meant by "as normal".
Anyway, rebooted, logged in as root, unmounted the partition and did fsck /dev/sda3 and that got the job done smile. It asked a couple of times if I wanted to fix some Inodes and blocks that were wrong, and I answered yes to everything. After that I run it again, said the filesystem was clean, rebooted, and no more emergency mode.
Thanks for the help!

Offline

Board footer

Powered by FluxBB