summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/2013-February/022947.html
blob: f4284ea6690d32ec0f0506fa207bed4cc325001a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-dev] System doen't boot with LVM
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20System%20doen%27t%20boot%20with%20LVM&In-Reply-To=%3C512245AC.3060006%40colin.guthr.ie%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="022946.html">
   <LINK REL="Next"  HREF="023012.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-dev] System doen't boot with LVM</H1>
    <B>Colin Guthrie</B> 
    <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20System%20doen%27t%20boot%20with%20LVM&In-Reply-To=%3C512245AC.3060006%40colin.guthr.ie%3E"
       TITLE="[Mageia-dev] System doen't boot with LVM">mageia at colin.guthr.ie
       </A><BR>
    <I>Mon Feb 18 16:15:56 CET 2013</I>
    <P><UL>
        <LI>Previous message: <A HREF="022946.html">[Mageia-dev] System doen't boot with LVM
</A></li>
        <LI>Next message: <A HREF="023012.html">[Mageia-dev] System doen't boot with LVM
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#22947">[ date ]</a>
              <a href="thread.html#22947">[ thread ]</a>
              <a href="subject.html#22947">[ subject ]</a>
              <a href="author.html#22947">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>'Twas brillig, and Olivier Thauvin at 18/02/13 14:55 did gyre and gimble:
&gt;<i> * Colin Guthrie (<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">mageia at colin.guthr.ie</A>) wrote:
</I>&gt;&gt;<i> 'Twas brillig, and Olivier Thauvin at 18/02/13 12:48 did gyre and gimble:
</I>&gt;&gt;&gt;<i> So ok, I just update my freshly installed mga2 to cauldron using network
</I>&gt;&gt;&gt;<i> install (live upgrade don't work, it seems urpmi fail to find a way to
</I>&gt;&gt;&gt;<i> update the system w/o filesystem).
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> I have the exact same result: it don't boot.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Hmm, re: live upgrade are you meaning just a urpmi based upgrade? If so,
</I>&gt;&gt;<i> I've done a few similar updates in the last week or so in VMs and it's
</I>&gt;&gt;<i> always been OK. I presume you installed the mageia-prepare-upgrade
</I>&gt;&gt;<i> package from mga2/core/updates_testing, rebooted to the boot menu entry
</I>&gt;&gt;<i> created by that package before upgrading?
</I>&gt;<i> 
</I>&gt;<i> Ha, no, I followed the howto on the wiki:
</I>&gt;<i> <A HREF="https://wiki.mageia.org/en/Feature:UsrMove">https://wiki.mageia.org/en/Feature:UsrMove</A>
</I>&gt;<i> 
</I>&gt;<i> and there is no reference to this package on the page :\
</I>
Yeah, I noticed that too this morning :s I'll update it (I could have
sworn I had already, but.... I guess not - it was posted about quite a
lot on the list but that's fairly transient and no excuse for my general
failure to update the wiki!).

The mageia-prepare-upgrade package is just a nice wrapper around those
commands anyway, so you should be 99% OK with those commands all the
same (although they certainly are more complicated than they now need to
be - they were originally written for cauldron users during the
transition process rather than a clean mga2-&gt;mga3, so this explains
where there are urpmi commands with skip etc. in them. I think the time
is such that I can remove some of that detail from the page - the number
of cauldron users running pre-usrmove must be ~= 0 by now :)

&gt;&gt;<i> Regarding the network install based upgrade there may be issues relating
</I>&gt;&gt;<i> to bootloader config tools (in drakx) that related the use of the blkid
</I>&gt;&gt;<i> cache which might make it miss the whole LVM volume (I've seen it
</I>&gt;&gt;<i> manifest itself as putting &quot;root=/dev/&quot; into grubs menu.lst rather than
</I>&gt;&gt;<i> &quot;root=/dev/mapper/foo&quot;).
</I>&gt;<i> 
</I>&gt;<i> The entry in grub is fine (just checked it).
</I>
Good :)

&gt;&gt;&gt;&gt;<i> In the dracut shell, what does /etc/cmdline.d/lvm.conf say? It should
</I>&gt;&gt;&gt;&gt;<i> contain enough info to brink up both the root and the swap lvm.
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> rd.lvm.lv=sagittarius/swap
</I>&gt;&gt;<i>
</I>&gt;<i> 
</I>&gt;&gt;<i> The problem is that dracut itself is not detecting that the LV needs
</I>&gt;&gt;<i> activating when it runs.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> In order to get a booting system, just pass &quot;rd.lvm.lv=sagitarius/slash&quot;
</I>&gt;&gt;<i> on the command line (obviously substituting the real name of your
</I>&gt;&gt;<i> logical volume). This should make dracut initialise the lvm automatically.
</I>&gt;<i> 
</I>&gt;<i> This method did work and I am now under linux.
</I>
Yay! Lucky that the 51-mageia-resume.conf file caused the lvm module to
be included in the first place otherwise the initrd wouldn't have the
lvm command in it at all :D

&gt;<i> What can I do to understand why dracut did not detect the lvm to
</I>&gt;<i> activate properly (and hopefully fix this definitivelly) ?
</I>
Basically, the best bet is to run something like the following (as root):

dracut -f foo.img
mkdir foo
cd foo
zcat ../foo.img | cpio -id
cat etc/cmdline.d/lvm.conf

This should test whether your / lvm has been detected in addition to the
swap one.

I sort of hope that this fails, otherwise the problem will be harder to
nail down!!

If it does fail then ultimately the problem will be in:
/usr/lib/dracut/modules.d/90lvm/module-setup.sh (or one of the utility
functions it uses). It should use &quot;udevadm info&quot; to query the system
about LVM info. You can add debug to the check_lvm function and then
re-run dracut -f foo.img again to see where it bails out.


If, however, it works fine on your running system then perhaps the
problem is with the installer lacking some udev rules to properly
capture all the needed metadata in udev database. This will require a
bit more fiddling (i.e. running udevadm info in the installer to look at
the properties it exports about the devices).

&gt;&gt;<i> You should (at least in theory) also just be able to type something like
</I>&gt;&gt;<i> &quot;lvm vgchange -ay&quot; into the dracut shell, then type exit (perhaps twice)
</I>&gt;&gt;<i> to continue the boot process.
</I>&gt;<i> 
</I>&gt;<i> This has work except I was unable to enter my passphrase to read my
</I>&gt;<i> encrypted /home.
</I>
Ahh yes, the &quot;lvm vgchange -ay&quot; is a bit of a &quot;enable everything&quot;
command (normally the initrd only initialises what it absolutely must -
e.g. /, /usr and swap for resume= support). I guess it might mess up the
passphrase stuff later on as a knock on effect, but really /home (and
any passphrase needed for it) should be the domain of the booted system
rather than the initrd (in theory!)

&gt;<i> But it's good to know this is posible.
</I>
Yeah. the lvm command is only included if dracut detects lvm as being
needed. In your current example it was somewhat fortunate that your swap
was on LVM and the 51-mageia-resume.conf file detailed that. This
51-mageia-resume.conf is a bit of a hack really... I should likely find
a nicer way to do it without hard-coded configs :)

Col

-- 

Colin Guthrie
colin(at)mageia.org
<A HREF="http://colin.guthr.ie/">http://colin.guthr.ie/</A>

Day Job:
  Tribalogic Limited <A HREF="http://www.tribalogic.net/">http://www.tribalogic.net/</A>
Open Source:
  Mageia Contributor <A HREF="http://www.mageia.org/">http://www.mageia.org/</A>
  PulseAudio Hacker <A HREF="http://www.pulseaudio.org/">http://www.pulseaudio.org/</A>
  Trac Hacker <A HREF="http://trac.edgewall.org/">http://trac.edgewall.org/</A>
</PRE>




















<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="022946.html">[Mageia-dev] System doen't boot with LVM
</A></li>
	<LI>Next message: <A HREF="023012.html">[Mageia-dev] System doen't boot with LVM
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#22947">[ date ]</a>
              <a href="thread.html#22947">[ thread ]</a>
              <a href="subject.html#22947">[ subject ]</a>
              <a href="author.html#22947">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>