Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
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 15:10:44
Message-Id: 9dc720b9-c338-5d95-b666-e3b3b61599ed@gmail.com
In Reply to: [gentoo-user] fsck check of /usr on a separate partition fails during boot by Andrew Barchuk
1 On 13/01/2018 12:58, Andrew Barchuk wrote:
2 > Hi folks,
3 >
4 > I've posted about this problem to the forums[1] without luck despite
5 > getting more than a thousand views so I thought I'll try here.
6 >
7 > My system boots successfully but filesystem check fails for /usr which
8 > is on a separate partition:
9 >
10 > * Checking local filesystems ...
11 > /dev/mapper/MacVg-gentoo--root: clean, 2390/65536 files, 30938/262144 blocks
12 > /dev/mapper/MacVg-gentoo--usr is mounted.
13 > e2fsck: Cannot continue, aborting.
14 >
15 >
16 > /dev/mapper/MacVg-gentoo--var: clean, 22647/65536 files, 59083/262144 blocks
17 > /dev/mapper/MacVg-gentoo--home: clean, 8080/917504 files, 243397/3670016 blocks
18 > /dev/mapper/MacVg-data: clean, 5293/3145728 files, 8945157/12582912 blocks
19 > * Operational error
20 > [ !! ]
21 >
22 > I use LVM on LUKS container for my partitions and an initramfs built
23 > with genkernel.
24 >
25 > My fstab:
26 >
27 > /dev/MacVg/gentoo-root / ext4 defaults 0 1
28 > /dev/MacVg/gentoo-usr /usr ext4 defaults 0 2
29 > /dev/MacVg/gentoo-var /var ext4 nodev,nosuid 0 2
30 > /dev/MacVg/gentoo-home /home ext4 nodev,nosuid 0 2
31 > /dev/MacVg/data /data ext4 nodev,nosuid,noexec 0 2
32 > LABEL=EFI /boot vfat noauto,umask=0022 0 2
33 > /dev/MacVg/swap none swap defaults 0 0
34 > tmpfs /tmp tmpfs nosuid,nodev,size=1G,mode=1777 0 0
35 > tmpfs /var/tmp tmpfs nosuid,nodev,size=8G,mode=1777 0 0
36 >
37 > Any ideas what is going on and how do I make the fsck check succeed?
38 > Maybe I should file it as an OpenRC bug but I'm not completely sure if
39 > it's not me doing something wrong.
40 > Thanks in advance for any help.
41 >
42 > 1. https://forums.gentoo.org/viewtopic-t-1075174-highlight-.html
43 >
44 > ---
45 > Andrew
46 >
47
48
49 By far the easiest way to deal with this without having to predict if
50 maybe /usr is mounted or not, or if maybe your intiramfs has the correct
51 files in place and all sorts of other maybes, is the following:
52
53 - find any old LiveCD/installer/whatever on CD or thumb drive (the
54 gentoo minimal install CD works just fine, so does ubuntu-server
55 installer (it boots quite quickly)
56 - set your BIOS to boot from that device
57 - reboot
58 - use the fsck tool on that system (which is independent of your main
59 system) to fix the broken fs for /usr
60 - reboot as normal
61
62 Yes, you *could* fiddle with your initramfs to provide a shell and fs
63 tools. How often are you going to use it or test it? As you are not
64 RedHat with paying customers, I'd say "almost never". so rescue disk ftw
65 --
66 Alan McKinnon
67 alan.mckinnon@×××××.com