Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] fsck separate /usr
Date: Sun, 13 May 2012 04:27:05
Message-Id: CADPrc81L4Md+a18YxMhcYS20ULT5sWcFOWvXow_NUdtLCw7KEw@mail.gmail.com
In Reply to: Re: [gentoo-user] fsck separate /usr by kwkhui@hkbn.net
1 On Sat, May 12, 2012 at 10:54 PM, <kwkhui@××××.net> wrote:
2 > On Sat, 12 May 2012 19:54:24 -0500
3 > Canek Peláez Valdés <caneko@×××××.com> wrote:
4 >
5 >> On Sat, May 12, 2012 at 7:43 PM, Alex Schuster <wonko@×××××××××.org>
6 >> wrote:
7 >> > Hi there!
8 >> >
9 >> > I'm using the new udev with a separate /usr partition.
10 >>
11 >> How do you create your initramfs? The new udev (>= 182, I believe)
12 >> requires the use of an initramfs if you have a separated /usr.
13 >>
14 >> > It was encrypted,
15 >> > and it seems there is no solution yet for this.
16 >>
17 >> dracut has two modules, crypt and crypt-gpg, that maybe do what you
18 >> are needing.
19 >>
20 >> > so I moved it over to an
21 >> > unencrypted volume - no problem, /usr is one partition where
22 >> > encryption does not make that much sense anyway. Works, but after
23 >> > an unclean shutdown (reading files in /proc/<pid>/ was not a good
24 >> > idea) /usr wants to be fsck'ed. But it is already mounted at that
25 >> > stage.
26 >>
27 >> That's the reason you need an initramfs.
28 >
29 > No, that's the reason you want the filesystem's fsck to be included in
30 > the initramfs.
31 >
32 >> > The boot process just continues, but I wonder what one should do to
33 >> > make the fsck run. Except for using a live cd.
34 >>
35 >> With an initramfs.
36 >
37 > Using initramfs is necessary but itself not sufficient.
38 >
39 > One can create an initramfs (from scratch) that does nothing but
40 > mount /usr (with only busybox and a few /dev nodes, plus whatever other
41 > tools needed to find /usr, viz. lvm, cryptsetup and friends, assuming
42 > the necessary drivers are built in the kernel and not as modules ---
43 > see e.g. the old gentoo wiki at
44 > http://www.gentoo-wiki.info/HOWTO_Custom_Initramfs_From_Scratch ).
45 >
46 > The initramfs needs to have the relevant fsck tools (plus dependencies)
47 > if it was to perform fsck.
48
49 Dracut (and I believe genkernel, but I don't use it, so I'm not sure)
50 does all of that (and more, if so desired) for you.
51
52 Regards.
53 --
54 Canek Peláez Valdés
55 Posgrado en Ciencia e Ingeniería de la Computación
56 Universidad Nacional Autónoma de México