You are not logged in.

#1 2020-11-22 20:42:37

riddle00
Member
From: Lithuania
Registered: 2015-05-26
Posts: 81

[SOLVED] Slow boot because of filesystem check

Hi, I'm getting this output during boot:

Starting version 246.6-1-arch
/dev/sda3: clean, 717044/30220480 files, 46124265/120907009 blocks

it takes about 15-30 seconds to complete. As I understand it is "fsck" doing its job. It was not there earlier though, appeared quite recently (I think) after Arch linux reinstall.
Is it a desirable functionality, or can I disable it (and if so, how)?

I've read in this forum that 

Since ext3 is a journaled file system you really don't need the fs checks. To cancel automatic fs checks, first boot with a live cd (Arch install cd should work). Then assuming the ext3 partition is /dev/sda1, you can cancel the automatic fs checks this way:

tune2fs -c0 -i0 /dev/sda1

Check out the man page of tune2fs for more info.

Maybe it applies to mine ext4 as well?

excerpts from /etc/mkinitcpio.conf:

...
7  MODULES=()
...
14  BINARIES=()
...
19  FILES=()
...
52  HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)

Everything is mounted on one ext4 partition.

Last edited by riddle00 (2020-11-22 22:57:38)


Vim is not just an editor (...); it is for all intents and purposes a universal design pattern. --  Jason Ryan

Offline

#2 2020-11-22 20:51:18

loqs
Member
Registered: 2014-03-06
Posts: 19,041

Re: [SOLVED] Slow boot because of filesystem check

man 8 E2FSCK wrote:

e2fsck  is  used to check the ext2/ext3/ext4 family of file systems.  For ext3 and ext4 filesystems that use a journal, if the system has been shut down uncleanly without any errors, normally, after replaying the committed transactions  in the journal, the file system should be marked as clean.   Hence, for filesystems that use journalling, e2fsck  will normally replay the journal and exit, unless its superblock indicates that further checking is required.

How have you determined the delay is caused by fsck?

Offline

#3 2020-11-22 20:59:05

riddle00
Member
From: Lithuania
Registered: 2015-05-26
Posts: 81

Re: [SOLVED] Slow boot because of filesystem check

Do I check it with "systemd-analyze blame", yes?

Also, maybe it has to do with the fact that I use "sudo reboot" or "sudo poweroff" commands, and it leaves my filesystem unclean (?)


Vim is not just an editor (...); it is for all intents and purposes a universal design pattern. --  Jason Ryan

Offline

#4 2020-11-22 21:06:34

loqs
Member
Registered: 2014-03-06
Posts: 19,041

Re: [SOLVED] Slow boot because of filesystem check

riddle00 wrote:

Do I check it with "systemd-analyze blame", yes?

Yes.

riddle00 wrote:

Also, maybe it has to do with the fact that I use "sudo reboot" or "sudo poweroff" commands, and it leaves my filesystem unclean (?)

I thought the fsck output containing clean indicated it was last unmounted cleanly.

Offline

#5 2020-11-22 21:07:34

riddle00
Member
From: Lithuania
Registered: 2015-05-26
Posts: 81

Re: [SOLVED] Slow boot because of filesystem check

Ok, so apparently I had "dhcpcd@wlp8s0.service" enabled, which I could not see from the output of

systemctl list-unit-files | grep enabled

I'm not sure about other options ("NetworkManager", etc.), but since I use "wpa_supplicant" and run it after logging in, "dhcpcd" service command always fails. "systemd-analyze blame" was showing "dhcpcd@wlp8s0.service" as taking most time either way, which did not help at first glance, but since the time (seconds) differed it made sense then about the service being mistakenly enabled. And actually I've just noticed there even was an error about "dhcpcd" service failing in boot messages before login prompt, just for such a short time that I apparently missed it earlier.

So, solved. Thank you @loqs for help also! smile

Last edited by riddle00 (2020-11-22 21:15:46)


Vim is not just an editor (...); it is for all intents and purposes a universal design pattern. --  Jason Ryan

Offline

#6 2020-11-22 21:32:14

riddle00
Member
From: Lithuania
Registered: 2015-05-26
Posts: 81

Re: [SOLVED] Slow boot because of filesystem check

By the way, before marking it solved (sorry if it counts as deviation from the original thread), I've searched on Forum Rules about formatting posts and I'm still not really sure, for example, how to better format my previous message just before this one.

Mainly, I mean

[1] is there some de facto standard for emphasizing various terms or commands (as I did in double quotes - ex. "NetworkManager", "systemd-analyze blame", etc.)?
[2] is there a standard for referring to another user, as I did with @loqs. Should it maybe be without '@' sign, as in IRC, or maybe in bold, or something similar. ?

Last edited by riddle00 (2020-11-22 21:32:26)


Vim is not just an editor (...); it is for all intents and purposes a universal design pattern. --  Jason Ryan

Offline

#7 2020-11-22 21:45:29

loqs
Member
Registered: 2014-03-06
Posts: 19,041

Re: [SOLVED] Slow boot because of filesystem check

riddle00 wrote:

[1] is there some de facto standard for emphasizing various terms or commands (as I did in double quotes - ex. "NetworkManager", "systemd-analyze blame", etc.)?

Not that I know of.

riddle00 wrote:

[2] is there a standard for referring to another user, as I did with @loqs. Should it maybe be without '@' sign, as in IRC, or maybe in bold, or something similar. ?

Both with and without the @ is common.

Offline

#8 2020-11-22 22:57:17

riddle00
Member
From: Lithuania
Registered: 2015-05-26
Posts: 81

Re: [SOLVED] Slow boot because of filesystem check

Thanks! smile


Vim is not just an editor (...); it is for all intents and purposes a universal design pattern. --  Jason Ryan

Offline

Board footer

Powered by FluxBB