summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/2012-July/017345.html
blob: fd7a9de2dd8797ed13eb4b152f11b9505951c2f5 (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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-dev] MGA2 Installer + Bootloader stage issue: initrd regeneration not happening?
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20MGA2%20Installer%20%2B%20Bootloader%20stage%20issue%3A%20initrd%0A%20regeneration%20not%20happening%3F&In-Reply-To=%3C5001F9CA.1080303%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="017343.html">
   <LINK REL="Next"  HREF="017348.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-dev] MGA2 Installer + Bootloader stage issue: initrd regeneration not happening?</H1>
    <B>Colin Guthrie</B> 
    <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20MGA2%20Installer%20%2B%20Bootloader%20stage%20issue%3A%20initrd%0A%20regeneration%20not%20happening%3F&In-Reply-To=%3C5001F9CA.1080303%40colin.guthr.ie%3E"
       TITLE="[Mageia-dev] MGA2 Installer + Bootloader stage issue: initrd regeneration not happening?">mageia at colin.guthr.ie
       </A><BR>
    <I>Sun Jul 15 00:59:22 CEST 2012</I>
    <P><UL>
        <LI>Previous message: <A HREF="017343.html">[Mageia-dev] MGA2 Installer + Bootloader stage issue: initrd	regeneration not happening?
</A></li>
        <LI>Next message: <A HREF="017348.html">[Mageia-dev] MGA2 Installer + Bootloader stage issue: initrd	regeneration not happening?
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#17345">[ date ]</a>
              <a href="thread.html#17345">[ thread ]</a>
              <a href="subject.html#17345">[ subject ]</a>
              <a href="author.html#17345">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>'Twas brillig, and Olivier Blin at 14/07/12 21:24 did gyre and gimble:
&gt;<i> Colin Guthrie &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">mageia at colin.guthr.ie</A>&gt; writes:
</I>&gt;<i> 
</I>&gt;&gt;&gt;<i> As there was a period where the symlink existed but the initrd did not,
</I>&gt;&gt;&gt;<i> I am presuming running /sbin/install kernel exited correctly without
</I>&gt;&gt;&gt;<i> creating the initrd.
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> However, both plymouth and mageia-theme-Default seem to correctly honour
</I>&gt;&gt;&gt;<i> DURING_INSTALL.
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> I'm confused as to what is causing it to be generated... can anyone else
</I>&gt;&gt;&gt;<i> see it?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Oh wait, I think I see it:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> In the post of mageia-theme-Default it has:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> if [ &quot;$1&quot; == &quot;0&quot; ]; then
</I>&gt;&gt;<i>   /usr/sbin/plymouth-set-default-theme -R Mageia-Default
</I>&gt;&gt;<i> fi
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> This causes an initrd rebuild (-R argument) and doesn't check
</I>&gt;&gt;<i> DURING_INSTALL.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> That's the problem.
</I>&gt;<i> 
</I>&gt;<i> Ah, I did not see that one.
</I>
Yeah I missed it the first two times I looked at it too :p

&gt;<i> There are two calls to plymouth-set-default-theme in this %post.
</I>&gt;<i> Maybe we can just move the second one (with -R) upper to replace the
</I>&gt;<i> first one?
</I>
Well I think we should just drop it completely...

&gt;<i>From my reading, if we're not in the installer then
</I>/usr/share/bootsplash/scripts/switch-themes is used which takes care of
regenerating initrd if needed.

If we're in the install then plymouth-set-default-theme gets called
anyway (without the -R). So to me it seems like this is just a redundant
call.

The only thing I'd suggest is that we add a -u argument to switch-themes
to ensure it calls plymouth-set-default-theme internally.


Although as we should likely try and phase out some of the black magic
of these bootsplash scripts, I'd actually rather just do something like
this in %post:


if [ -f /usr/share/mga/backgrounds/Mageia.png -a ! -f
/usr/share/mga/backgrounds/default.png -o -L
/usr/share/mga/backgrounds/default.png ]; then
  rm -f /usr/share/mga/backgrounds/default.png
  ln -s Mageia-Default-1600x1200.png /usr/share/mga/backgrounds/default.png
fi

rm -f
/usr/share/mga/backgrounds/Mageia-Default-{0000,0700,1300,1800}.jpg ||:
rm -f /usr/share/mga/backgrounds/Mageia.xml ||:
rm -f
/usr/share/mdk/backgrounds/Mandriva-{Free,Flash,One,Powerpack}-{0000,0700,1300,1800}.jpg
||:<i>
</I>rm -f /usr/share/mdk/backgrounds/Mandriva.xml ||:

if [ -z &quot;$DURING_INSTALL&quot; ]; then
  if [ -x /usr/share/bootsplash/scripts/switch-themes ]; then
    /usr/share/bootsplash/scripts/switch-themes Mageia-Default
  fi
fi
if [ -f /etc/sysconfig/bootsplash ]; then
  perl -pi -e 's/^s*SPLASH=.*/SPLASH=auto/;
s/^s*THEME=.*/THEME=Mageia-Default/' /etc/sysconfig/bootsplash
fi
/usr/sbin/plymouth-set-default-theme Mageia-Default




That seems to be the right thing to do generally for now and good enough
for an update (can you review and give your opinion?), but longer term,
I'd rather get rid of /etc/sysconfig/bootsplash completely in favour of
other ways to control the theme (e.g. using plymouth-set-theme directly,
and tweaking kernel command line options to either use or not the
plymouth support in the initrd. If users really want to strip plymouth
from the initrd they can drop a config in /etc/dracut.conf.d/ to put a line:
 omit_dracutmodules+=&quot; plymouth &quot;

which will prevent plymouth support in any subsequently generated initrd
(although if the &quot;silent&quot; kernel param is presented and plymouth is
still installed then it will still kick in after the initrd is finished
and the main system takes over.

So uninstall plymouth is likely the best option for the purists (and I
may need to tweak dracut requires on that front)!


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="017343.html">[Mageia-dev] MGA2 Installer + Bootloader stage issue: initrd	regeneration not happening?
</A></li>
	<LI>Next message: <A HREF="017348.html">[Mageia-dev] MGA2 Installer + Bootloader stage issue: initrd	regeneration not happening?
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#17345">[ date ]</a>
              <a href="thread.html#17345">[ thread ]</a>
              <a href="subject.html#17345">[ subject ]</a>
              <a href="author.html#17345">[ 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>