Subversion Repositories svn LFS-FR

Rev

Rev 7257 | Rev 7310 | 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.
5
#
6
msgid ""
7
msgstr ""
8
"Project-Id-Version: PACKAGE VERSION\n"
7280 jlepiller 9
"POT-Creation-Date: 2017-05-17 04:09+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"
7257 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 ""
7164 jlepiller 24
"<othername>$LastChangedBy: pierre $</othername> <date>$Date: 2016-06-01 "
7257 jlepiller 25
"19:21:44 +0000 (Wed, 01 Jun 2016) $</date>"
7156 jlepiller 26
msgstr ""
7165 jlepiller 27
"<othername>$LastChangedBy: pierre $</othername> <date>$Date: 2016-06-01 "
7257 jlepiller 28
"19:21:44 +0000 (Wed, 01 Jun 2016) $</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"
176
"\n"
177
"# Systemd installs udevadm in /bin. Other udev implementations have it in /sbin\n"
178
"if [ -x /bin/udevadm ] ; then binfiles=\"$binfiles udevadm\"; fi\n"
179
"\n"
180
"sbinfiles=\"modprobe blkid switch_root\"\n"
181
"\n"
182
"#Optional files and locations\n"
7164 jlepiller 183
"for f in mdadm mdmon udevd udevadm; do\n"
7156 jlepiller 184
"  if [ -x /sbin/$f ] ; then sbinfiles=\"$sbinfiles $f\"; fi\n"
185
"done\n"
186
"\n"
187
"unsorted=$(mktemp /tmp/unsorted.XXXXXXXXXX)\n"
188
"\n"
189
"DATADIR=/usr/share/mkinitramfs\n"
190
"INITIN=init.in\n"
191
"\n"
7164 jlepiller 192
"# Create a temporary working directory\n"
7156 jlepiller 193
"WDIR=$(mktemp -d /tmp/initrd-work.XXXXXXXXXX)\n"
194
"\n"
195
"# Create base directory structure\n"
196
"mkdir -p $WDIR/{bin,dev,lib/firmware,run,sbin,sys,proc}\n"
197
"mkdir -p $WDIR/etc/{modprobe.d,udev/rules.d}\n"
198
"touch $WDIR/etc/modprobe.d/modprobe.conf\n"
199
"ln -s lib $WDIR/lib64\n"
200
"\n"
201
"# Create necessary device nodes\n"
202
"mknod -m 640 $WDIR/dev/console c 5 1\n"
203
"mknod -m 664 $WDIR/dev/null    c 1 3\n"
204
"\n"
205
"# Install the udev configuration files\n"
206
"if [ -f /etc/udev/udev.conf ]; then\n"
207
"  cp /etc/udev/udev.conf $WDIR/etc/udev/udev.conf\n"
208
"fi\n"
209
"\n"
210
"for file in $(find /etc/udev/rules.d/ -type f) ; do\n"
211
"  cp $file $WDIR/etc/udev/rules.d\n"
212
"done\n"
213
"\n"
214
"# Install any firmware present\n"
215
"cp -a /lib/firmware $WDIR/lib\n"
216
"\n"
217
"# Copy the RAID configuration file if present\n"
218
"if [ -f /etc/mdadm.conf ] ; then\n"
219
"  cp /etc/mdadm.conf $WDIR/etc\n"
220
"fi\n"
221
"\n"
222
"# Install the init file\n"
223
"install -m0755 $DATADIR/$INITIN $WDIR/init\n"
224
"\n"
225
"if [  -n \"$KERNEL_VERSION\" ] ; then\n"
226
"  if [ -x /bin/kmod ] ; then\n"
227
"    binfiles=\"$binfiles kmod\"\n"
228
"  else\n"
229
"    binfiles=\"$binfiles lsmod\"\n"
230
"    sbinfiles=\"$sbinfiles insmod\"\n"
231
"  fi\n"
232
"fi\n"
233
"\n"
234
"# Install basic binaries\n"
235
"for f in $binfiles ; do\n"
236
"  ldd /bin/$f | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
237
"  copy $f bin\n"
238
"done\n"
239
"\n"
240
"# Add lvm if present\n"
241
"if [ -x /sbin/lvm ] ; then sbinfiles=\"$sbinfiles lvm dmsetup\"; fi\n"
242
"\n"
243
"for f in $sbinfiles ; do\n"
244
"  ldd /sbin/$f | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
245
"  copy $f sbin\n"
246
"done\n"
247
"\n"
248
"# Add udevd libraries if not in /sbin\n"
249
"if [ -x /lib/udev/udevd ] ; then\n"
250
"  ldd /lib/udev/udevd | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
251
"elif [ -x /lib/systemd/systemd-udevd ] ; then\n"
252
"  ldd /lib/systemd/systemd-udevd | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
253
"fi\n"
254
"\n"
255
"# Add module symlinks if appropriate\n"
256
"if [ -n \"$KERNEL_VERSION\" ] &amp;&amp; [ -x /bin/kmod ] ; then\n"
257
"  ln -s kmod $WDIR/bin/lsmod\n"
258
"  ln -s kmod $WDIR/bin/insmod\n"
259
"fi\n"
260
"\n"
261
"# Add lvm symlinks if appropriate\n"
262
"# Also copy the lvm.conf file\n"
263
"if  [ -x /sbin/lvm ] ; then\n"
264
"  ln -s lvm $WDIR/sbin/lvchange\n"
265
"  ln -s lvm $WDIR/sbin/lvrename\n"
266
"  ln -s lvm $WDIR/sbin/lvextend\n"
267
"  ln -s lvm $WDIR/sbin/lvcreate\n"
268
"  ln -s lvm $WDIR/sbin/lvdisplay\n"
269
"  ln -s lvm $WDIR/sbin/lvscan\n"
270
"\n"
271
"  ln -s lvm $WDIR/sbin/pvchange\n"
272
"  ln -s lvm $WDIR/sbin/pvck\n"
273
"  ln -s lvm $WDIR/sbin/pvcreate\n"
274
"  ln -s lvm $WDIR/sbin/pvdisplay\n"
275
"  ln -s lvm $WDIR/sbin/pvscan\n"
276
"\n"
277
"  ln -s lvm $WDIR/sbin/vgchange\n"
278
"  ln -s lvm $WDIR/sbin/vgcreate\n"
279
"  ln -s lvm $WDIR/sbin/vgscan\n"
280
"  ln -s lvm $WDIR/sbin/vgrename\n"
281
"  ln -s lvm $WDIR/sbin/vgck\n"
282
"  # Conf file(s)\n"
283
"  cp -a /etc/lvm $WDIR/etc\n"
284
"fi\n"
285
"\n"
286
"# Install libraries\n"
287
"sort $unsorted | uniq | while read library ; do\n"
288
"  if [ \"$library\" == \"linux-vdso.so.1\" ] ||\n"
289
"     [ \"$library\" == \"linux-gate.so.1\" ]; then\n"
290
"    continue\n"
291
"  fi\n"
292
"\n"
293
"  copy $library lib\n"
294
"done\n"
295
"\n"
296
"if [ -d /lib/udev ]; then\n"
297
"  cp -a /lib/udev $WDIR/lib\n"
298
"fi\n"
299
"if [ -d /lib/systemd ]; then\n"
300
"  cp -a /lib/systemd $WDIR/lib\n"
301
"fi\n"
302
"\n"
303
"# Install the kernel modules if requested\n"
304
"if [ -n \"$KERNEL_VERSION\" ]; then\n"
305
"  find                                                                        \\\n"
306
"     /lib/modules/$KERNEL_VERSION/kernel/{crypto,fs,lib}                      \\\n"
307
"     /lib/modules/$KERNEL_VERSION/kernel/drivers/{block,ata,md,firewire}      \\\n"
308
"     /lib/modules/$KERNEL_VERSION/kernel/drivers/{scsi,message,pcmcia,virtio} \\\n"
309
"     /lib/modules/$KERNEL_VERSION/kernel/drivers/usb/{host,storage}           \\\n"
310
"     -type f 2&gt; /dev/null | cpio --make-directories -p --quiet $WDIR\n"
311
"\n"
312
"  cp /lib/modules/$KERNEL_VERSION/modules.{builtin,order}                     \\\n"
313
"            $WDIR/lib/modules/$KERNEL_VERSION\n"
314
"\n"
315
"  depmod -b $WDIR $KERNEL_VERSION\n"
316
"fi\n"
317
"\n"
318
"( cd $WDIR ; find . | cpio -o -H newc --quiet | gzip -9 ) &gt; $INITRAMFS_FILE\n"
319
"\n"
320
"# Remove the temporary directory and file\n"
321
"rm -rf $WDIR $unsorted\n"
322
"printf \"done.\\n\"\n"
323
"\n"
324
"EOF\n"
325
"\n"
326
"<command>chmod 0755 /sbin/mkinitramfs</command></userinput>"
327
msgstr ""
328
"<userinput>cat &gt; /sbin/mkinitramfs &lt;&lt; \"EOF\"\n"
329
"#!/bin/bash\n"
330
"# This file based in part on the mkinitramfs script for the LFS LiveCD\n"
331
"# written by Alexander E. Patrakov and Jeremy Huntwork.\n"
332
"\n"
333
"copy()\n"
334
"{\n"
335
"  local file\n"
336
"\n"
337
"  if [ \"$2\" == \"lib\" ]; then\n"
338
"    file=$(PATH=/lib:/usr/lib type -p $1)\n"
339
"  else\n"
340
"    file=$(type -p $1)\n"
341
"  fi\n"
342
"\n"
343
"  if [ -n $file ] ; then\n"
344
"    cp $file $WDIR/$2\n"
345
"  else\n"
346
"    echo \"Missing required file: $1 for directory $2\"\n"
347
"    rm -rf $WDIR\n"
348
"    exit 1\n"
349
"  fi\n"
350
"}\n"
351
"\n"
352
"if [ -z $1 ] ; then\n"
353
"  INITRAMFS_FILE=initrd.img-no-kmods\n"
354
"else\n"
355
"  KERNEL_VERSION=$1\n"
356
"  INITRAMFS_FILE=initrd.img-$KERNEL_VERSION\n"
357
"fi\n"
358
"\n"
359
"if [ -n \"$KERNEL_VERSION\" ] &amp;&amp; [ ! -d \"/lib/modules/$1\" ] ; then\n"
360
"  echo \"No modules directory named $1\"\n"
361
"  exit 1\n"
362
"fi\n"
363
"\n"
364
"printf \"Creating $INITRAMFS_FILE... \"\n"
365
"\n"
366
"binfiles=\"sh cat cp dd killall ls mkdir mknod mount \"\n"
367
"binfiles=\"$binfiles umount sed sleep ln rm uname\"\n"
368
"\n"
369
"# Systemd installs udevadm in /bin. Other udev implementations have it in /sbin\n"
370
"if [ -x /bin/udevadm ] ; then binfiles=\"$binfiles udevadm\"; fi\n"
371
"\n"
372
"sbinfiles=\"modprobe blkid switch_root\"\n"
373
"\n"
374
"#Optional files and locations\n"
7165 jlepiller 375
"for f in mdadm mdmon udevd udevadm; do\n"
7156 jlepiller 376
"  if [ -x /sbin/$f ] ; then sbinfiles=\"$sbinfiles $f\"; fi\n"
377
"done\n"
378
"\n"
379
"unsorted=$(mktemp /tmp/unsorted.XXXXXXXXXX)\n"
380
"\n"
381
"DATADIR=/usr/share/mkinitramfs\n"
382
"INITIN=init.in\n"
383
"\n"
7165 jlepiller 384
"# Create a temporary working directory\n"
7156 jlepiller 385
"WDIR=$(mktemp -d /tmp/initrd-work.XXXXXXXXXX)\n"
386
"\n"
387
"# Create base directory structure\n"
388
"mkdir -p $WDIR/{bin,dev,lib/firmware,run,sbin,sys,proc}\n"
389
"mkdir -p $WDIR/etc/{modprobe.d,udev/rules.d}\n"
390
"touch $WDIR/etc/modprobe.d/modprobe.conf\n"
391
"ln -s lib $WDIR/lib64\n"
392
"\n"
393
"# Create necessary device nodes\n"
394
"mknod -m 640 $WDIR/dev/console c 5 1\n"
395
"mknod -m 664 $WDIR/dev/null    c 1 3\n"
396
"\n"
397
"# Install the udev configuration files\n"
398
"if [ -f /etc/udev/udev.conf ]; then\n"
399
"  cp /etc/udev/udev.conf $WDIR/etc/udev/udev.conf\n"
400
"fi\n"
401
"\n"
402
"for file in $(find /etc/udev/rules.d/ -type f) ; do\n"
403
"  cp $file $WDIR/etc/udev/rules.d\n"
404
"done\n"
405
"\n"
406
"# Install any firmware present\n"
407
"cp -a /lib/firmware $WDIR/lib\n"
408
"\n"
409
"# Copy the RAID configuration file if present\n"
410
"if [ -f /etc/mdadm.conf ] ; then\n"
411
"  cp /etc/mdadm.conf $WDIR/etc\n"
412
"fi\n"
413
"\n"
414
"# Install the init file\n"
415
"install -m0755 $DATADIR/$INITIN $WDIR/init\n"
416
"\n"
417
"if [  -n \"$KERNEL_VERSION\" ] ; then\n"
418
"  if [ -x /bin/kmod ] ; then\n"
419
"    binfiles=\"$binfiles kmod\"\n"
420
"  else\n"
421
"    binfiles=\"$binfiles lsmod\"\n"
422
"    sbinfiles=\"$sbinfiles insmod\"\n"
423
"  fi\n"
424
"fi\n"
425
"\n"
426
"# Install basic binaries\n"
427
"for f in $binfiles ; do\n"
428
"  ldd /bin/$f | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
429
"  copy $f bin\n"
430
"done\n"
431
"\n"
432
"# Add lvm if present\n"
433
"if [ -x /sbin/lvm ] ; then sbinfiles=\"$sbinfiles lvm dmsetup\"; fi\n"
434
"\n"
435
"for f in $sbinfiles ; do\n"
436
"  ldd /sbin/$f | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
437
"  copy $f sbin\n"
438
"done\n"
439
"\n"
440
"# Add udevd libraries if not in /sbin\n"
441
"if [ -x /lib/udev/udevd ] ; then\n"
442
"  ldd /lib/udev/udevd | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
443
"elif [ -x /lib/systemd/systemd-udevd ] ; then\n"
444
"  ldd /lib/systemd/systemd-udevd | sed \"s/\\t//\" | cut -d \" \" -f1 &gt;&gt; $unsorted\n"
445
"fi\n"
446
"\n"
447
"# Add module symlinks if appropriate\n"
448
"if [ -n \"$KERNEL_VERSION\" ] &amp;&amp; [ -x /bin/kmod ] ; then\n"
449
"  ln -s kmod $WDIR/bin/lsmod\n"
450
"  ln -s kmod $WDIR/bin/insmod\n"
451
"fi\n"
452
"\n"
453
"# Add lvm symlinks if appropriate\n"
454
"# Also copy the lvm.conf file\n"
455
"if  [ -x /sbin/lvm ] ; then\n"
456
"  ln -s lvm $WDIR/sbin/lvchange\n"
457
"  ln -s lvm $WDIR/sbin/lvrename\n"
458
"  ln -s lvm $WDIR/sbin/lvextend\n"
459
"  ln -s lvm $WDIR/sbin/lvcreate\n"
460
"  ln -s lvm $WDIR/sbin/lvdisplay\n"
461
"  ln -s lvm $WDIR/sbin/lvscan\n"
462
"\n"
463
"  ln -s lvm $WDIR/sbin/pvchange\n"
464
"  ln -s lvm $WDIR/sbin/pvck\n"
465
"  ln -s lvm $WDIR/sbin/pvcreate\n"
466
"  ln -s lvm $WDIR/sbin/pvdisplay\n"
467
"  ln -s lvm $WDIR/sbin/pvscan\n"
468
"\n"
469
"  ln -s lvm $WDIR/sbin/vgchange\n"
470
"  ln -s lvm $WDIR/sbin/vgcreate\n"
471
"  ln -s lvm $WDIR/sbin/vgscan\n"
472
"  ln -s lvm $WDIR/sbin/vgrename\n"
473
"  ln -s lvm $WDIR/sbin/vgck\n"
474
"  # Conf file(s)\n"
475
"  cp -a /etc/lvm $WDIR/etc\n"
476
"fi\n"
477
"\n"
478
"# Install libraries\n"
479
"sort $unsorted | uniq | while read library ; do\n"
480
"  if [ \"$library\" == \"linux-vdso.so.1\" ] ||\n"
481
"     [ \"$library\" == \"linux-gate.so.1\" ]; then\n"
482
"    continue\n"
483
"  fi\n"
484
"\n"
485
"  copy $library lib\n"
486
"done\n"
487
"\n"
488
"if [ -d /lib/udev ]; then\n"
489
"  cp -a /lib/udev $WDIR/lib\n"
490
"fi\n"
491
"if [ -d /lib/systemd ]; then\n"
492
"  cp -a /lib/systemd $WDIR/lib\n"
493
"fi\n"
494
"\n"
495
"# Install the kernel modules if requested\n"
496
"if [ -n \"$KERNEL_VERSION\" ]; then\n"
497
"  find                                                                        \\\n"
498
"     /lib/modules/$KERNEL_VERSION/kernel/{crypto,fs,lib}                      \\\n"
499
"     /lib/modules/$KERNEL_VERSION/kernel/drivers/{block,ata,md,firewire}      \\\n"
500
"     /lib/modules/$KERNEL_VERSION/kernel/drivers/{scsi,message,pcmcia,virtio} \\\n"
501
"     /lib/modules/$KERNEL_VERSION/kernel/drivers/usb/{host,storage}           \\\n"
502
"     -type f 2&gt; /dev/null | cpio --make-directories -p --quiet $WDIR\n"
503
"\n"
504
"  cp /lib/modules/$KERNEL_VERSION/modules.{builtin,order}                     \\\n"
505
"            $WDIR/lib/modules/$KERNEL_VERSION\n"
506
"\n"
507
"  depmod -b $WDIR $KERNEL_VERSION\n"
508
"fi\n"
509
"\n"
510
"( cd $WDIR ; find . | cpio -o -H newc --quiet | gzip -9 ) &gt; $INITRAMFS_FILE\n"
511
"\n"
512
"# Remove the temporary directory and file\n"
513
"rm -rf $WDIR $unsorted\n"
514
"printf \"done.\\n\"\n"
515
"\n"
516
"EOF\n"
517
"\n"
518
"<command>chmod 0755 /sbin/mkinitramfs</command></userinput>"
519
 
520
#. type: Content of: <sect1><sect2><screen>
521
#: blfs-en/postlfs/filesystems/initramfs.xml:248
522
#, no-wrap
523
msgid ""
524
"<userinput>mkdir -p /usr/share/mkinitramfs &amp;&amp;\n"
525
"cat &gt; /usr/share/mkinitramfs/init.in &lt;&lt; \"EOF\"\n"
526
"#!/bin/sh\n"
527
"\n"
528
"PATH=/bin:/usr/bin:/sbin:/usr/sbin\n"
529
"export PATH\n"
530
"\n"
531
"problem()\n"
532
"{\n"
533
"   printf \"Encountered a problem!\\n\\nDropping you to a shell.\\n\\n\"\n"
534
"   sh\n"
535
"}\n"
536
"\n"
537
"no_device()\n"
538
"{\n"
539
"   printf \"The device %s, which is supposed to contain the\\n\" $1\n"
540
"   printf \"root file system, does not exist.\\n\"\n"
541
"   printf \"Please fix this problem and exit this shell.\\n\\n\"\n"
542
"}\n"
543
"\n"
544
"no_mount()\n"
545
"{\n"
546
"   printf \"Could not mount device %s\\n\" $1\n"
547
"   printf \"Sleeping forever. Please reboot and fix the kernel command line.\\n\\n\"\n"
548
"   printf \"Maybe the device is formatted with an unsupported file system?\\n\\n\"\n"
549
"   printf \"Or maybe filesystem type autodetection went wrong, in which case\\n\"\n"
550
"   printf \"you should add the rootfstype=... parameter to the kernel command line.\\n\\n\"\n"
551
"   printf \"Available partitions:\\n\"\n"
552
"}\n"
553
"\n"
554
"do_mount_root()\n"
555
"{\n"
556
"   mkdir /.root\n"
557
"   [ -n \"$rootflags\" ] &amp;&amp; rootflags=\"$rootflags,\"\n"
558
"   rootflags=\"$rootflags$ro\"\n"
559
"\n"
560
"   case \"$root\" in\n"
561
"      /dev/* ) device=$root ;;\n"
562
"      UUID=* ) eval $root; device=\"/dev/disk/by-uuid/$UUID\"  ;;\n"
563
"      LABEL=*) eval $root; device=\"/dev/disk/by-label/$LABEL\" ;;\n"
564
"      \"\"     ) echo \"No root device specified.\" ; problem    ;;\n"
565
"   esac\n"
566
"\n"
567
"   while [ ! -b \"$device\" ] ; do\n"
568
"       no_device $device\n"
569
"       problem\n"
570
"   done\n"
571
"\n"
572
"   if ! mount -n -t \"$rootfstype\" -o \"$rootflags\" \"$device\" /.root ; then\n"
573
"       no_mount $device\n"
574
"       cat /proc/partitions\n"
575
"       while true ; do sleep 10000 ; done\n"
576
"   else\n"
577
"       echo \"Successfully mounted device $root\"\n"
578
"   fi\n"
579
"}\n"
580
"\n"
581
"init=/sbin/init\n"
582
"root=\n"
583
"rootdelay=\n"
584
"rootfstype=auto\n"
585
"ro=\"ro\"\n"
586
"rootflags=\n"
587
"device=\n"
588
"\n"
589
"mount -n -t devtmpfs devtmpfs /dev\n"
590
"mount -n -t proc     proc     /proc\n"
591
"mount -n -t sysfs    sysfs    /sys\n"
592
"mount -n -t tmpfs    tmpfs    /run\n"
593
"\n"
594
"read -r cmdline &lt; /proc/cmdline\n"
595
"\n"
596
"for param in $cmdline ; do\n"
597
"  case $param in\n"
598
"    init=*      ) init=${param#init=}             ;;\n"
599
"    root=*      ) root=${param#root=}             ;;\n"
600
"    rootdelay=* ) rootdelay=${param#rootdelay=}   ;;\n"
601
"    rootfstype=*) rootfstype=${param#rootfstype=} ;;\n"
602
"    rootflags=* ) rootflags=${param#rootflags=}   ;;\n"
603
"    ro          ) ro=\"ro\"                         ;;\n"
604
"    rw          ) ro=\"rw\"                         ;;\n"
605
"  esac\n"
606
"done\n"
607
"\n"
608
"# udevd location depends on version\n"
609
"if [ -x /sbin/udevd ]; then\n"
610
"  UDEVD=/sbin/udevd\n"
611
"elif [ -x /lib/udev/udevd ]; then\n"
612
"  UDEVD=/lib/udev/udevd\n"
613
"elif [ -x /lib/systemd/systemd-udevd ]; then\n"
614
"  UDEVD=/lib/systemd/systemd-udevd\n"
615
"else\n"
616
"  echo \"Cannot find udevd nor systemd-udevd\"\n"
617
"  problem\n"
618
"fi\n"
619
"\n"
620
"${UDEVD} --daemon --resolve-names=never\n"
621
"udevadm trigger\n"
622
"udevadm settle\n"
623
"\n"
624
"if [ -f /etc/mdadm.conf ] ; then mdadm -As                       ; fi\n"
625
"if [ -x /sbin/vgchange  ] ; then /sbin/vgchange -a y &gt; /dev/null ; fi\n"
626
"if [ -n \"$rootdelay\"    ] ; then sleep \"$rootdelay\"              ; fi\n"
627
"\n"
628
"do_mount_root\n"
629
"\n"
630
"killall -w ${UDEVD##*/}\n"
631
"\n"
632
"exec switch_root /.root \"$init\" \"$@\"\n"
633
"\n"
634
"EOF</userinput>"
635
msgstr ""
636
"<userinput>mkdir -p /usr/share/mkinitramfs &amp;&amp;\n"
637
"cat &gt; /usr/share/mkinitramfs/init.in &lt;&lt; \"EOF\"\n"
638
"#!/bin/sh\n"
639
"\n"
640
"PATH=/bin:/usr/bin:/sbin:/usr/sbin\n"
641
"export PATH\n"
642
"\n"
643
"problem()\n"
644
"{\n"
645
"   printf \"Encountered a problem!\\n\\nDropping you to a shell.\\n\\n\"\n"
646
"   sh\n"
647
"}\n"
648
"\n"
649
"no_device()\n"
650
"{\n"
651
"   printf \"The device %s, which is supposed to contain the\\n\" $1\n"
652
"   printf \"root file system, does not exist.\\n\"\n"
653
"   printf \"Please fix this problem and exit this shell.\\n\\n\"\n"
654
"}\n"
655
"\n"
656
"no_mount()\n"
657
"{\n"
658
"   printf \"Could not mount device %s\\n\" $1\n"
659
"   printf \"Sleeping forever. Please reboot and fix the kernel command line.\\n\\n\"\n"
660
"   printf \"Maybe the device is formatted with an unsupported file system?\\n\\n\"\n"
661
"   printf \"Or maybe filesystem type autodetection went wrong, in which case\\n\"\n"
662
"   printf \"you should add the rootfstype=... parameter to the kernel command line.\\n\\n\"\n"
663
"   printf \"Available partitions:\\n\"\n"
664
"}\n"
665
"\n"
666
"do_mount_root()\n"
667
"{\n"
668
"   mkdir /.root\n"
669
"   [ -n \"$rootflags\" ] &amp;&amp; rootflags=\"$rootflags,\"\n"
670
"   rootflags=\"$rootflags$ro\"\n"
671
"\n"
672
"   case \"$root\" in\n"
673
"      /dev/* ) device=$root ;;\n"
674
"      UUID=* ) eval $root; device=\"/dev/disk/by-uuid/$UUID\"  ;;\n"
675
"      LABEL=*) eval $root; device=\"/dev/disk/by-label/$LABEL\" ;;\n"
676
"      \"\"     ) echo \"No root device specified.\" ; problem    ;;\n"
677
"   esac\n"
678
"\n"
679
"   while [ ! -b \"$device\" ] ; do\n"
680
"       no_device $device\n"
681
"       problem\n"
682
"   done\n"
683
"\n"
684
"   if ! mount -n -t \"$rootfstype\" -o \"$rootflags\" \"$device\" /.root ; then\n"
685
"       no_mount $device\n"
686
"       cat /proc/partitions\n"
687
"       while true ; do sleep 10000 ; done\n"
688
"   else\n"
689
"       echo \"Successfully mounted device $root\"\n"
690
"   fi\n"
691
"}\n"
692
"\n"
693
"init=/sbin/init\n"
694
"root=\n"
695
"rootdelay=\n"
696
"rootfstype=auto\n"
697
"ro=\"ro\"\n"
698
"rootflags=\n"
699
"device=\n"
700
"\n"
701
"mount -n -t devtmpfs devtmpfs /dev\n"
702
"mount -n -t proc     proc     /proc\n"
703
"mount -n -t sysfs    sysfs    /sys\n"
704
"mount -n -t tmpfs    tmpfs    /run\n"
705
"\n"
706
"read -r cmdline &lt; /proc/cmdline\n"
707
"\n"
708
"for param in $cmdline ; do\n"
709
"  case $param in\n"
710
"    init=*      ) init=${param#init=}             ;;\n"
711
"    root=*      ) root=${param#root=}             ;;\n"
712
"    rootdelay=* ) rootdelay=${param#rootdelay=}   ;;\n"
713
"    rootfstype=*) rootfstype=${param#rootfstype=} ;;\n"
714
"    rootflags=* ) rootflags=${param#rootflags=}   ;;\n"
715
"    ro          ) ro=\"ro\"                         ;;\n"
716
"    rw          ) ro=\"rw\"                         ;;\n"
717
"  esac\n"
718
"done\n"
719
"\n"
720
"# udevd location depends on version\n"
721
"if [ -x /sbin/udevd ]; then\n"
722
"  UDEVD=/sbin/udevd\n"
723
"elif [ -x /lib/udev/udevd ]; then\n"
724
"  UDEVD=/lib/udev/udevd\n"
725
"elif [ -x /lib/systemd/systemd-udevd ]; then\n"
726
"  UDEVD=/lib/systemd/systemd-udevd\n"
727
"else\n"
728
"  echo \"Cannot find udevd nor systemd-udevd\"\n"
729
"  problem\n"
730
"fi\n"
731
"\n"
732
"${UDEVD} --daemon --resolve-names=never\n"
733
"udevadm trigger\n"
734
"udevadm settle\n"
735
"\n"
736
"if [ -f /etc/mdadm.conf ] ; then mdadm -As                       ; fi\n"
737
"if [ -x /sbin/vgchange  ] ; then /sbin/vgchange -a y &gt; /dev/null ; fi\n"
738
"if [ -n \"$rootdelay\"    ] ; then sleep \"$rootdelay\"              ; fi\n"
739
"\n"
740
"do_mount_root\n"
741
"\n"
742
"killall -w ${UDEVD##*/}\n"
743
"\n"
744
"exec switch_root /.root \"$init\" \"$@\"\n"
745
"\n"
746
"EOF</userinput>"
747
 
748
#. type: Content of: <sect1><sect2><title>
749
#: blfs-en/postlfs/filesystems/initramfs.xml:363
750
msgid "Using an initramfs"
751
msgstr "Utilisation d'un initramfs"
752
 
753
#. type: Content of: <sect1><sect2><bridgehead>
754
#: blfs-en/postlfs/filesystems/initramfs.xml:365
755
msgid "Required Runtime Dependency"
756
msgstr "Dépendance d'exécution requise"
757
 
758
#. type: Content of: <sect1><sect2><para>
759
#: blfs-en/postlfs/filesystems/initramfs.xml:368
760
msgid "<xref linkend=\"cpio\"/>"
761
msgstr "<xref linkend=\"cpio\"/>"
762
 
763
#. type: Content of: <sect1><sect2><para>
764
#: blfs-en/postlfs/filesystems/initramfs.xml:371
765
msgid "User Notes: <ulink url=\"&blfs-wiki;/initramfs\"/>"
766
msgstr "Notes utilisateur&nbsp;: <ulink url=\"&blfs-wiki;/initramfs\"/>"
767
 
768
#. type: Content of: <sect1><sect2><para>
769
#: blfs-en/postlfs/filesystems/initramfs.xml:376
770
msgid ""
7165 jlepiller 771
"To build an initramfs, run the following as the <systemitem "
772
"class=\"username\">root</systemitem> user:"
7156 jlepiller 773
msgstr ""
774
"Pour construire un initramfs, lancer ce qui suit en tant qu'utilisateur "
775
"<systemitem class=\"username\">root</systemitem>&nbsp;:"
776
 
777
#. type: Content of: <sect1><sect2><screen>
778
#: blfs-en/postlfs/filesystems/initramfs.xml:379
779
#, no-wrap
780
msgid "<userinput>mkinitramfs [KERNEL VERSION]</userinput>"
781
msgstr "<userinput>mkinitramfs [KERNEL VERSION]</userinput>"
782
 
783
#. type: Content of: <sect1><sect2><para>
784
#: blfs-en/postlfs/filesystems/initramfs.xml:381
785
msgid ""
786
"The optional argument is the directory where the appropriate kernel modules "
7165 jlepiller 787
"are located. This must be a subdirectory of <filename class='directory'> "
788
"/lib/modules</filename>.  If no modules are specified, then the initramfs is"
789
" named <emphasis>initrd.img-no-kmods</emphasis>.  If a kernel version is "
790
"specified, the initrd is named "
791
"<emphasis>initrd.img-$KERNEL_VERSION</emphasis> and is only appropriate for "
792
"the specific kernel specified. The output file will be placed in the current"
793
" directory."
7156 jlepiller 794
msgstr ""
795
"L'argument facultatif est le répertoire où les modules appropriés du noyau "
796
"sont enregistrés.  Cela peut être un sous-répertoire de <filename "
7165 jlepiller 797
"class='directory'> /lib/modules</filename>.  Si aucun module n'est spécifié,"
798
" alors l'initramfs est appelé <emphasis>initrd.img-no-kmods</emphasis>.  Si "
7156 jlepiller 799
"une version du noyau est précisé, le fichier initrd est appelé "
800
"<emphasis>initrd.img-$KERNEL_VERSION</emphasis> et est seulement destiné "
801
"pour le noyau spécifiquement précisé. Les fichiers de sortie seront "
802
"enregistrés dans le répertoire courant."
803
 
804
#. type: Content of: <sect1><sect2><para>
805
#: blfs-en/postlfs/filesystems/initramfs.xml:390
806
msgid ""
7165 jlepiller 807
"After generating the initrd, copy it to the <filename "
808
"class='directory'>/boot</filename> directory."
7156 jlepiller 809
msgstr ""
7165 jlepiller 810
"Après avoir généré le fichier initrd, copiez-le dans le répertoire <filename"
811
" class='directory'>/boot</filename>."
7156 jlepiller 812
 
813
#. type: Content of: <sect1><sect2><para>
814
#: blfs-en/postlfs/filesystems/initramfs.xml:393
815
msgid ""
816
"Now edit <filename>/boot/grub/grub.cfg</filename> and add a new menuentry.  "
817
"Below are several examples."
818
msgstr ""
819
"Maintenant éditez <filename>/boot/grub/grub.cfg</filename> et ajoutez une "
820
"nouvelle entrée dans le menu. En dessous, plusieurs exemples sont présentés."
821
 
822
#. type: Content of: <sect1><sect2><screen>
823
#: blfs-en/postlfs/filesystems/initramfs.xml:396
824
#, no-wrap
825
msgid ""
826
"<userinput># Generic initramfs and root fs identified by UUID\n"
827
"menuentry \"LFS Dev (LFS-7.0-Feb14) initrd, Linux 3.0.4\"\n"
828
"{\n"
829
"  linux  /vmlinuz-3.0.4-lfs-20120214 root=UUID=54b934a9-302d-415e-ac11-4988408eb0a8 ro\n"
830
"  initrd /initrd.img-no-kmods\n"
831
"}</userinput>"
832
msgstr ""
833
"<userinput># Generic initramfs and root fs identified by UUID\n"
834
"menuentry \"LFS Dev (LFS-7.0-Feb14) initrd, Linux 3.0.4\"\n"
835
"{\n"
836
"  linux  /vmlinuz-3.0.4-lfs-20120214 root=UUID=54b934a9-302d-415e-ac11-4988408eb0a8 ro\n"
837
"  initrd /initrd.img-no-kmods\n"
838
"}</userinput>"
839
 
840
#. type: Content of: <sect1><sect2><screen>
841
#: blfs-en/postlfs/filesystems/initramfs.xml:403
842
#, no-wrap
843
msgid ""
844
"<userinput># Generic initramfs and root fs on LVM partition\n"
845
"menuentry \"LFS Dev (LFS-7.0-Feb18) initrd lvm, Linux 3.0.4\"\n"
846
"{\n"
847
"  linux  /vmlinuz-3.0.4-lfs-20120218 root=/dev/mapper/myroot ro\n"
848
"  initrd /initrd.img-no-kmods\n"
849
"}</userinput>"
850
msgstr ""
851
"<userinput># Generic initramfs and root fs on LVM partition\n"
852
"menuentry \"LFS Dev (LFS-7.0-Feb18) initrd lvm, Linux 3.0.4\"\n"
853
"{\n"
854
"  linux  /vmlinuz-3.0.4-lfs-20120218 root=/dev/mapper/myroot ro\n"
855
"  initrd /initrd.img-no-kmods\n"
856
"}</userinput>"
857
 
858
#. type: Content of: <sect1><sect2><screen>
859
#: blfs-en/postlfs/filesystems/initramfs.xml:410
860
#, no-wrap
861
msgid ""
862
"<userinput># Specific initramfs and root fs identified by LABEL\n"
863
"menuentry \"LFS Dev (LFS-7.1-Feb20) initrd label, Linux 3.2.6\"\n"
864
"{\n"
865
"  linux  /vmlinuz-3.2.6-lfs71-120220 root=LABEL=lfs71 ro\n"
866
"  initrd /initrd.img-3.2.6-lfs71-120220\n"
867
"}</userinput>"
868
msgstr ""
869
"<userinput># Specific initramfs and root fs identified by LABEL\n"
870
"menuentry \"LFS Dev (LFS-7.1-Feb20) initrd label, Linux 3.2.6\"\n"
871
"{\n"
872
"  linux  /vmlinuz-3.2.6-lfs71-120220 root=LABEL=lfs71 ro\n"
873
"  initrd /initrd.img-3.2.6-lfs71-120220\n"
874
"}</userinput>"
875
 
876
#. type: Content of: <sect1><sect2><para>
877
#: blfs-en/postlfs/filesystems/initramfs.xml:417
878
msgid "Finally, reboot the system and select the desired system."
879
msgstr "Finalement, redémarrez le système et sélectionnez le système désiré."