You are not logged in.

#1 2013-05-10 15:00:15

del---
Member
Registered: 2010-11-04
Posts: 31

[Solved] Udev initcpio hook triggers fsck on every boot

Hello good sirs,

So for a while now, my laptop (Zenbook UX31A, so I'm using EFI), upon booting into Arch Linux, the udev initcpio hook seems to be triggering an fsck on my root filesystem (which is a BTRFS filesystem) on every single boot.
My reason for the belief that the udev hook is triggering it is that on boot I get a process approximately like the following:

processing hook [udev]
triggering uevents
performing fsck on '/dev/sda5'
checking extents
checking fs roots
<normal btrfsck output>

After talking to Apsu` on IRC, we've ruled out fstab and the kernel command line doesn't appear to change anything, nor does the fsck initcpio hook (removing it and regenerating has no effect).

We also came across this curious line in '/usr/lib/udev/rules.d/64-btrfs.rules':

# let the kernel know about this btrfs filesystem, and check if it is complete
IMPORT{builtin}="btrfs ready $devnode"

which it seems may be triggering a btrfsck but not too sure.

Anyhow, if any of you gentlemen could assist in removing this annoyance from my life, I would be quite grateful.

EDIT: Problem was that I had two sets of initramfs, one with the -arch suffix, one without. Also, refind seemed to like the fallbacks more than the default images.

I solved my issue by using the main initramfs by specifying

initrd=\EFI\arch\initramfs-arch.img

on the kernel command line. More information at https://bbs.archlinux.org/viewtopic.php?id=154591 .

Last edited by del--- (2013-05-10 15:32:36)

Offline

#2 2013-05-10 15:02:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Udev initcpio hook triggers fsck on every boot

It's not fsck.

Offline

#3 2013-05-10 15:04:16

del---
Member
Registered: 2010-11-04
Posts: 31

Re: [Solved] Udev initcpio hook triggers fsck on every boot

karol wrote:

It's not fsck.

Sorry, I just posted an edit. I forgot to mention that it explicitly states that it is performing an fsck.

Offline

#4 2013-05-10 15:05:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Udev initcpio hook triggers fsck on every boot

Can you post your fstab?

Offline

#5 2013-05-10 15:06:47

del---
Member
Registered: 2010-11-04
Posts: 31

Re: [Solved] Udev initcpio hook triggers fsck on every boot

Sure.

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
# UUID=1abc5df3-b0df-41e2-969c-a03dc79674bf LABEL=ArchLinux
/dev/sda5           	/         	btrfs     	rw,relatime,ssd,space_cache	0 0

# UUID=D4AC-0352
/dev/sda2           	/boot/efi     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro	0 2

# UUID=D290B8F290B8DE63
#/dev/sda4           	/shared   	fuseblk   	rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096	0 2

Offline

#6 2013-05-10 15:07:06

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [Solved] Udev initcpio hook triggers fsck on every boot

the only hook that adds btrfsck to the initramfs is the btrfs hook, so I assume you have that in your HOOKS array. The question is why?

mkinitcpio -H btrfs wrote:

This hook provides support for multi-device btrfs volumes. This hook
is only needed for initramfs images which do not use udev.

Offline

#7 2013-05-10 15:12:20

del---
Member
Registered: 2010-11-04
Posts: 31

Re: [Solved] Udev initcpio hook triggers fsck on every boot

65kid wrote:

the only hook that adds btrfsck to the initramfs is the btrfs hook, so I assume you have that in your HOOKS array. The question is why?

mkinitcpio -H btrfs wrote:

This hook provides support for multi-device btrfs volumes. This hook
is only needed for initramfs images which do not use udev.

My hooks:

HOOKS="base udev autodetect modconf block filesystems keyboard fsck"

And as stated previously, removing the fsck hook has no effect. Everything else in my mkinitcpio.conf is commented or empty.

Offline

#8 2013-05-10 15:16:28

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [Solved] Udev initcpio hook triggers fsck on every boot

that's weird, what the hell is even adding btrfsck to your initramfs then?
remove the fsck hook. Although this doesn't seem to be the problem, you don't need it with btrfs either way.
Then post the output of:

$ mkinitcpio -p linux
$ lsinitcpio /boot/initramfs-linux.img
$ cat /proc/cmdline

Offline

#9 2013-05-10 15:21:50

del---
Member
Registered: 2010-11-04
Posts: 31

Re: [Solved] Udev initcpio hook triggers fsck on every boot

65kid wrote:

that's weird, what the hell is even adding btrfsck to your initramfs then?
remove the fsck hook. Although this doesn't seem to be the problem, you don't need it with btrfs either way.
Then post the output of:

$ mkinitcpio -p linux
$ lsinitcpio /boot/initramfs-linux.img
$ cat /proc/cmdline

mkinitcpio: https://gist.github.com/bobobo1618/5555099
lsinitcpio: https://gist.github.com/bobobo1618/5555104
/proc/cmdline:

root=/dev/sda5 ro rootfstype=btrfs acpi_osi=\ initrd=EFI\arch\initramfs-arch-fallback.img

Weird that it seems to be using the fallback...

Offline

#10 2013-05-10 15:29:20

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [Solved] Udev initcpio hook triggers fsck on every boot

you are booting the wrong image. Your initramfs is written to /boot/initramfs-linux.img while you are booting an (I assume old) image from /boot/EFI/arch/.

Are you actually using EFI?
what booloader?
what's the config?

Offline

#11 2013-05-10 15:29:40

del---
Member
Registered: 2010-11-04
Posts: 31

Re: [Solved] Udev initcpio hook triggers fsck on every boot

Aha! solved, thanks to https://bbs.archlinux.org/viewtopic.php?id=154591 and 65kid.

Thanks for the help!

Offline

Board footer

Powered by FluxBB