From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8CFF3138330 for ; Sun, 14 Jan 2018 11:06:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 616FBE08C3; Sun, 14 Jan 2018 11:06:24 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ECA0AE0880 for ; Sun, 14 Jan 2018 11:06:23 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 36AA420D1B for ; Sun, 14 Jan 2018 06:06:23 -0500 (EST) Received: from web3 ([10.202.2.213]) by compute4.internal (MEProxy); Sun, 14 Jan 2018 06:06:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raindev.io; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=PPS96n49w3G0SPhUaU8J7ep8/Q fYx8atA9a8pg8/sRo=; b=p7nU4HY5trpqTbNSCm74K/ITSedfZu1FmkKOhZj+vB WwdcxVIAvU3LHTlFokwUGoJDxpIADU9QdgGcnVZ+4JrLiEzNEKqzyW5SWYApKV9A trIBI6/kEZFUb+LIuJq6Fo7vuULI65C80zUiFShfb+j3nHgjbvHdL4xo99MCrsgH A= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=PPS96n 49w3G0SPhUaU8J7ep8/QfYx8atA9a8pg8/sRo=; b=lL8OZ5oAAQEHn8Rz0X/axN LxYNPi2UHrLYzlyctwQA8Tm+47fWip08EcngV0VciSYtDIr/lCgc8qJUry109hQH RHFpm5snqaq0bc4yjBxysTLMqYvoz7EgO6kFI6V9Edfyj5OYCMzqaFXI3FFF+EaH h1W0uUZV02oRtR+m+2nWSuSFZC1iCf7yGVc4ANgE1qbUUeGrABiMJOXOq1Hcb1vQ P7+On7FZlOZOUCfuQ75sZrJ7Cj0dCjxEpWl+eZ9qT4aJS6+eHR8xrXr+xivAQim1 tEdE8uOBT4KxnuFI3fVYmEV3jfzAnLLuOy/geYyj8UMviLz1vgw8CMGHyYqrIdUw == X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 12C7E9E4AE; Sun, 14 Jan 2018 06:06:23 -0500 (EST) Message-Id: <1515927983.1011572.1234761720.1A5ED2DB@webmail.messagingengine.com> From: Andrew Barchuk To: gentoo-user@lists.gentoo.org Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-75de3051 In-Reply-To: <20180114014851.4pvvj7n7pi26mcdg@grusum.endjinn.de> Subject: Re: [gentoo-user] fsck check of /usr on a separate partition fails during boot Date: Sun, 14 Jan 2018 12:06:23 +0100 References: <1515841123.569865.1234053704.79666D14@webmail.messagingengine.com> <20180114014851.4pvvj7n7pi26mcdg@grusum.endjinn.de> X-Archives-Salt: 77469af7-195a-4c2b-8a14-e894b5532787 X-Archives-Hash: 0afb1bb1a90bd1898cf42ab66e83d98c Thanks everyone, I've nailed it \o/ A more detailed story follows. After taking the approach of offloading / and /usr checks to Dracut I've disabled fsck for those partitions in /etc/fstab so OpenRC fsck wouldn't attempt to check /usr (and fail) by setting passno (the last column to 0). It turned out that Dracut honours fstab for fsck too (root get special treatment and is checked anyways). After enabling fsck in fstab for / and /usr Dracut started to check /usr - a small win already. No the only thing left to do was to _not_ check / and /usr by the init fsck which was natural to do by setting fsck_passno=">1" in /etc/conf.d/fsck. Now all the filesystems are checked during the boot: the ones having passno 1 (root and /usr) by the initramfs and passno 2 (/var, /home, /data) by the init. The relevant excerpts from the final configuration are below. /etc/fstab: /dev/MacVg/gentoo-root / ext4 defaults 0 1 /dev/MacVg/gentoo-usr /usr ext4 defaults 0 1 /dev/MacVg/gentoo-var /var ext4 nodev,nosuid 0 2 /dev/MacVg/gentoo-home /home ext4 nodev,nosuid 0 2 /dev/MacVg/data /data ext4 nodev,nosuid,noexec 0 2 /etc/dracut.conf: hostonly="yes" use_fstab="yes" no_fsck="no" Note that the two latter Dracut options are not required and applied by default in my installation but showing explicitly what configuration is used. /etc/conf.d/fsck: fsck_passno=">1" As can be seen from logs / and /usr are checked by Dracut and /var, /home and /data by OpenRC. /var/log/dmesg: [ 2.607796] dracut: luksOpen /dev/sdb3 luks-2acb7668-fff1-492d-b46e-f05ead26d153 [ 5.930575] random: crng init done [ 11.017574] dracut: Scanning devices dm-0 for LVM logical volumes MacVg/swap MacVg/gentoo-root MacVg/gentoo-usr [ 11.028712] dracut: inactive '/dev/MacVg/arch-root' [10.00 GiB] inherit [ 11.031019] dracut: inactive '/dev/MacVg/arch-var' [6.00 GiB] inherit [ 11.033121] dracut: inactive '/dev/MacVg/swap' [8.00 GiB] inherit [ 11.035193] dracut: inactive '/dev/MacVg/arch-home' [6.00 GiB] inherit [ 11.037305] dracut: inactive '/dev/MacVg/data' [48.00 GiB] inherit [ 11.039686] dracut: inactive '/dev/MacVg/gentoo-root' [1.00 GiB] inherit [ 11.042072] dracut: inactive '/dev/MacVg/gentoo-var' [1.00 GiB] inherit [ 11.044452] dracut: inactive '/dev/MacVg/gentoo-home' [2.00 GiB] inherit [ 11.046791] dracut: inactive '/dev/MacVg/gentoo-usr' [12.00 GiB] inherit [ 11.131447] dracut: Scanning devices dm-0 for LVM volume groups MacVg [ 11.137382] dracut: Reading all physical volumes. This may take a while... [ 11.146511] dracut: Found volume group "MacVg" using metadata type lvm2 [ 11.187955] dracut: 9 logical volume(s) in volume group "MacVg" now active [ 11.198562] PM: Starting manual resume from disk [ 11.200830] PM: Image not found (code -22) [ 11.211669] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: data=ordered [ 11.244303] dracut: Checking ext4: /dev/disk/by-uuid/199bb83d-c783-4254-a6eb-fdbb83c33144 [ 11.248218] dracut: issuing e2fsck -a /dev/disk/by-uuid/199bb83d-c783-4254-a6eb-fdbb83c33144 [ 11.264264] dracut: /dev/disk/by-uuid/199bb83d-c783-4254-a6eb-fdbb83c33144: clean, 2477/65536 files, 33012/262144 blocks [ 11.267463] dracut: Mounting /dev/disk/by-uuid/199bb83d-c783-4254-a6eb-fdbb83c33144 with -o rw,relatime,data=ordered [ 11.278896] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: data=ordered [ 11.286288] dracut: Mounted root filesystem /dev/mapper/MacVg-gentoo--root [ 11.302264] dracut: Checking ext4: /dev/MacVg/gentoo-usr [ 11.305391] dracut: issuing e2fsck -a /dev/MacVg/gentoo-usr [ 13.144541] dracut: /dev/MacVg/gentoo-usr: recovering journal [ 13.146699] dracut: /dev/MacVg/gentoo-usr: clean, 439895/1572864 files, 2264868/3145728 blocks [ 13.148865] dracut: Mounting /usr with -o defaults [ 13.167299] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: (null) [ 13.226192] dracut: Switching root /var/log/rc.log: * Checking local filesystems [passno >1] ... /dev/mapper/MacVg-gentoo--home: clean, 6057/131072 files, 211958/524288 blocks /dev/mapper/MacVg-data: clean, 5831/3145728 files, 10243129/12582912 blocks /dev/mapper/MacVg-gentoo--var: clean, 22475/65536 files, 61158/262144 blocks [ ok ] P. S. A bonus point is I no longer have to patch genkernel to support custom keymaps and fonts. --- Andrew