Gentoo Archives: gentoo-user

From: "Jc García" <jyo.garcia@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] problems getting systemd to work
Date: Wed, 14 May 2014 14:41:43
Message-Id: CAGQH77cPtYFr1UiTtQwB9CqY02q_cjBn0AUhzTxsVDdfYEWxPw@mail.gmail.com
In Reply to: Re: [gentoo-user] problems getting systemd to work by covici@ccs.covici.com
1 2014-05-14 3:40 GMT-06:00 <covici@××××××××××.com>:
2 > Canek Peláez Valdés <caneko@×××××.com> wrote:
3 >
4 >> On Mon, May 12, 2014 at 11:52 AM, <covici@××××××××××.com> wrote:
5 >> > Canek Peláez Valdés <caneko@×××××.com> wrote:
6 >> >
7 >> >> On Mon, May 12, 2014 at 11:31 AM, <covici@××××××××××.com> wrote:
8 >> >> [snip]
9 >> >> > OK, I will try dracut,
10 >> >>
11 >> >> I hope it works with dracut. This is my kernel command line and
12 >> >> RAID/LVM related stuff from GRUB2:
13 >> >>
14 >> >> GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd quiet nosplash"
15 >> >> GRUB_PRELOAD_MODULES="lvm mdraid1x"
16 >> >>
17 >> >> And this is my dracut.conf (minus comments):
18 >> >>
19 >> >> add_dracutmodules+="crypt lvm mdraid systemd"
20 >> >> add_drivers+="autofs4 ipv6 dm-crypt aes sha256"
21 >> >> fscks="umount mount /sbin/fsck* e2fsck"
22 >> >>
23 >> >> That's it. I didn't touched anything else to make dracut+systemd work
24 >> >> with LVM and RAID (and LUKS, but that doesn't matter).
25 >> >>
26 >> >> Also, dracut comes with extensive and very clear documentation; check
27 >> >> the man pages included.
28 >> >>
29 >> >> > but I still want to know what systemd is doing,
30 >> >> > what processes its spawning, etc. -- how can I find this out -- I
31 >> >> > thought to use the confirm_spawn, but it times out and keeps going, what
32 >> >> > can I do instead?
33 >> >>
34 >> >> You can use bootchart:
35 >> >>
36 >> >> man 1 systemd-bootchart
37 >> >>
38 >> >> It will produce a chart with all the processes, and how long it takes
39 >> >> for every one of them. But remember, the order depends on which one
40 >> >> finishes before, and that can change from boot to boot.
41 >> >>
42 >> >> > Thanks people for all your responses, this is a great list.
43 >> >>
44 >> >> Regards.
45 >> >> --
46 >> >> Canek Peláez Valdés
47 >> >> Profesor de asignatura, Facultad de Ciencias
48 >> >
49 >> > Well, since I am unable to see, the graph would not do me any good, any
50 >> > way to get it in text form? What I want to see (and I know the order
51 >> > may change) is which starts first and so on, to make sure targets,
52 >> > etc. do what I want them to do.
53 >>
54 >> Try adding this to your kernel command line:
55 >> systemd.log_target=console systemd.log_level=debug. It will add a lot
56 >> of output, including what is being executed.
57 >>
58 >> Everything is documented in the man page: man 1 systemd.
59 >
60 > Well, I rebooted under dracut, but it did not do the lvmscan and so the
61 > job trying to find the root file system timed out after 90 seconds. It
62 > took me to the emergency shell which I had specified, and I was able to
63 > do the lvm_scan and them magically root got mounted under sysroot, but I
64 > had no idea what to do next to maybe get things going.
65 >
66 > So how can I get dracut to do its lvm_scan -- I even added the line
67 > add_dracutmodules+="lvm"
68
69 This is a must if you are not running 'dracut --lvmconf'
70
71 > but no joy.
72 > I saved the rdsosreport.txt and if that is of any use, I can post it.
73 >
74 In the dracut manpage, I found the '--print-cmdline' argument , it
75 generates a suggested kernel command line , I hadn't used it before,
76 but this what it printed:
77
78 rd.lvm.lv=gentoovg/usr
79 rd.lvm.lv=gentoovg/root
80 root=/dev/mapper/gentoovg-root rootflags=defaults rootfstype=ext4
81
82 So I guess, its neccesary to have this in the command line. At the
83 time I struggled for an entire day with the same timeout when my LVs
84 where not recognized, did research trial/error with dracut and
85 genkernel, got them both working, stayed with dracut because I liked
86 it, I tried to avoid this struggle for you on my first response, but
87 I see is going to take you longer...
88
89 > --
90 > Your life is like a penny. You're going to lose it. The question is:
91 > How do
92 > you spend it?
93 >
94 > John Covici
95 > covici@××××××××××.com
96 >
97 PD: RTFM.