Subversion Repositories svn LFS-FR

Rev

Rev 7334 | Rev 7854 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7156 jlepiller 1
# SOME DESCRIPTIVE TITLE
2
# Copyright (C) YEAR Free Software Foundation, Inc.
3
# This file is distributed under the same license as the PACKAGE package.
4
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
7313 jlepiller 5
#
7156 jlepiller 6
msgid ""
7
msgstr ""
8
"Project-Id-Version: PACKAGE VERSION\n"
7360 jlepiller 9
"POT-Creation-Date: 2018-03-04 17:38+0000\n"
7220 jlepiller 10
"PO-Revision-Date: 2016-12-28 11:27+0000\n"
7156 jlepiller 11
"Last-Translator: roptat <roptat@lepiller.eu>\n"
12
"Language-Team: LANGUAGE <LL@li.org>\n"
7313 jlepiller 13
"Language: fr\n"
7156 jlepiller 14
"MIME-Version: 1.0\n"
15
"Content-Type: text/plain; charset=UTF-8\n"
16
"Content-Transfer-Encoding: 8bit\n"
17
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
18
"X-Generator: Pootle 2.7\n"
7220 jlepiller 19
"X-POOTLE-MTIME: 1482924437.304380\n"
7156 jlepiller 20
 
21
#. type: Content of: <sect1><sect1info>
22
#: blfs-en/postlfs/filesystems/initramfs.xml:12
23
msgid ""
7334 jlepiller 24
"<othername>$LastChangedBy: thomas $</othername> <date>$Date: 2017-11-28 "
25
"18:10:14 +0000 (Tue, 28 Nov 2017) $</date>"
7156 jlepiller 26
msgstr ""
7334 jlepiller 27
"<othername>$LastChangedBy: thomas $</othername> <date>$Date: 2017-11-28 "
28
"18:10:14 +0000 (Tue, 28 Nov 2017) $</date>"
7156 jlepiller 29
 
30
#. type: Content of: <sect1><title>
31
#: blfs-en/postlfs/filesystems/initramfs.xml:16
32
msgid "About initramfs"
7220 jlepiller 33
msgstr "À propos de initramfs"
7156 jlepiller 34
 
35
#. type: Content of: <sect1><para>
36
#: blfs-en/postlfs/filesystems/initramfs.xml:18
37
msgid ""
38
"The only purpose of an initramfs is to mount the root filesystem.  The "
39
"initramfs is a complete set of directories that you would find on a normal "
40
"root filesystem.  It is bundled into a single cpio archive and compressed "
41
"with one of several compression algorithms."
42
msgstr ""
7165 jlepiller 43
"La seule fonction d'un initramfs est de monter le système de fichier racine."
44
"  L'initramfs est un ensemble complet de répertoires que vous pouvez trouver"
45
" dans un système de fichiers racine normal. Il est regroupé dans une seule "
46
"archive cpio et compressé avec l'un des nombreux algorithmes de compression."
7156 jlepiller 47
 
48
#. type: Content of: <sect1><para>
49
#: blfs-en/postlfs/filesystems/initramfs.xml:23
50
msgid ""
51
"At boot time, the boot loader loads the kernel and the initramfs image into "
52
"memory and starts the kernel.  The kernel checks for the presence of the "
53
"initramfs and, if found, mounts it as / and runs /init. The init program is "
7165 jlepiller 54
"typically a shell script.  Note that the boot process takes longer, possibly"
55
" significantly longer, if an initramfs is used."
7156 jlepiller 56
msgstr ""
57
"Au moment du démarrage, le chargeur de démarrage charge le noyau et l'image "
58
"initramfs dans la mémoire et démarre le noyau. Le noyau vérifie la présence "
59
"d'un initramfs et, s'il le trouve, le monte sur / et lance /init. Le "
60
"programme init est typiquement un script shell.  Notez que le processus de "
61
"démarrage est plus long, même significativement plus long, si un initramfs "
62
"est utilisé."
63
 
64
#. type: Content of: <sect1><para>
65
#: blfs-en/postlfs/filesystems/initramfs.xml:29
66
msgid ""
67
"For most distributions, kernel modules are the biggest reason to have an "
68
"initramfs.  In a general distribution, there are many unknowns such as file "
69
"system types and disk layouts.  In a way, this is the opposite of LFS where "
7165 jlepiller 70
"the system capabilities and layout are known and a custom kernel is normally"
71
" built.  In this situation, an initramfs is rarely needed."
7156 jlepiller 72
msgstr ""
73
"Pour la plupart des distributions, les modules du noyau sont la plus "
7165 jlepiller 74
"importante raison d'avoir un initramfs. Dans une distribution générale, il y"
75
" a beaucoup d'inconnues comme les types de systèmes de fichiers et les "
76
"couches des disques. Dans un sens, c'est l'opposé de LFS où les capacités et"
7220 jlepiller 77
" les couches du système sont connus et un noyau personnalisé est normalement"
78
" construit.  Dans cette situation, un initramfs est rarement nécessaire."
7156 jlepiller 79
 
80
#. type: Content of: <sect1><para>
81
#: blfs-en/postlfs/filesystems/initramfs.xml:35
82
msgid ""
83
"There are only four primary reasons to have an initramfs in the LFS "
84
"environment: loading the rootfs from a network, loading it from an LVM "
85
"logical volume, having an encrypted rootfs where a password is required, or "
86
"for the convenience of specifying the rootfs as a LABEL or UUID.  Anything "
87
"else usually means that the kernel was not configured properly."
88
msgstr ""
89
"Il y a seulement quatre raisons d'avoir un initramfs dans un environnement "
90
"LFS&nbsp;: le chargement du rootfs depuis le réseau, son chargement depuis "
91
"un volume logique LVM, avoir un rootfs chiffré où un mot de passe est "
7165 jlepiller 92
"requis, ou pour le confort d'un rootfs spécifié par un LABEL ou un UUID. Les"
93
" autres cas signifient souvent que le noyau n'est pas configuré "
94
"correctement."
7156 jlepiller 95
 
96
#. type: Content of: <sect1><sect2><title>
97
#: blfs-en/postlfs/filesystems/initramfs.xml:42
98
msgid "Building an initramfs"
99
msgstr "Construire un initramfs"
100
 
101
#. type: Content of: <sect1><sect2><para>
102
#: blfs-en/postlfs/filesystems/initramfs.xml:44
103
msgid ""
7165 jlepiller 104
"If you do decide to build an initramfs, the following scripts will provide a"
105
" basis to do it.  The scripts will allow specifying a rootfs via partition "
7156 jlepiller 106
"UUID or partition LABEL or a rootfs on an LVM logical volume.  They do not "
107
"support an encrypted root file system or mounting the rootfs over a network "
7165 jlepiller 108
"card.  For a more complete capability see <ulink "
109
"url=\"http://www.linuxfromscratch.org/hints/read.html\"> the LFS "
110
"Hints</ulink> or <ulink url=\"http://fedoraproject.org/wiki/Dracut\"> "
111
"dracut</ulink>."
7156 jlepiller 112
msgstr ""
113
"Si vous décidez de construire un initramfs, les scripts suivants fourniront "
7165 jlepiller 114
"les bases pour le faire. Les scripts autoriseront la spécification du rootfs"
115
" via un UUID de partition ou un LABEL de partition ou un rootfs dans un "
7156 jlepiller 116
"volume logique LVM. Ils ne supportent pas les systèmes de fichier racine "
117
"chiffrés ou le montage des rootfs par des cartes réseaux. Pour plus "
7220 jlepiller 118
"d'informations sur les possibilités, voir <ulink "
119
"url=\"http://www.linuxfromscratch.org/hints/read.html\">L'astuce LFS "
120
"</ulink> ou <ulink "
121
"url=\"http://fedoraproject.org/wiki/Dracut\">dracut</ulink>."
7156 jlepiller 122
 
123
#. type: Content of: <sect1><sect2><para>
124
#: blfs-en/postlfs/filesystems/initramfs.xml:53
125
msgid ""
126
"To install these scripts, run the following commands as the <systemitem "
127
"class=\"username\">root</systemitem> user:"
128
msgstr ""
129
"Pour installer ces scripts, lancez les commandes suivantes en tant "
130
"qu'utilisateur <systemitem class=\"username\">root</systemitem>&nbsp;:"
131
 
132
#. type: Content of: <sect1><sect2><screen>
133
#: blfs-en/postlfs/filesystems/initramfs.xml:56
7165 jlepiller 134
#, no-wrap
7156 jlepiller 135
msgid ""
136
"<userinput>cat &gt; /sbin/mkinitramfs &lt;&lt; \"EOF\"\n"
137
"#!/bin/bash\n"
138
"# This file based in part on the mkinitramfs script for the LFS LiveCD\n"
139
"# written by Alexander E. Patrakov and Jeremy Huntwork.\n"
140
"\n"
141
"copy()\n"
142
"{\n"
143
"  local file\n"
144
"\n"
145
"  if [ \"$2\" == \"lib\" ]; then\n"
146
"    file=$(PATH=/lib:/usr/lib type -p $1)\n"
147
"  else\n"
148
"    file=$(type -p $1)\n"
149
"  fi\n"
150
"\n"
151
"  if [ -n $file ] ; then\n"
152
"    cp $file $WDIR/$2\n"
153
"  else\n"
154
"    echo \"Missing required file: $1 for directory $2\"\n"
155
"    rm -rf $WDIR\n"
156
"    exit 1\n"
157
"  fi\n"
158
"}\n"
159
"\n"
160
"if [ -z $1 ] ; then\n"
161
"  INITRAMFS_FILE=initrd.img-no-kmods\n"
162
"else\n"
163
"  KERNEL_VERSION=$1\n"
164
"  INITRAMFS_FILE=initrd.img-$KERNEL_VERSION\n"
165
"fi\n"
166
"\n"
167
"if [ -n \"$KERNEL_VERSION\" ] &amp;&amp; [ ! -d \"/lib/modules/$1\" ] ; then\n"
168
"  echo \"No modules directory named $1\"\n"
169
"  exit 1\n"
170
"fi\n"
171
"\n"
172
"printf \"Creating $INITRAMFS_FILE... \"\n"
173
"\n"
174
"binfiles=\"sh cat cp dd killall ls mkdir mknod mount \"\n"
175
"binfiles=\"$binfiles umount sed sleep ln rm uname\"\n"
7334 jlepiller 176
"binfiles=\"$binfiles readlink basename\"\n"
7156 jlepiller 177
"\n"
178
"# Systemd installs udevadm in /bin. Other udev implementations have it in /sbin\n"
179
"if [ -x /bin/udevadm ] ; then binfiles=\"$binfiles udevadm\"; fi\n"
180
"\n"
181
"sbinfiles=\"modprobe blkid switch_root\"\n"
182
"\n"
183
"#Optional files and locations\n"
7164 jlepiller 184
"for f in mdadm mdmon udevd udevadm; do\n"
7156 jlepiller 185
"  if [ -x /sbin/$f ] ; then sbinfiles=\"$sbinfiles $f\"; fi\n"
186
"done\n"
187
"\n"
188
"unsorted=$(mktemp /tmp/unsorted.XXXXXXXXXX)\n"
189
"\n"
190
"DATADIR=/usr/share/mkinitramfs\n"
191
"INITIN=init.in\n"
192
"\n"
7164 jlepiller 193
"# Create a temporary working directory\n"
7156 jlepiller 194
"WDIR=$(mktemp -d /tmp/initrd-work.XXXXXXXXXX)\n"
195
"\n"
196
"# Create base directory structure\n"
7334 jlepiller 197
"mkdir -p $WDIR/{bin,dev,lib/firmware,run,sbin,sys,proc,usr}\n"
7156 jlepiller 198
"mkdir -p $WDIR/etc/{modprobe.d,udev/rules.d}\n"
199
"touch $WDIR/etc/modprobe.d/modprobe.conf\n"
200
"ln -s lib $WDIR/lib64\n"
7334 jlepiller 201
"ln -s ../bin $WDIR/usr/bin\n"
7156 jlepiller 202
"\n"
203
"# Create necessary device nodes\n"
204
"mknod -m 640 $WDIR/dev/console c 5 1\n"
205
"mknod -m 664 $WDIR/dev/null    c 1 3\n"
206
"\n"
207
"# Install the udev configuration files\n"
208
"if [ -f /etc/udev/udev.conf ]; then\n"
209
"  cp /etc/udev/udev.conf $WDIR/etc/udev/udev.conf\n"
210
"fi\n"
211
"\n"
212
"for file in $(find /etc/udev/rules.d/ -type f) ; do\n"
213
"  cp $file $WDIR/etc/udev/rules.d\n"
214
"done\n"
215
"\n"
216
"# Install any firmware present\n"
217
"cp -a /lib/firmware $WDIR/lib\n"
218
"\n"
219
"# Copy the RAID configuration file if present\n"
220
"if [ -f /etc/mdadm.conf ] ; then\n"
221
"  cp /etc/mdadm.conf $WDIR/etc\n"
222
"fi\n"
223
"\n"
224
"# Install the init file\n"
225
"install -m0755 $DATADIR/$INITIN $WDIR/init\n"
226
"\n"
227
"if [  -n \"$KERNEL_VERSION\" ] ; then\n"
228
"  if [ -x /bin/kmod ] ; then\n"
229
"    binfiles=\"$binfiles kmod\"\n"
230
"  else\n"
231
"    binfiles=\"$binfiles lsmod\"\n"
232
"    sbinfiles=\"$sbinfiles insmod\"\n"
233
"  fi\n"
234
"fi\n"
235
"\n"
236
"# Install basic binaries\n"
237
"for f in $binfiles ; do\n"
7334 jlepiller 238
"  if [ -e /bin/$f ]; then d=\"/bin\"; else d=\"/usr/bin\"; fi\n"
239
"  ldd $d/$f | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
240
"  copy $d/$f bin\n"
7156 jlepiller 241
"done\n"
242
"\n"
243
"# Add lvm if present\n"
244
"if [ -x /sbin/lvm ] ; then sbinfiles=\"$sbinfiles lvm dmsetup\"; fi\n"
245
"\n"
246
"for f in $sbinfiles ; do\n"
247
"  ldd /sbin/$f | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
248
"  copy $f sbin\n"
249
"done\n"
250
"\n"
251
"# Add udevd libraries if not in /sbin\n"
252
"if [ -x /lib/udev/udevd ] ; then\n"
253
"  ldd /lib/udev/udevd | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
254
"elif [ -x /lib/systemd/systemd-udevd ] ; then\n"
255
"  ldd /lib/systemd/systemd-udevd | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
256
"fi\n"
257
"\n"
258
"# Add module symlinks if appropriate\n"
259
"if [ -n \"$KERNEL_VERSION\" ] &amp;&amp; [ -x /bin/kmod ] ; then\n"
260
"  ln -s kmod $WDIR/bin/lsmod\n"
261
"  ln -s kmod $WDIR/bin/insmod\n"
262
"fi\n"
263
"\n"
264
"# Add lvm symlinks if appropriate\n"
265
"# Also copy the lvm.conf file\n"
266
"if  [ -x /sbin/lvm ] ; then\n"
267
"  ln -s lvm $WDIR/sbin/lvchange\n"
268
"  ln -s lvm $WDIR/sbin/lvrename\n"
269
"  ln -s lvm $WDIR/sbin/lvextend\n"
270
"  ln -s lvm $WDIR/sbin/lvcreate\n"
271
"  ln -s lvm $WDIR/sbin/lvdisplay\n"
272
"  ln -s lvm $WDIR/sbin/lvscan\n"
273
"\n"
274
"  ln -s lvm $WDIR/sbin/pvchange\n"
275
"  ln -s lvm $WDIR/sbin/pvck\n"
276
"  ln -s lvm $WDIR/sbin/pvcreate\n"
277
"  ln -s lvm $WDIR/sbin/pvdisplay\n"
278
"  ln -s lvm $WDIR/sbin/pvscan\n"
279
"\n"
280
"  ln -s lvm $WDIR/sbin/vgchange\n"
281
"  ln -s lvm $WDIR/sbin/vgcreate\n"
282
"  ln -s lvm $WDIR/sbin/vgscan\n"
283
"  ln -s lvm $WDIR/sbin/vgrename\n"
284
"  ln -s lvm $WDIR/sbin/vgck\n"
285
"  # Conf file(s)\n"
286
"  cp -a /etc/lvm $WDIR/etc\n"
287
"fi\n"
288
"\n"
289
"# Install libraries\n"
290
"sort $unsorted | uniq | while read library ; do\n"
291
"  if [ \"$library\" == \"linux-vdso.so.1\" ] ||\n"
292
"     [ \"$library\" == \"linux-gate.so.1\" ]; then\n"
293
"    continue\n"
294
"  fi\n"
295
"\n"
296
"  copy $library lib\n"
297
"done\n"
298
"\n"
299
"if [ -d /lib/udev ]; then\n"
300
"  cp -a /lib/udev $WDIR/lib\n"
301
"fi\n"
302
"if [ -d /lib/systemd ]; then\n"
303
"  cp -a /lib/systemd $WDIR/lib\n"
304
"fi\n"
305
"\n"
306
"# Install the kernel modules if requested\n"
307
"if [ -n \"$KERNEL_VERSION\" ]; then\n"
308
"  find                                                                        \\\n"
309
"     /lib/modules/$KERNEL_VERSION/kernel/{crypto,fs,lib}                      \\\n"
310
"     /lib/modules/$KERNEL_VERSION/kernel/drivers/{block,ata,md,firewire}      \\\n"
311
"     /lib/modules/$KERNEL_VERSION/kernel/drivers/{scsi,message,pcmcia,virtio} \\\n"
312
"     /lib/modules/$KERNEL_VERSION/kernel/drivers/usb/{host,storage}           \\\n"
313
"     -type f 2&gt; /dev/null | cpio --make-directories -p --quiet $WDIR\n"
314
"\n"
315
"  cp /lib/modules/$KERNEL_VERSION/modules.{builtin,order}                     \\\n"
316
"            $WDIR/lib/modules/$KERNEL_VERSION\n"
317
"\n"
318
"  depmod -b $WDIR $KERNEL_VERSION\n"
319
"fi\n"
320
"\n"
321
"( cd $WDIR ; find . | cpio -o -H newc --quiet | gzip -9 ) &gt; $INITRAMFS_FILE\n"
322
"\n"
323
"# Remove the temporary directory and file\n"
324
"rm -rf $WDIR $unsorted\n"
325
"printf \"done.\\n\"\n"
326
"\n"
327
"EOF\n"
328
"\n"
329
"<command>chmod 0755 /sbin/mkinitramfs</command></userinput>"
330
msgstr ""
331
"<userinput>cat &gt; /sbin/mkinitramfs &lt;&lt; \"EOF\"\n"
332
"#!/bin/bash\n"
333
"# This file based in part on the mkinitramfs script for the LFS LiveCD\n"
334
"# written by Alexander E. Patrakov and Jeremy Huntwork.\n"
335
"\n"
336
"copy()\n"
337
"{\n"
338
"  local file\n"
339
"\n"
340
"  if [ \"$2\" == \"lib\" ]; then\n"
341
"    file=$(PATH=/lib:/usr/lib type -p $1)\n"
342
"  else\n"
343
"    file=$(type -p $1)\n"
344
"  fi\n"
345
"\n"
346
"  if [ -n $file ] ; then\n"
347
"    cp $file $WDIR/$2\n"
348
"  else\n"
349
"    echo \"Missing required file: $1 for directory $2\"\n"
350
"    rm -rf $WDIR\n"
351
"    exit 1\n"
352
"  fi\n"
353
"}\n"
354
"\n"
355
"if [ -z $1 ] ; then\n"
356
"  INITRAMFS_FILE=initrd.img-no-kmods\n"
357
"else\n"
358
"  KERNEL_VERSION=$1\n"
359
"  INITRAMFS_FILE=initrd.img-$KERNEL_VERSION\n"
360
"fi\n"
361
"\n"
362
"if [ -n \"$KERNEL_VERSION\" ] &amp;&amp; [ ! -d \"/lib/modules/$1\" ] ; then\n"
363
"  echo \"No modules directory named $1\"\n"
364
"  exit 1\n"
365
"fi\n"
366
"\n"
367
"printf \"Creating $INITRAMFS_FILE... \"\n"
368
"\n"
369
"binfiles=\"sh cat cp dd killall ls mkdir mknod mount \"\n"
370
"binfiles=\"$binfiles umount sed sleep ln rm uname\"\n"
7334 jlepiller 371
"binfiles=\"$binfiles readlink basename\"\n"
7156 jlepiller 372
"\n"
373
"# Systemd installs udevadm in /bin. Other udev implementations have it in /sbin\n"
374
"if [ -x /bin/udevadm ] ; then binfiles=\"$binfiles udevadm\"; fi\n"
375
"\n"
376
"sbinfiles=\"modprobe blkid switch_root\"\n"
377
"\n"
378
"#Optional files and locations\n"
7165 jlepiller 379
"for f in mdadm mdmon udevd udevadm; do\n"
7156 jlepiller 380
"  if [ -x /sbin/$f ] ; then sbinfiles=\"$sbinfiles $f\"; fi\n"
381
"done\n"
382
"\n"
383
"unsorted=$(mktemp /tmp/unsorted.XXXXXXXXXX)\n"
384
"\n"
385
"DATADIR=/usr/share/mkinitramfs\n"
386
"INITIN=init.in\n"
387
"\n"
7165 jlepiller 388
"# Create a temporary working directory\n"
7156 jlepiller 389
"WDIR=$(mktemp -d /tmp/initrd-work.XXXXXXXXXX)\n"
390
"\n"
391
"# Create base directory structure\n"
7334 jlepiller 392
"mkdir -p $WDIR/{bin,dev,lib/firmware,run,sbin,sys,proc,usr}\n"
7156 jlepiller 393
"mkdir -p $WDIR/etc/{modprobe.d,udev/rules.d}\n"
394
"touch $WDIR/etc/modprobe.d/modprobe.conf\n"
395
"ln -s lib $WDIR/lib64\n"
7334 jlepiller 396
"ln -s ../bin $WDIR/usr/bin\n"
7156 jlepiller 397
"\n"
398
"# Create necessary device nodes\n"
399
"mknod -m 640 $WDIR/dev/console c 5 1\n"
400
"mknod -m 664 $WDIR/dev/null    c 1 3\n"
401
"\n"
402
"# Install the udev configuration files\n"
403
"if [ -f /etc/udev/udev.conf ]; then\n"
404
"  cp /etc/udev/udev.conf $WDIR/etc/udev/udev.conf\n"
405
"fi\n"
406
"\n"
407
"for file in $(find /etc/udev/rules.d/ -type f) ; do\n"
408
"  cp $file $WDIR/etc/udev/rules.d\n"
409
"done\n"
410
"\n"
411
"# Install any firmware present\n"
412
"cp -a /lib/firmware $WDIR/lib\n"
413
"\n"
414
"# Copy the RAID configuration file if present\n"
415
"if [ -f /etc/mdadm.conf ] ; then\n"
416
"  cp /etc/mdadm.conf $WDIR/etc\n"
417
"fi\n"
418
"\n"
419
"# Install the init file\n"
420
"install -m0755 $DATADIR/$INITIN $WDIR/init\n"
421
"\n"
422
"if [  -n \"$KERNEL_VERSION\" ] ; then\n"
423
"  if [ -x /bin/kmod ] ; then\n"
424
"    binfiles=\"$binfiles kmod\"\n"
425
"  else\n"
426
"    binfiles=\"$binfiles lsmod\"\n"
427
"    sbinfiles=\"$sbinfiles insmod\"\n"
428
"  fi\n"
429
"fi\n"
430
"\n"
431
"# Install basic binaries\n"
432
"for f in $binfiles ; do\n"
7334 jlepiller 433
"  if [ -e /bin/$f ]; then d=\"/bin\"; else d=\"/usr/bin\"; fi\n"
434
"  ldd $d/$f | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
435
"  copy $d/$f bin\n"
7156 jlepiller 436
"done\n"
437
"\n"
438
"# Add lvm if present\n"
439
"if [ -x /sbin/lvm ] ; then sbinfiles=\"$sbinfiles lvm dmsetup\"; fi\n"
440
"\n"
441
"for f in $sbinfiles ; do\n"
442
"  ldd /sbin/$f | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
443
"  copy $f sbin\n"
444
"done\n"
445
"\n"
446
"# Add udevd libraries if not in /sbin\n"
447
"if [ -x /lib/udev/udevd ] ; then\n"
448
"  ldd /lib/udev/udevd | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
449
"elif [ -x /lib/systemd/systemd-udevd ] ; then\n"
450
"  ldd /lib/systemd/systemd-udevd | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
451
"fi\n"
452
"\n"
453
"# Add module symlinks if appropriate\n"
454
"if [ -n \"$KERNEL_VERSION\" ] &amp;&amp; [ -x /bin/kmod ] ; then\n"
455
"  ln -s kmod $WDIR/bin/lsmod\n"
456
"  ln -s kmod $WDIR/bin/insmod\n"
457
"fi\n"
458
"\n"
459
"# Add lvm symlinks if appropriate\n"
460
"# Also copy the lvm.conf file\n"
461
"if  [ -x /sbin/lvm ] ; then\n"
462
"  ln -s lvm $WDIR/sbin/lvchange\n"
463
"  ln -s lvm $WDIR/sbin/lvrename\n"
464
"  ln -s lvm $WDIR/sbin/lvextend\n"
465
"  ln -s lvm $WDIR/sbin/lvcreate\n"
466
"  ln -s lvm $WDIR/sbin/lvdisplay\n"
467
"  ln -s lvm $WDIR/sbin/lvscan\n"
468
"\n"
469
"  ln -s lvm $WDIR/sbin/pvchange\n"
470
"  ln -s lvm $WDIR/sbin/pvck\n"
471
"  ln -s lvm $WDIR/sbin/pvcreate\n"
472
"  ln -s lvm $WDIR/sbin/pvdisplay\n"
473
"  ln -s lvm $WDIR/sbin/pvscan\n"
474
"\n"
475
"  ln -s lvm $WDIR/sbin/vgchange\n"
476
"  ln -s lvm $WDIR/sbin/vgcreate\n"
477
"  ln -s lvm $WDIR/sbin/vgscan\n"
478
"  ln -s lvm $WDIR/sbin/vgrename\n"
479
"  ln -s lvm $WDIR/sbin/vgck\n"
480
"  # Conf file(s)\n"
481
"  cp -a /etc/lvm $WDIR/etc\n"
482
"fi\n"
483
"\n"
484
"# Install libraries\n"
485
"sort $unsorted | uniq | while read library ; do\n"
486
"  if [ \"$library\" == \"linux-vdso.so.1\" ] ||\n"
487
"     [ \"$library\" == \"linux-gate.so.1\" ]; then\n"
488
"    continue\n"
489
"  fi\n"
490
"\n"
491
"  copy $library lib\n"
492
"done\n"
493
"\n"
494
"if [ -d /lib/udev ]; then\n"
495
"  cp -a /lib/udev $WDIR/lib\n"
496
"fi\n"
497
"if [ -d /lib/systemd ]; then\n"
498
"  cp -a /lib/systemd $WDIR/lib\n"
499
"fi\n"
500
"\n"
501
"# Install the kernel modules if requested\n"
502
"if [ -n \"$KERNEL_VERSION\" ]; then\n"
503
"  find                                                                        \\\n"
504
"     /lib/modules/$KERNEL_VERSION/kernel/{crypto,fs,lib}                      \\\n"
505
"     /lib/modules/$KERNEL_VERSION/kernel/drivers/{block,ata,md,firewire}      \\\n"
506
"     /lib/modules/$KERNEL_VERSION/kernel/drivers/{scsi,message,pcmcia,virtio} \\\n"
507
"     /lib/modules/$KERNEL_VERSION/kernel/drivers/usb/{host,storage}           \\\n"
508
"     -type f 2&gt; /dev/null | cpio --make-directories -p --quiet $WDIR\n"
509
"\n"
510
"  cp /lib/modules/$KERNEL_VERSION/modules.{builtin,order}                     \\\n"
511
"            $WDIR/lib/modules/$KERNEL_VERSION\n"
512
"\n"
513
"  depmod -b $WDIR $KERNEL_VERSION\n"
514
"fi\n"
515
"\n"
516
"( cd $WDIR ; find . | cpio -o -H newc --quiet | gzip -9 ) &gt; $INITRAMFS_FILE\n"
517
"\n"
518
"# Remove the temporary directory and file\n"
519
"rm -rf $WDIR $unsorted\n"
520
"printf \"done.\\n\"\n"
521
"\n"
522
"EOF\n"
523
"\n"
524
"<command>chmod 0755 /sbin/mkinitramfs</command></userinput>"
525
 
526
#. type: Content of: <sect1><sect2><screen>
7334 jlepiller 527
#: blfs-en/postlfs/filesystems/initramfs.xml:251
7156 jlepiller 528
#, no-wrap
529
msgid ""
530
"<userinput>mkdir -p /usr/share/mkinitramfs &amp;&amp;\n"
531
"cat &gt; /usr/share/mkinitramfs/init.in &lt;&lt; \"EOF\"\n"
532
"#!/bin/sh\n"
533
"\n"
534
"PATH=/bin:/usr/bin:/sbin:/usr/sbin\n"
535
"export PATH\n"
536
"\n"
537
"problem()\n"
538
"{\n"
539
"   printf \"Encountered a problem!\\n\\nDropping you to a shell.\\n\\n\"\n"
540
"   sh\n"
541
"}\n"
542
"\n"
543
"no_device()\n"
544
"{\n"
545
"   printf \"The device %s, which is supposed to contain the\\n\" $1\n"
546
"   printf \"root file system, does not exist.\\n\"\n"
547
"   printf \"Please fix this problem and exit this shell.\\n\\n\"\n"
548
"}\n"
549
"\n"
550
"no_mount()\n"
551
"{\n"
552
"   printf \"Could not mount device %s\\n\" $1\n"
553
"   printf \"Sleeping forever. Please reboot and fix the kernel command line.\\n\\n\"\n"
554
"   printf \"Maybe the device is formatted with an unsupported file system?\\n\\n\"\n"
555
"   printf \"Or maybe filesystem type autodetection went wrong, in which case\\n\"\n"
556
"   printf \"you should add the rootfstype=... parameter to the kernel command line.\\n\\n\"\n"
557
"   printf \"Available partitions:\\n\"\n"
558
"}\n"
559
"\n"
560
"do_mount_root()\n"
561
"{\n"
562
"   mkdir /.root\n"
563
"   [ -n \"$rootflags\" ] &amp;&amp; rootflags=\"$rootflags,\"\n"
564
"   rootflags=\"$rootflags$ro\"\n"
565
"\n"
566
"   case \"$root\" in\n"
567
"      /dev/* ) device=$root ;;\n"
568
"      UUID=* ) eval $root; device=\"/dev/disk/by-uuid/$UUID\"  ;;\n"
569
"      LABEL=*) eval $root; device=\"/dev/disk/by-label/$LABEL\" ;;\n"
570
"      \"\"     ) echo \"No root device specified.\" ; problem    ;;\n"
571
"   esac\n"
572
"\n"
573
"   while [ ! -b \"$device\" ] ; do\n"
574
"       no_device $device\n"
575
"       problem\n"
576
"   done\n"
577
"\n"
578
"   if ! mount -n -t \"$rootfstype\" -o \"$rootflags\" \"$device\" /.root ; then\n"
579
"       no_mount $device\n"
580
"       cat /proc/partitions\n"
581
"       while true ; do sleep 10000 ; done\n"
582
"   else\n"
583
"       echo \"Successfully mounted device $root\"\n"
584
"   fi\n"
585
"}\n"
586
"\n"
587
"init=/sbin/init\n"
588
"root=\n"
589
"rootdelay=\n"
590
"rootfstype=auto\n"
591
"ro=\"ro\"\n"
592
"rootflags=\n"
593
"device=\n"
594
"\n"
595
"mount -n -t devtmpfs devtmpfs /dev\n"
596
"mount -n -t proc     proc     /proc\n"
597
"mount -n -t sysfs    sysfs    /sys\n"
598
"mount -n -t tmpfs    tmpfs    /run\n"
599
"\n"
600
"read -r cmdline &lt; /proc/cmdline\n"
601
"\n"
602
"for param in $cmdline ; do\n"
603
"  case $param in\n"
604
"    init=*      ) init=${param#init=}             ;;\n"
605
"    root=*      ) root=${param#root=}             ;;\n"
606
"    rootdelay=* ) rootdelay=${param#rootdelay=}   ;;\n"
607
"    rootfstype=*) rootfstype=${param#rootfstype=} ;;\n"
608
"    rootflags=* ) rootflags=${param#rootflags=}   ;;\n"
609
"    ro          ) ro=\"ro\"                         ;;\n"
610
"    rw          ) ro=\"rw\"                         ;;\n"
611
"  esac\n"
612
"done\n"
613
"\n"
614
"# udevd location depends on version\n"
615
"if [ -x /sbin/udevd ]; then\n"
616
"  UDEVD=/sbin/udevd\n"
617
"elif [ -x /lib/udev/udevd ]; then\n"
618
"  UDEVD=/lib/udev/udevd\n"
619
"elif [ -x /lib/systemd/systemd-udevd ]; then\n"
620
"  UDEVD=/lib/systemd/systemd-udevd\n"
621
"else\n"
622
"  echo \"Cannot find udevd nor systemd-udevd\"\n"
623
"  problem\n"
624
"fi\n"
625
"\n"
626
"${UDEVD} --daemon --resolve-names=never\n"
627
"udevadm trigger\n"
628
"udevadm settle\n"
629
"\n"
630
"if [ -f /etc/mdadm.conf ] ; then mdadm -As                       ; fi\n"
631
"if [ -x /sbin/vgchange  ] ; then /sbin/vgchange -a y &gt; /dev/null ; fi\n"
632
"if [ -n \"$rootdelay\"    ] ; then sleep \"$rootdelay\"              ; fi\n"
633
"\n"
634
"do_mount_root\n"
635
"\n"
636
"killall -w ${UDEVD##*/}\n"
637
"\n"
638
"exec switch_root /.root \"$init\" \"$@\"\n"
639
"\n"
640
"EOF</userinput>"
641
msgstr ""
642
"<userinput>mkdir -p /usr/share/mkinitramfs &amp;&amp;\n"
643
"cat &gt; /usr/share/mkinitramfs/init.in &lt;&lt; \"EOF\"\n"
644
"#!/bin/sh\n"
645
"\n"
646
"PATH=/bin:/usr/bin:/sbin:/usr/sbin\n"
647
"export PATH\n"
648
"\n"
649
"problem()\n"
650
"{\n"
651
"   printf \"Encountered a problem!\\n\\nDropping you to a shell.\\n\\n\"\n"
652
"   sh\n"
653
"}\n"
654
"\n"
655
"no_device()\n"
656
"{\n"
657
"   printf \"The device %s, which is supposed to contain the\\n\" $1\n"
658
"   printf \"root file system, does not exist.\\n\"\n"
659
"   printf \"Please fix this problem and exit this shell.\\n\\n\"\n"
660
"}\n"
661
"\n"
662
"no_mount()\n"
663
"{\n"
664
"   printf \"Could not mount device %s\\n\" $1\n"
665
"   printf \"Sleeping forever. Please reboot and fix the kernel command line.\\n\\n\"\n"
666
"   printf \"Maybe the device is formatted with an unsupported file system?\\n\\n\"\n"
667
"   printf \"Or maybe filesystem type autodetection went wrong, in which case\\n\"\n"
668
"   printf \"you should add the rootfstype=... parameter to the kernel command line.\\n\\n\"\n"
669
"   printf \"Available partitions:\\n\"\n"
670
"}\n"
671
"\n"
672
"do_mount_root()\n"
673
"{\n"
674
"   mkdir /.root\n"
675
"   [ -n \"$rootflags\" ] &amp;&amp; rootflags=\"$rootflags,\"\n"
676
"   rootflags=\"$rootflags$ro\"\n"
677
"\n"
678
"   case \"$root\" in\n"
679
"      /dev/* ) device=$root ;;\n"
680
"      UUID=* ) eval $root; device=\"/dev/disk/by-uuid/$UUID\"  ;;\n"
681
"      LABEL=*) eval $root; device=\"/dev/disk/by-label/$LABEL\" ;;\n"
682
"      \"\"     ) echo \"No root device specified.\" ; problem    ;;\n"
683
"   esac\n"
684
"\n"
685
"   while [ ! -b \"$device\" ] ; do\n"
686
"       no_device $device\n"
687
"       problem\n"
688
"   done\n"
689
"\n"
690
"   if ! mount -n -t \"$rootfstype\" -o \"$rootflags\" \"$device\" /.root ; then\n"
691
"       no_mount $device\n"
692
"       cat /proc/partitions\n"
693
"       while true ; do sleep 10000 ; done\n"
694
"   else\n"
695
"       echo \"Successfully mounted device $root\"\n"
696
"   fi\n"
697
"}\n"
698
"\n"
699
"init=/sbin/init\n"
700
"root=\n"
701
"rootdelay=\n"
702
"rootfstype=auto\n"
703
"ro=\"ro\"\n"
704
"rootflags=\n"
705
"device=\n"
706
"\n"
707
"mount -n -t devtmpfs devtmpfs /dev\n"
708
"mount -n -t proc     proc     /proc\n"
709
"mount -n -t sysfs    sysfs    /sys\n"
710
"mount -n -t tmpfs    tmpfs    /run\n"
711
"\n"
712
"read -r cmdline &lt; /proc/cmdline\n"
713
"\n"
714
"for param in $cmdline ; do\n"
715
"  case $param in\n"
716
"    init=*      ) init=${param#init=}             ;;\n"
717
"    root=*      ) root=${param#root=}             ;;\n"
718
"    rootdelay=* ) rootdelay=${param#rootdelay=}   ;;\n"
719
"    rootfstype=*) rootfstype=${param#rootfstype=} ;;\n"
720
"    rootflags=* ) rootflags=${param#rootflags=}   ;;\n"
721
"    ro          ) ro=\"ro\"                         ;;\n"
722
"    rw          ) ro=\"rw\"                         ;;\n"
723
"  esac\n"
724
"done\n"
725
"\n"
726
"# udevd location depends on version\n"
727
"if [ -x /sbin/udevd ]; then\n"
728
"  UDEVD=/sbin/udevd\n"
729
"elif [ -x /lib/udev/udevd ]; then\n"
730
"  UDEVD=/lib/udev/udevd\n"
731
"elif [ -x /lib/systemd/systemd-udevd ]; then\n"
732
"  UDEVD=/lib/systemd/systemd-udevd\n"
733
"else\n"
734
"  echo \"Cannot find udevd nor systemd-udevd\"\n"
735
"  problem\n"
736
"fi\n"
737
"\n"
738
"${UDEVD} --daemon --resolve-names=never\n"
739
"udevadm trigger\n"
740
"udevadm settle\n"
741
"\n"
742
"if [ -f /etc/mdadm.conf ] ; then mdadm -As                       ; fi\n"
743
"if [ -x /sbin/vgchange  ] ; then /sbin/vgchange -a y &gt; /dev/null ; fi\n"
744
"if [ -n \"$rootdelay\"    ] ; then sleep \"$rootdelay\"              ; fi\n"
745
"\n"
746
"do_mount_root\n"
747
"\n"
748
"killall -w ${UDEVD##*/}\n"
749
"\n"
750
"exec switch_root /.root \"$init\" \"$@\"\n"
751
"\n"
752
"EOF</userinput>"
753
 
754
#. type: Content of: <sect1><sect2><title>
7334 jlepiller 755
#: blfs-en/postlfs/filesystems/initramfs.xml:366
7156 jlepiller 756
msgid "Using an initramfs"
757
msgstr "Utilisation d'un initramfs"
758
 
759
#. type: Content of: <sect1><sect2><bridgehead>
7334 jlepiller 760
#: blfs-en/postlfs/filesystems/initramfs.xml:368
7156 jlepiller 761
msgid "Required Runtime Dependency"
762
msgstr "Dépendance d'exécution requise"
763
 
764
#. type: Content of: <sect1><sect2><para>
7334 jlepiller 765
#: blfs-en/postlfs/filesystems/initramfs.xml:371
7313 jlepiller 766
msgid "<xref role=\"runtime\" linkend=\"cpio\"/>"
767
msgstr "<xref role=\"runtime\" linkend=\"cpio\"/>"
7156 jlepiller 768
 
769
#. type: Content of: <sect1><sect2><para>
7334 jlepiller 770
#: blfs-en/postlfs/filesystems/initramfs.xml:374
7156 jlepiller 771
msgid "User Notes: <ulink url=\"&blfs-wiki;/initramfs\"/>"
772
msgstr "Notes utilisateur&nbsp;: <ulink url=\"&blfs-wiki;/initramfs\"/>"
773
 
774
#. type: Content of: <sect1><sect2><para>
7334 jlepiller 775
#: blfs-en/postlfs/filesystems/initramfs.xml:379
7156 jlepiller 776
msgid ""
7165 jlepiller 777
"To build an initramfs, run the following as the <systemitem "
778
"class=\"username\">root</systemitem> user:"
7156 jlepiller 779
msgstr ""
780
"Pour construire un initramfs, lancer ce qui suit en tant qu'utilisateur "
781
"<systemitem class=\"username\">root</systemitem>&nbsp;:"
782
 
783
#. type: Content of: <sect1><sect2><screen>
7334 jlepiller 784
#: blfs-en/postlfs/filesystems/initramfs.xml:382
7156 jlepiller 785
#, no-wrap
786
msgid "<userinput>mkinitramfs [KERNEL VERSION]</userinput>"
787
msgstr "<userinput>mkinitramfs [KERNEL VERSION]</userinput>"
788
 
789
#. type: Content of: <sect1><sect2><para>
7334 jlepiller 790
#: blfs-en/postlfs/filesystems/initramfs.xml:384
7156 jlepiller 791
msgid ""
792
"The optional argument is the directory where the appropriate kernel modules "
7165 jlepiller 793
"are located. This must be a subdirectory of <filename class='directory'> "
794
"/lib/modules</filename>.  If no modules are specified, then the initramfs is"
795
" named <emphasis>initrd.img-no-kmods</emphasis>.  If a kernel version is "
796
"specified, the initrd is named "
797
"<emphasis>initrd.img-$KERNEL_VERSION</emphasis> and is only appropriate for "
798
"the specific kernel specified. The output file will be placed in the current"
799
" directory."
7156 jlepiller 800
msgstr ""
801
"L'argument facultatif est le répertoire où les modules appropriés du noyau "
802
"sont enregistrés.  Cela peut être un sous-répertoire de <filename "
7165 jlepiller 803
"class='directory'> /lib/modules</filename>.  Si aucun module n'est spécifié,"
804
" alors l'initramfs est appelé <emphasis>initrd.img-no-kmods</emphasis>.  Si "
7156 jlepiller 805
"une version du noyau est précisé, le fichier initrd est appelé "
806
"<emphasis>initrd.img-$KERNEL_VERSION</emphasis> et est seulement destiné "
807
"pour le noyau spécifiquement précisé. Les fichiers de sortie seront "
808
"enregistrés dans le répertoire courant."
809
 
810
#. type: Content of: <sect1><sect2><para>
7334 jlepiller 811
#: blfs-en/postlfs/filesystems/initramfs.xml:393
7156 jlepiller 812
msgid ""
7165 jlepiller 813
"After generating the initrd, copy it to the <filename "
814
"class='directory'>/boot</filename> directory."
7156 jlepiller 815
msgstr ""
7165 jlepiller 816
"Après avoir généré le fichier initrd, copiez-le dans le répertoire <filename"
817
" class='directory'>/boot</filename>."
7156 jlepiller 818
 
819
#. type: Content of: <sect1><sect2><para>
7334 jlepiller 820
#: blfs-en/postlfs/filesystems/initramfs.xml:396
7156 jlepiller 821
msgid ""
822
"Now edit <filename>/boot/grub/grub.cfg</filename> and add a new menuentry.  "
823
"Below are several examples."
824
msgstr ""
825
"Maintenant éditez <filename>/boot/grub/grub.cfg</filename> et ajoutez une "
826
"nouvelle entrée dans le menu. En dessous, plusieurs exemples sont présentés."
827
 
828
#. type: Content of: <sect1><sect2><screen>
7334 jlepiller 829
#: blfs-en/postlfs/filesystems/initramfs.xml:399
7156 jlepiller 830
#, no-wrap
831
msgid ""
832
"<userinput># Generic initramfs and root fs identified by UUID\n"
833
"menuentry \"LFS Dev (LFS-7.0-Feb14) initrd, Linux 3.0.4\"\n"
834
"{\n"
835
"  linux  /vmlinuz-3.0.4-lfs-20120214 root=UUID=54b934a9-302d-415e-ac11-4988408eb0a8 ro\n"
836
"  initrd /initrd.img-no-kmods\n"
837
"}</userinput>"
838
msgstr ""
839
"<userinput># Generic initramfs and root fs identified by UUID\n"
840
"menuentry \"LFS Dev (LFS-7.0-Feb14) initrd, Linux 3.0.4\"\n"
841
"{\n"
842
"  linux  /vmlinuz-3.0.4-lfs-20120214 root=UUID=54b934a9-302d-415e-ac11-4988408eb0a8 ro\n"
843
"  initrd /initrd.img-no-kmods\n"
844
"}</userinput>"
845
 
846
#. type: Content of: <sect1><sect2><screen>
7334 jlepiller 847
#: blfs-en/postlfs/filesystems/initramfs.xml:406
7156 jlepiller 848
#, no-wrap
849
msgid ""
850
"<userinput># Generic initramfs and root fs on LVM partition\n"
851
"menuentry \"LFS Dev (LFS-7.0-Feb18) initrd lvm, Linux 3.0.4\"\n"
852
"{\n"
853
"  linux  /vmlinuz-3.0.4-lfs-20120218 root=/dev/mapper/myroot ro\n"
854
"  initrd /initrd.img-no-kmods\n"
855
"}</userinput>"
856
msgstr ""
857
"<userinput># Generic initramfs and root fs on LVM partition\n"
858
"menuentry \"LFS Dev (LFS-7.0-Feb18) initrd lvm, Linux 3.0.4\"\n"
859
"{\n"
860
"  linux  /vmlinuz-3.0.4-lfs-20120218 root=/dev/mapper/myroot ro\n"
861
"  initrd /initrd.img-no-kmods\n"
862
"}</userinput>"
863
 
864
#. type: Content of: <sect1><sect2><screen>
7334 jlepiller 865
#: blfs-en/postlfs/filesystems/initramfs.xml:413
7156 jlepiller 866
#, no-wrap
867
msgid ""
868
"<userinput># Specific initramfs and root fs identified by LABEL\n"
869
"menuentry \"LFS Dev (LFS-7.1-Feb20) initrd label, Linux 3.2.6\"\n"
870
"{\n"
871
"  linux  /vmlinuz-3.2.6-lfs71-120220 root=LABEL=lfs71 ro\n"
872
"  initrd /initrd.img-3.2.6-lfs71-120220\n"
873
"}</userinput>"
874
msgstr ""
875
"<userinput># Specific initramfs and root fs identified by LABEL\n"
876
"menuentry \"LFS Dev (LFS-7.1-Feb20) initrd label, Linux 3.2.6\"\n"
877
"{\n"
878
"  linux  /vmlinuz-3.2.6-lfs71-120220 root=LABEL=lfs71 ro\n"
879
"  initrd /initrd.img-3.2.6-lfs71-120220\n"
880
"}</userinput>"
881
 
882
#. type: Content of: <sect1><sect2><para>
7334 jlepiller 883
#: blfs-en/postlfs/filesystems/initramfs.xml:420
7156 jlepiller 884
msgid "Finally, reboot the system and select the desired system."
885
msgstr "Finalement, redémarrez le système et sélectionnez le système désiré."