Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] problems debugging a systemd problem
Date: Thu, 28 May 2015 05:39:10
Message-Id: CADPrc813fwP23rSKzH4SZBREbSQyip3nMHxU6MVGAdX0_xtWZA@mail.gmail.com
In Reply to: [gentoo-user] problems debugging a systemd problem by covici@ccs.covici.com
1 On Thu, May 28, 2015 at 12:09 AM, <covici@××××××××××.com> wrote:
2 >
3 > Hi folks. I spent a very frustrating time last night trying to figure
4 > out why my systemd would not boot using systemd. I am using dracut and
5 > its version is 041r2. Now what was happening is that the system would
6 > get to the pre-init-queue -- and I even set the rd.break there, but
7 > after that the system would not boot -- when I used debug it endlessly
8 > said calling setl forever. Now it turned out that the problem was that
9 > I had mistyped an rd.lv= line -- instead of ssd-files/usr I had
10 > ssd-files/-usr . Now, what I would like to know is how could I tell
11 > that it was trying to look for a non-existent lv? At the point of the
12 > break. no lvm volumes were active, although strangely enough I saw a
13 > e2fsck for the real root file system which was an lvm volume. I am
14 > finding its generally hard to debug systemd problems, several other
15 > times the system just sat there till I figured it out some other way.
16 >
17 > Any observations on this would be appreciated, but I don't want to get
18 > into a flame war, I just want to minimize the down time.
19
20 Usually if you can get an emergency shell by adding "emergency" to the
21 kernel command line (both GRUB and Gummiboot allow you to edit the kernel
22 command line), then is easy to see what the problem is. My experience with
23 LVM has been consistently pretty awful, which is why I don't use in any of
24 my machines, but I suppose a systemctl --all --full will tell you what unit
25 files have failed, and then you can journalctl -b -u them. Also journalctl
26 -b by itself would tell you many times what the problem is.
27
28 The only problem with the emergency shell is that sometimes is too early in
29 the boot process for the keyboard drivers to have been loaded, but that is
30 easily solved by adding a drivers+="" line to a conf file
31 in /etc/dracut.conf.d.
32
33 Also, and I cannot stress this enough, you never delete your old (and
34 working) kernel+initramfs until you have tested the new one. I would also
35 recommend to leave the entries for the old kernel+initramfs in the
36 GRUB/Gummiboot menu, but you can manage without them.
37
38 Finally, and this is tooting my own horn, maybe you could try kerninst[1]?
39 It's a little script I started a couple of years ago to automatically
40 compile and install my kernels and generate my initramfs'. I use it in all
41 my machines, and now my kernel update is just a matter of eselecting the
42 new version, and running kerninst. I follow ~amd64 vanilla-sources, so this
43 is roughly every week or two.
44
45 Beware, though, that I don't use LVM nor RAID nor Luks, but in theory if
46 you have a working kernel+dracut+[grub|gummitboot] configuration, it should
47 also work with them.
48
49 Regards.
50
51 [1] https://github.com/canek-pelaez/kerninst
52 --
53 Canek Peláez Valdés
54 Profesor de asignatura, Facultad de Ciencias
55 Universidad Nacional Autónoma de México

Replies

Subject Author
Re: [gentoo-user] problems debugging a systemd problem covici@××××××××××.com