Gentoo Archives: gentoo-dev

From: Kent Fredric <kentfredric@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: locations of binaries and separate /usr
Date: Mon, 02 Jan 2012 13:32:39
Message-Id: CAATnKFB2Ba2YZXzei1WN0LjKbycFStNC0J1WkjuuyPsOiKxSCw@mail.gmail.com
In Reply to: Re: [gentoo-dev] rfc: locations of binaries and separate /usr by Rich Freeman
1 On 3 January 2012 01:58, Rich Freeman <rich0@g.o> wrote:
2
3 > On Mon, Jan 2, 2012 at 6:47 AM, Sven Vermeulen <swift@g.o> wrote:
4 > > And how does dracut know which files it needs to mount my /usr?
5 >
6 > I assume based on the selection of modules that you enabled when
7 > building/running it.
8 >
9 > I believe dracut builds static binaries, so it mainly needs updating
10 > when you build a new kernel.
11 >
12 >
13 It also takes a list of filesystem types to add support for mounting , and
14 copies the mount.* binaries across to the tmpfs root image, along with any
15 dependencies.
16
17 May help to understand if you see the listing of the cpio'd archive:
18 https://gist.github.com/1550652
19
20 Its sort of magical really.
21
22 You'll note its only got a smattering of console fonts, particularly
23 "usr/share/consolefonts/ter-112n.psf", which I'm not even sure how it works
24 out.
25
26 The only place I have that configured is /etc/conf.d/consolefont and it
27 somehow works it out.
28
29 You may also notice a non-standard 'v86d' in sbin/ , for uvesafb support.
30
31 Its added by a simple dracut module I whipped up in 10 minutes, and its far
32 simpler to do with dracut than it ever was with genkernel.
33
34 /usr/share/dracut/modules.d/95v86d/module-setup.sh
35
36 #!/bin/bash
37 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
38 # ex: ts=8 sw=4 sts=4 et filetype=sh
39
40 check() {
41 return 0
42 }
43
44 depends() {
45 return 0
46 }
47
48 install() {
49 local _d
50
51 dracut_install "/sbin/v86d"
52 }
53
54
55 Been using dracut for 2+ months now and love it.
56
57 Sure, I've had to re-implement the bits of genkernel I actually used , and
58 I still lack an "add it to grub.conf for me" option, but its still overall
59 a net improvement in my eyes. ( I only ever really used genkernel to
60 automate compile and initrd creation, all the things that would touch the
61 .config file I disabled )
62
63 Here is basically what I run after I have my .config ready:
64
65 https://gist.github.com/1550685
66
67
68 --
69 Kent
70
71 perl -e "print substr( \"edrgmaM SPA NOcomil.ic\\@tfrken\", \$_ * 3, 3 )
72 for ( 9,8,0,7,1,6,5,4,3,2 );"