You are not logged in.

#1 2019-09-23 17:09:02

Lyno_
Member
From: Germany
Registered: 2019-09-21
Posts: 2

[Solved] Randomly fails to boot - can't find ext4 filesystem

I'm now an Arch-User for about two years and until now I managed to solve every problem I encountered. But I can't seem to grasp, what's going wrong currently, so I have to ask you for help.
Please keep in mind, that I'm new on the forums and that I'm not a native speaker.

I have following problem on my Acer Aspire E1 572G Laptop:

About one in two times, when I'm booting, I reach Emergency Shell instead of reaching the normal display manager.
This happens since I upgraded to the 5.3 kernel (appears on both 5.3 and 5.3.1).
In emergency shell, I log into the root account, look around and finally

systemctl reboot

to restart the device.

On the second try, it usually boots just fine. It appears that it just won't boot on a "cold boot", so when the laptop was powered off for half an hour or longer.
The offending lines are the following:

Sep 23 17:55:58 hypnos kernel: EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Sep 23 17:55:58 hypnos systemd[1]: systemd 243.0-1-arch running in system mode. (+PAM +AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
Sep 23 17:55:58 hypnos kernel: EXT4-fs (sda1): re-mounted. Opts: discard

...

Sep 23 17:55:58 hypnos kernel: Adding 4194300k swap on /swapfile.  Priority:-2 extents:7 across:4947964k SSFS
Sep 23 17:55:59 hypnos kernel: EXT4-fs (sda2): VFS: Can't find ext4 filesystem

And as you can guess, it only goes downhill from here:

Sep 23 17:55:59 hypnos mount[325]: mount: /home: wrong fs type, bad option, bad superblock on /dev/sda2, missing codepage or helper program, or other error.
Sep 23 17:55:58 hypnos systemd[1]: Starting File System Check on /dev/sda2...
Sep 23 17:55:58 hypnos systemd-fsck[320]: sda2: fsck.ntfs doesn't exist, not checking file system.
Sep 23 17:55:58 hypnos systemd[1]: Started File System Check on /dev/sda2.
Sep 23 17:55:58 hypnos systemd[1]: Mounting /home...
Sep 23 17:55:58 hypnos systemd[1]: home.mount: Mount process exited, code=exited, status=32/n/a
Sep 23 17:55:58 hypnos systemd[1]: home.mount: Failed with result 'exit-code'.
Sep 23 17:55:58 hypnos systemd[1]: Failed to mount /home.
Sep 23 17:55:58 hypnos systemd[1]: Dependency failed for Local File Systems.
Sep 23 17:55:58 hypnos systemd[1]: local-fs.target: Job local-fs.target/start failed with result 'dependency'.
Sep 23 17:55:58 hypnos systemd[1]: local-fs.target: Triggering OnFailure= dependencies.

I have following setup with my disks:

/dev/sda is a 931.53 GiB WDC WD10SPZX-75Z dos formatted hard drive, containing

  • /dev/sda1 - My old windows home partition (Type: HPFS/NTFS/exFAT)

  • /dev/sda2 - My linux home partition (Type: Linux)

/dev/sdb is a 223.59 GiB SanDisk SSD PLUS with disklabel type gpt, containing:

  • /dev/sdb1 - The root partition (Type: Linux filesystem)

  • /dev/sdb3 - The boot partition (Type: EFI System)

  • /dev/sdb2, /dev/sdb4 and /dev/sdb5 are used for my parallel windows installation which I haven't bootet in months

Here's the raw fdisk -l output. It looks a bit messy, since there's a lot of the window stuff floating around.

Disk /dev/sdb: 223.59 GiB, 240065183744 bytes, 468877312 sectors
Disk model: SanDisk SSD PLUS
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: F18718BE-ED6B-45A4-BC6A-F79668847C4E

Device         Start       End   Sectors  Size Type
/dev/sdb1       2048 209717247 209715200  100G Linux filesystem
/dev/sdb2  209717248 210331647    614400  300M Windows recovery environment
/dev/sdb3  210331648 210536447    204800  100M EFI System
/dev/sdb4  210536448 210798591    262144  128M Microsoft reserved
/dev/sdb5  210798592 420513791 209715200  100G Microsoft basic data


Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10SPZX-75Z
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xc50c3c1e

Device     Boot     Start        End    Sectors   Size Id Type
/dev/sda1            2048  524290047  524288000   250G  7 HPFS/NTFS/exFAT
/dev/sda2       524290048 1891479551 1367189504 651.9G 83 Linux

As far as I can see, it tries to mount sda2 but "can't find ext4 filesystem".
sda2 contains the home directory and should be mounted on boot.
So without being able to mount home, it fails to start and drops me into emergency-mode.

I have already checked the disks and my ram to no avail. They (luckily) seem fine.
Pacman reports no error when installing/reinstalling the linux and the image generation is also successful.

I have no clue, what to look for. It just seems strange, that it sometimes boots just fine and sometimes fails to recognize sda2 as an ext4 filesystem, which it clearly is.
Searching the forums didn't yield any results for me. If someone finds anything, I'd really appreciate it (I don't really know, what to search for, since the problem seems fairly specific. Perhaps I missed something)

Please tell me, if you need additional information. Any help is appreciating, in making my system boot normal again.

Thank you very much!

Last edited by Lyno_ (2019-09-23 18:01:16)

Offline

#2 2019-09-23 17:21:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,447

Re: [Solved] Randomly fails to boot - can't find ext4 filesystem

This is precisely the reason you should not use /dev/sda and the like in your fstab and bootloader configuration. These names are unstable and can change from boot to boot (depending on which device the kernel detects first), read https://wiki.archlinux.org/index.php/Pe … ice_naming for more stable options. It's likely to be pure coincidence that this happened to work properly until now.

Last edited by V1del (2019-09-23 17:23:20)

Offline

#3 2019-09-23 17:40:14

Lyno_
Member
From: Germany
Registered: 2019-09-21
Posts: 2

Re: [Solved] Randomly fails to boot - can't find ext4 filesystem

This is precisely the reason you should not use /dev/sda and the like in your fstab and bootloader configuration

Could it be that easy? I hope so. Quickly changed the fstab entries to now use UUIDs instead of the device names again.
I changed them about a month back, when I bought my hdd, so I could simply swap it out. It never hit me, that the device names were that volatile.

Hopefully you're correct and its just that the detection order changed, and systemd uses the wrong partition as home. I will report back if that really solved my problem.


EDIT:
Currently three restarts in, the problem hasn't appeared again. It seems likely fixed. I'll mark this as solved.

I feel kind of stupid, that it was something so little. But never would I have thought, that using the device names can cause such trouble.
Props to you V1del, for immediately seeing what's wrong and offering a solution. Thank you very much for your help.

Last edited by Lyno_ (2019-09-23 17:57:38)

Offline

Board footer

Powered by FluxBB