Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] systemd and LUKS
Date: Wed, 04 Sep 2013 14:17:06
Message-Id: CADPrc80N8cA97HW6WM4K--4z41F931PDKUhfAbT-Qh4-Td6RGw@mail.gmail.com
In Reply to: Re: [gentoo-user] systemd and LUKS by Frank Steinmetzger
1 On Wed, Sep 4, 2013 at 5:20 AM, Frank Steinmetzger <Warp_7@×××.de> wrote:
2 > On Wed, Sep 04, 2013 at 09:22:37AM +0200, Stefan G. Weichinger wrote:
3 >> Am 03.09.2013 23:31, schrieb Frank Steinmetzger:
4 >>
5 >> > This link gave me the deciding hint -- I didn't have
6 >> > cryptsetup-generator in my system, because I didn’t have the
7 >> > cryptsetup useflags enabled. I rebuilt systemd and udisks and now
8 >> > I’m prompted for the LUKS password during boot. \o/
9 >>
10 >> Congratulations!
11 >>
12 >> sidenote: The mentioned pam_mount way of doing things lets you boot
13 >> through to a login. No waiting for the passphrase ... when I login the
14 >> LUKS-device is opened and mounted ... only one time user/pw ...
15 >> personally I like it that way.
16 >
17 > Finding stuff on pam_mount doesn’t seem to be too hard. But how do I
18 > prevent systemd from trying it first? Just by disabling the service?
19 >
20 >> > Now I need to find out whether it’s feasible for me to use it. I’ll
21 >> > definitely have to procure some custom unit files, e.g. for
22 >> > monitorix.
23 >> […]
24 >> pls share your unit as well (or even file it as a bug on
25 >> bugs.gentoo.org) to help the gentoo devs (and users) here.
26 >
27 > Well, it’s an experiment, but I’m still quite hesitant to switch. It
28 > really shuts down fast (1 to 2 seconds or so), but I don’t see much
29 > improvement in booting time (still around 40 seconds until KDM is
30 > finished). I like the small stuff around it though, for instance
31 > timedatectl is neat and that there is no consolekit thread spam in htop.
32
33 Even considering that you need to input the LUKS password, 40 seconds
34 is too much. You can use systemd-analyze and systemd-analyze blame
35 after a fresh boot to see what is taking most of the boot time.
36
37 > I also see now why some people rant about it, e.g. that it has an own
38 > logging daemon (“one big block of everything”) which uses a binary data
39 > format. OTOH, logging becomes very handy with it in that you can see all
40 > messages associated with a particular service. Systemdadm is a start,
41 > but impractical on a netbook screen.
42
43 Don't forget journalctl -b -p err and journalctl -b -p warning. Hugh
44 time savings.
45
46 > I was hoping I could have openrc and systemd in parallel on the system
47 > (so I don’t have to maintain two systems, especially on a slow netbook),
48 > but b/c I removed consolekit altogether, a lot of stuff doesn’t work
49 > anymore if I try booting with openrc.
50 >
51 > Perhaps someone can give me a hint about the following:
52 > - I’m missing openrc’s feature of using the menu key to switch between
53 > the last two TTYs, that’s very useful.
54
55 I didn't realized it was gone. However, I don't think is a feature of
56 OpenRC, it's just that OpenRC calls agetty differently from systemd, I
57 suppose.
58
59 > - No login prompt on TTY1.
60
61 Sure it is. Perhaps is just garbled? Try to log in and do a reset.
62
63 > - A resource link on how to set up networking without network manager. I
64 > always did it the conf.d/net way.
65
66 You can set up the network without networkmanager just fine.
67
68 If you want to use DHCP:
69
70 dhcpcd@.service
71 ----------------------------------------------------
72 [Unit]
73 Description=DHCP on %I
74 After=basic.target
75 Documentation=man:dhcpcd(8)
76
77 [Service]
78 ExecStartPre=/bin/ifconfig %I up
79 ExecStart=/sbin/dhcpcd -B %I
80
81 [Install]
82 WantedBy=multi-user.target
83 ----------------------------------------------------
84
85 If you want to use static network:
86
87 ----------------------------------------------------
88 [Unit]
89 Description=Static network service
90 After=local-fs.target
91 Documentation=man:ifconfig(8)
92 Documentation=man:route(8)
93
94 [Service]
95 Type=oneshot
96 RemainAfterExit=yes
97 ExecStart=/bin/ifconfig <interface> <ip> broadcast <broadcast> netmask
98 <netmask> up
99 ExecStart=/bin/route add default gw <gateway> <interface>
100 ----------------------------------------------------
101
102 (You can use the new ip command, but ifconfig is still the one
103 installed by default in Gentoo).
104
105 Or if you need something more complicated, you can put it in several
106 ExecStart lines, or put it in a script and call that.
107
108 Regards.
109 --
110 Canek Peláez Valdés
111 Posgrado en Ciencia e Ingeniería de la Computación
112 Universidad Nacional Autónoma de México

Replies

Subject Author
Re: [gentoo-user] systemd and LUKS Frank Steinmetzger <Warp_7@×××.de>