Gentoo Archives: gentoo-user

From: Andrew Barchuk <andrew@×××××××.io>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] fsck check of /usr on a separate partition fails during boot
Date: Sat, 13 Jan 2018 19:22:44
Message-Id: 1515871355.728185.1234333888.7BE721AA@webmail.messagingengine.com
In Reply to: Re: [gentoo-user] fsck check of /usr on a separate partition fails during boot by John Covici
1 John,
2
3 > I bet you are using genkernel or gentoo-next to generate your initrd.
4
5 Exactly. Probably got lost in between the file contents:
6
7 > I use LVM on LUKS container for my partitions and an initramfs built
8 with genkernel.
9
10 > You might have better luck using Dracut
11
12 Thank you for the suggestion, I've tried Dracut and it got me almost
13 there. First I've tried to add 'ro' command line option to mount both
14 root and /usr as read-only and allow fsck OpenRC service to check the
15 filesystems but it wasn't sufficient: I got the same error from e2fsck
16 complaining that /usr is mounted.
17
18 As Dracut implements fsck in the initramfs I've decided to leverage it
19 and disabled fsck for both root and /usr in fstab. Now OpenRC fsck
20 succeeds. But if I'm reading the logs correctly Dracut is not checking
21 /usr, only root (199bb83d-c783-4254-a6eb-fdbb83c33144):
22
23 Jan 13 19:55:24 machine kernel: <30>[ 2.611986] dracut: luksOpen /dev/sdb3 luks-2acb7668-fff1-492d-b46e-f05ead26d153
24 Jan 13 19:55:24 machine kernel: [ 7.318082] random: crng init done
25 Jan 13 19:55:24 machine kernel: <30>[ 30.842143] dracut: Scanning devices dm-0 for LVM logical volumes MacVg/swap MacVg/gentoo-root MacVg/gentoo-usr
26 Jan 13 19:55:24 machine kernel: <30>[ 30.856028] dracut: inactive '/dev/MacVg/arch-root' [10.00 GiB] inherit
27 Jan 13 19:55:24 machine kernel: <30>[ 30.858497] dracut: inactive '/dev/MacVg/arch-var' [6.00 GiB] inherit
28 Jan 13 19:55:24 machine kernel: <30>[ 30.860752] dracut: inactive '/dev/MacVg/swap' [8.00 GiB] inherit
29 Jan 13 19:55:24 machine kernel: <30>[ 30.862977] dracut: inactive '/dev/MacVg/arch-home' [6.00 GiB] inherit
30 Jan 13 19:55:24 machine kernel: <30>[ 30.865294] dracut: inactive '/dev/MacVg/data' [48.00 GiB] inherit
31 Jan 13 19:55:24 machine kernel: <30>[ 30.867488] dracut: inactive '/dev/MacVg/gentoo-root' [1.00 GiB] inherit
32 Jan 13 19:55:24 machine kernel: <30>[ 30.869669] dracut: inactive '/dev/MacVg/gentoo-var' [1.00 GiB] inherit
33 Jan 13 19:55:24 machine kernel: <30>[ 30.871936] dracut: inactive '/dev/MacVg/gentoo-home' [2.00 GiB] inherit
34 Jan 13 19:55:24 machine kernel: <30>[ 30.874062] dracut: inactive '/dev/MacVg/gentoo-usr' [12.00 GiB] inherit
35 Jan 13 19:55:24 machine kernel: <30>[ 30.961553] dracut: Scanning devices dm-0 for LVM volume groups MacVg
36 Jan 13 19:55:24 machine kernel: <30>[ 30.967503] dracut: Reading all physical volumes. This may take a while...
37 Jan 13 19:55:24 machine kernel: <30>[ 30.975165] dracut: Found volume group "MacVg" using metadata type lvm2
38 Jan 13 19:55:24 machine kernel: <30>[ 31.022883] dracut: 9 logical volume(s) in volume group "MacVg" now active
39 Jan 13 19:55:24 machine kernel: [ 31.031599] PM: Starting manual resume from disk
40 Jan 13 19:55:24 machine kernel: [ 31.034193] PM: Image not found (code -22)
41 Jan 13 19:55:24 machine kernel: [ 31.045037] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: data=ordered
42 Jan 13 19:55:24 machine kernel: <30>[ 31.079313] dracut: Checking ext4: /dev/disk/by-uuid/199bb83d-c783-4254-a6eb-fdbb83c33144
43 Jan 13 19:55:24 machine kernel: <30>[ 31.083597] dracut: issuing e2fsck -a /dev/disk/by-uuid/199bb83d-c783-4254-a6eb-fdbb83c33144
44 Jan 13 19:55:24 machine kernel: <30>[ 31.099671] dracut: /dev/disk/by-uuid/199bb83d-c783-4254-a6eb-fdbb83c33144: clean, 2477/65536 files, 33002/262144 blocks
45 Jan 13 19:55:24 machine kernel: <30>[ 31.106003] dracut: Mounting /dev/disk/by-uuid/199bb83d-c783-4254-a6eb-fdbb83c33144 with -o rw,relatime,data=ordered
46 Jan 13 19:55:24 machine kernel: [ 31.116662] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: data=ordered
47 Jan 13 19:55:24 machine kernel: <30>[ 31.124793] dracut: Mounted root filesystem /dev/mapper/MacVg-gentoo--root
48 Jan 13 19:55:24 machine kernel: <30>[ 31.136286] dracut: Mounting /usr with -o defaults
49 Jan 13 19:55:24 machine kernel: [ 31.518944] EXT4-fs (dm-3): recovery complete
50 Jan 13 19:55:24 machine kernel: [ 31.524685] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: (null)
51 Jan 13 19:55:24 machine kernel: <30>[ 31.568023] dracut: Switching root
52
53 My Dracut kernel command line options:
54
55 rd.vconsole.keymap=workman rd.vconsole.font=ter-132n root=UUID=199bb83d-c783-4254-a6eb-fdbb83c33144 rd.luks.uuid=2acb7668-fff1-492d-b46e-f05ead26d153 rd.lvm.vg=MacVg
56
57 And /etc/dracut.conf:
58
59 hostonly="yes"
60
61 Any suggestions why Dracut is not performing /usr filesystem check as it
62 is supposed to accordingly to the man pages?
63
64 ---
65 Andrew