Re: [gentoo-user] fsck check of /usr on a separate partition fails during boot
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 / ext4defaults0 1 /dev/MacVg/gentoo-usr /usrext4defaults0 1 /dev/MacVg/gentoo-var /varext4nodev,nosuid0 2 /dev/MacVg/gentoo-home /home ext4nodev,nosuid0 2 /dev/MacVg/data /data ext4nodev,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
Re: [gentoo-user] fsck check of /usr on a separate partition fails during boot
Alan, > Not sure exactly what code does this, I assume it's something in OpenRC. It's OpenRC service fsck that performs filesystem checks on boot runlevel (/etc/init.d/fsck): $ rc-status boot | grep fsck fsck [ started ] --- Andrew
Re: [gentoo-user] fsck check of /usr on a separate partition fails during boot
Alan, Floyd, Thanks for your responses. Indeed I prefer to not maintain my own initramfs scripts. Right now I use genkernel initramfs but it seems to not be doing the right thing regarding /usr partition mounting (as I understand now it's not a problem with OpenRC fsck service). On the other hand I prefer to not have to remember to run fsck manually, I'm pretty bad at such things. --- Andrew
Re: [gentoo-user] fsck check of /usr on a separate partition fails during boot
John, > I bet you are using genkernel or gentoo-next to generate your initrd. Exactly. Probably got lost in between the file contents: > I use LVM on LUKS container for my partitions and an initramfs built with genkernel. > You might have better luck using Dracut Thank you for the suggestion, I've tried Dracut and it got me almost there. First I've tried to add 'ro' command line option to mount both root and /usr as read-only and allow fsck OpenRC service to check the filesystems but it wasn't sufficient: I got the same error from e2fsck complaining that /usr is mounted. As Dracut implements fsck in the initramfs I've decided to leverage it and disabled fsck for both root and /usr in fstab. Now OpenRC fsck succeeds. But if I'm reading the logs correctly Dracut is not checking /usr, only root (199bb83d-c783-4254-a6eb-fdbb83c33144): Jan 13 19:55:24 machine kernel: <30>[2.611986] dracut: luksOpen /dev/sdb3 luks-2acb7668-fff1-492d-b46e-f05ead26d153 Jan 13 19:55:24 machine kernel: [7.318082] random: crng init done 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 Jan 13 19:55:24 machine kernel: <30>[ 30.856028] dracut: inactive '/dev/MacVg/arch-root' [10.00 GiB] inherit Jan 13 19:55:24 machine kernel: <30>[ 30.858497] dracut: inactive '/dev/MacVg/arch-var' [6.00 GiB] inherit Jan 13 19:55:24 machine kernel: <30>[ 30.860752] dracut: inactive '/dev/MacVg/swap' [8.00 GiB] inherit Jan 13 19:55:24 machine kernel: <30>[ 30.862977] dracut: inactive '/dev/MacVg/arch-home' [6.00 GiB] inherit Jan 13 19:55:24 machine kernel: <30>[ 30.865294] dracut: inactive '/dev/MacVg/data' [48.00 GiB] inherit Jan 13 19:55:24 machine kernel: <30>[ 30.867488] dracut: inactive '/dev/MacVg/gentoo-root' [1.00 GiB] inherit Jan 13 19:55:24 machine kernel: <30>[ 30.869669] dracut: inactive '/dev/MacVg/gentoo-var' [1.00 GiB] inherit Jan 13 19:55:24 machine kernel: <30>[ 30.871936] dracut: inactive '/dev/MacVg/gentoo-home' [2.00 GiB] inherit Jan 13 19:55:24 machine kernel: <30>[ 30.874062] dracut: inactive '/dev/MacVg/gentoo-usr' [12.00 GiB] inherit Jan 13 19:55:24 machine kernel: <30>[ 30.961553] dracut: Scanning devices dm-0 for LVM volume groups MacVg Jan 13 19:55:24 machine kernel: <30>[ 30.967503] dracut: Reading all physical volumes. This may take a while... Jan 13 19:55:24 machine kernel: <30>[ 30.975165] dracut: Found volume group "MacVg" using metadata type lvm2 Jan 13 19:55:24 machine kernel: <30>[ 31.022883] dracut: 9 logical volume(s) in volume group "MacVg" now active Jan 13 19:55:24 machine kernel: [ 31.031599] PM: Starting manual resume from disk Jan 13 19:55:24 machine kernel: [ 31.034193] PM: Image not found (code -22) Jan 13 19:55:24 machine kernel: [ 31.045037] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: data=ordered Jan 13 19:55:24 machine kernel: <30>[ 31.079313] dracut: Checking ext4: /dev/disk/by-uuid/199bb83d-c783-4254-a6eb-fdbb83c33144 Jan 13 19:55:24 machine kernel: <30>[ 31.083597] dracut: issuing e2fsck -a /dev/disk/by-uuid/199bb83d-c783-4254-a6eb-fdbb83c33144 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 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 Jan 13 19:55:24 machine kernel: [ 31.116662] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: data=ordered Jan 13 19:55:24 machine kernel: <30>[ 31.124793] dracut: Mounted root filesystem /dev/mapper/MacVg-gentoo--root Jan 13 19:55:24 machine kernel: <30>[ 31.136286] dracut: Mounting /usr with -o defaults Jan 13 19:55:24 machine kernel: [ 31.518944] EXT4-fs (dm-3): recovery complete Jan 13 19:55:24 machine kernel: [ 31.524685] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: (null) Jan 13 19:55:24 machine kernel: <30>[ 31.568023] dracut: Switching root My Dracut kernel command line options: 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 And /etc/dracut.conf: hostonly="yes" Any suggestions why Dracut is not performing /usr filesystem check as it is supposed to accordingly to the man pages? --- Andrew
[gentoo-user] fsck check of /usr on a separate partition fails during boot
Hi folks, I've posted about this problem to the forums[1] without luck despite getting more than a thousand views so I thought I'll try here. My system boots successfully but filesystem check fails for /usr which is on a separate partition: * Checking local filesystems ... /dev/mapper/MacVg-gentoo--root: clean, 2390/65536 files, 30938/262144 blocks /dev/mapper/MacVg-gentoo--usr is mounted. e2fsck: Cannot continue, aborting. /dev/mapper/MacVg-gentoo--var: clean, 22647/65536 files, 59083/262144 blocks /dev/mapper/MacVg-gentoo--home: clean, 8080/917504 files, 243397/3670016 blocks /dev/mapper/MacVg-data: clean, 5293/3145728 files, 8945157/12582912 blocks * Operational error [ !! ] I use LVM on LUKS container for my partitions and an initramfs built with genkernel. My fstab: /dev/MacVg/gentoo-root / ext4defaults0 1 /dev/MacVg/gentoo-usr /usrext4defaults0 2 /dev/MacVg/gentoo-var /varext4nodev,nosuid0 2 /dev/MacVg/gentoo-home /home ext4nodev,nosuid0 2 /dev/MacVg/data /data ext4nodev,nosuid,noexec 0 2 LABEL=EFI /boot vfatnoauto,umask=0022 0 2 /dev/MacVg/swap noneswapdefaults0 0 tmpfs /tmptmpfs nosuid,nodev,size=1G,mode=1777 0 0 tmpfs /var/tmp tmpfs nosuid,nodev,size=8G,mode=1777 0 0 Any ideas what is going on and how do I make the fsck check succeed? Maybe I should file it as an OpenRC bug but I'm not completely sure if it's not me doing something wrong. Thanks in advance for any help. 1. https://forums.gentoo.org/viewtopic-t-1075174-highlight-.html --- Andrew
Re: [gentoo-user] Re: No sleep when closing the lid (OpenRC)
Hi Melleus, Please share some details of the solution (e.g. reference the manuals) you've found so other people with similar problems that would stumble upon you email can use it too. --- Andrew
Re: [gentoo-user] How do I customize x11-terms/xterm?
Hi Grant, I believe this wiki page is what you're looking for: https://wiki.gentoo.org/wiki//etc/portage/patches -- Andrew
Re: [gentoo-user] Kernel upgrade confusion
Hi Jalus, > This is where I'm confused; which .config file (/proc/config.gz or > /boot/config) The two should have the same content most of the time. You can use either. config.gz needs to be decompressed (e.g. with zcat). > where in the kernel source tree do I put this file in. In the root of the kernel source tree which is /usr/src/linux if the new kernel is set with eselect kernel. Make sure to read https://wiki.gentoo.org/wiki/Kernel/Upgrade which explains all these steps in detail. --- Andrew