source: chapter06/e2fsprogs.xml@ f30e3ce9

7.7-systemd 7.8-systemd 7.9-systemd
Last change on this file since f30e3ce9 was f30e3ce9, checked in by Krejzi <krejzi@…>, 9 years ago

Merged trunk.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd@10866 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 21.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-system-e2fsprogs" role="wrap">
9 <?dbhtml filename="e2fsprogs.html"?>
10
11 <sect1info condition="script">
12 <productname>e2fsprogs</productname>
13 <productnumber>&e2fsprogs-version;</productnumber>
14 <address>&e2fsprogs-url;</address>
15 </sect1info>
16
17 <title>E2fsprogs-&e2fsprogs-version;</title>
18
19 <indexterm zone="ch-system-e2fsprogs">
20 <primary sortas="a-E2fsprogs">E2fsprogs</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The E2fsprogs package contains the utilities for handling the
27 <systemitem class="filesystem">ext2</systemitem> file system. It also
28 supports the <systemitem class="filesystem">ext3</systemitem> and
29 <systemitem class="filesystem">ext4</systemitem> journaling
30 file systems.</para>
31
32 <segmentedlist>
33 <segtitle>&buildtime;</segtitle>
34 <segtitle>&diskspace;</segtitle>
35
36 <seglistitem>
37 <seg>&e2fsprogs-ch6-sbu;</seg>
38 <seg>&e2fsprogs-ch6-du;</seg>
39 </seglistitem>
40 </segmentedlist>
41
42 </sect2>
43
44 <sect2 role="installation">
45 <title>Installation of E2fsprogs</title>
46
47 <para>First, fix a potential security issue identified upstream:</para>
48
49<screen><userinput remap="pre">sed -e '/int.*old_desc_blocks/s/int/blk64_t/' \
50 -e '/if (old_desc_blocks/s/super->s_first_meta_bg/desc_blocks/' \
51 -i lib/ext2fs/closefs.c</userinput></screen>
52
53 <para>The E2fsprogs documentation recommends that the package be built in
54 a subdirectory of the source tree: </para>
55
56<screen><userinput remap="pre">mkdir -v build
57cd build</userinput></screen>
58
59 <para>Prepare E2fsprogs for compilation:</para>
60
61<screen><userinput remap="configure">LIBS=-L/tools/lib \
62CFLAGS=-I/tools/include \
63PKG_CONFIG_PATH=/tools/lib/pkgconfig \
64../configure --prefix=/usr \
65 --bindir=/bin \
66 --with-root-prefix="" \
67 --enable-elf-shlibs \
68 --disable-libblkid \
69 --disable-libuuid \
70 --disable-uuidd \
71 --disable-fsck</userinput></screen>
72
73 <variablelist>
74 <title>The meaning of the environment variable and configure options:</title>
75
76 <varlistentry>
77 <term><parameter>PKG_CONFIG_PATH, LIBS, CFLAGS</parameter></term>
78 <listitem>
79 <para>These variables enable e2fsprogs to be built using the
80 <xref linkend="ch-tools-util-linux"/> package built earlier.</para>
81 </listitem>
82 </varlistentry>
83
84 <varlistentry>
85 <term><parameter>--with-root-prefix=""</parameter> and
86 <parameter>--bindir=/bin</parameter></term>
87 <listitem>
88 <para>Certain programs (such as the <command>e2fsck</command>
89 program) are considered essential programs. When, for example,
90 <filename class="directory">/usr</filename> is not mounted, these
91 programs still need to be available. They belong in directories
92 like <filename class="directory">/lib</filename> and <filename
93 class="directory">/sbin</filename>. If this option is not passed
94 to E2fsprogs' configure, the programs are installed into the
95 <filename class="directory">/usr</filename> directory.</para>
96 </listitem>
97 </varlistentry>
98
99 <varlistentry>
100 <term><parameter>--enable-elf-shlibs</parameter></term>
101 <listitem>
102 <para>This creates the shared libraries which some programs
103 in this package use.</para>
104 </listitem>
105 </varlistentry>
106
107 <varlistentry>
108 <term><parameter>--disable-*</parameter></term>
109 <listitem>
110 <para>This prevents E2fsprogs from building and installing the
111 <systemitem class="library">libuuid</systemitem> and
112 <systemitem class="library">libblkid</systemitem> libraries, the
113 <systemitem class="daemon">uuidd</systemitem> daemon, and the
114 <command>fsck</command> wrapper, as Util-Linux installs more
115 recent versions.</para>
116 </listitem>
117 </varlistentry>
118
119 </variablelist>
120
121 <para>Compile the package:</para>
122
123<screen><userinput remap="make">make</userinput></screen>
124
125 <para>To set up and run the test suite we need to first link some
126 libraries from /tools/lib to a location where the test programs look.
127 To run the tests, issue:</para>
128
129<screen><userinput remap="test">ln -sfv /tools/lib/lib{blk,uu}id.so.1 lib
130make LD_LIBRARY_PATH=/tools/lib check</userinput></screen>
131
132 <para>One of the E2fsprogs tests will attempt to allocate 256 MB of memory.
133 If you do not have significantly more RAM than this, be sure to enable
134 sufficient swap space for the test. See <xref
135 linkend="space-creatingfilesystem"/> and <xref linkend="space-mounting"/>
136 for details on creating and enabling swap space.</para>
137
138 <para>Install the binaries, documentation, and shared libraries:</para>
139
140<screen><userinput remap="install">make install</userinput></screen>
141
142 <para>Install the static libraries and headers:</para>
143
144<screen><userinput remap="install">make install-libs</userinput></screen>
145
146 <para>Make the installed static libraries writable so debugging symbols can
147 be removed later:</para>
148
149<screen><userinput remap="install">chmod -v u+w /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a</userinput></screen>
150
151 <para>This package installs a gzipped
152 <filename class="extension">.info</filename> file but doesn't update the
153 system-wide <filename>dir</filename> file. Unzip this file and then update
154 the system <filename>dir</filename> file using the following
155 commands.</para>
156
157<screen><userinput remap="install">gunzip -v /usr/share/info/libext2fs.info.gz
158install-info --dir-file=/usr/share/info/dir /usr/share/info/libext2fs.info</userinput></screen>
159
160 <para>If desired, create and install some additional documentation by
161 issuing the following commands:</para>
162
163<screen><userinput remap="install">makeinfo -o doc/com_err.info ../lib/et/com_err.texinfo
164install -v -m644 doc/com_err.info /usr/share/info
165install-info --dir-file=/usr/share/info/dir /usr/share/info/com_err.info</userinput></screen>
166 </sect2>
167
168 <sect2 id="contents-e2fsprogs" role="content">
169 <title>Contents of E2fsprogs</title>
170
171 <segmentedlist>
172 <segtitle>Installed programs</segtitle>
173 <segtitle>Installed libraries</segtitle>
174 <segtitle>Installed directories</segtitle>
175
176 <seglistitem>
177 <seg>badblocks, chattr, compile_et, debugfs, dumpe2fs,e2freefrag,
178 e2fsck, e2image, e2label, e2undo, e4defrag, filefrag, fsck.ext2,
179 fsck.ext3, fsck.ext4, fsck.ext4dev, logsave, lsattr, mk_cmds, mke2fs,
180 mkfs.ext2, mkfs.ext3, mkfs.ext4, mkfs.ext4dev,
181 resize2fs, and tune2fs</seg>
182 <seg>libcom_err.{a,so}, libe2p.{a,so}, libext2fs.{a,so},
183 libquota.a, and libss.{a,so}</seg>
184 <seg>/usr/include/e2p, /usr/include/et, /usr/include/ext2fs,
185 /usr/include/quota, /usr/include/ss, /usr/share/et, and /usr/share/ss</seg>
186 </seglistitem>
187 </segmentedlist>
188
189 <variablelist>
190 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
191 <?dbfo list-presentation="list"?>
192 <?dbhtml list-presentation="table"?>
193
194 <varlistentry id="badblocks">
195 <term><command>badblocks</command></term>
196 <listitem>
197 <para>Searches a device (usually a disk partition) for bad
198 blocks</para>
199 <indexterm zone="ch-system-e2fsprogs badblocks">
200 <primary sortas="b-badblocks">badblocks</primary>
201 </indexterm>
202 </listitem>
203 </varlistentry>
204
205 <varlistentry id="chattr">
206 <term><command>chattr</command></term>
207 <listitem>
208 <para>Changes the attributes of files on an <systemitem
209 class="filesystem">ext2</systemitem> file system; it also
210 changes <systemitem class="filesystem">ext3</systemitem>
211 file systems, the journaling version of <systemitem
212 class="filesystem">ext2</systemitem> file systems</para>
213 <indexterm zone="ch-system-e2fsprogs chattr">
214 <primary sortas="b-chattr">chattr</primary>
215 </indexterm>
216 </listitem>
217 </varlistentry>
218
219 <varlistentry id="compile_et">
220 <term><command>compile_et</command></term>
221 <listitem>
222 <para>An error table compiler; it converts a table of error-code
223 names and messages into a C source file suitable for use with the
224 <filename class="libraryfile">com_err</filename> library</para>
225 <indexterm zone="ch-system-e2fsprogs compile_et">
226 <primary sortas="b-compile_et">compile_et</primary>
227 </indexterm>
228 </listitem>
229 </varlistentry>
230
231 <varlistentry id="debugfs">
232 <term><command>debugfs</command></term>
233 <listitem>
234 <para>A file system debugger; it can be used to examine and change
235 the state of an <systemitem class="filesystem">ext2</systemitem>
236 file system</para>
237 <indexterm zone="ch-system-e2fsprogs debugfs">
238 <primary sortas="b-debugfs">debugfs</primary>
239 </indexterm>
240 </listitem>
241 </varlistentry>
242
243 <varlistentry id="dumpe2fs">
244 <term><command>dumpe2fs</command></term>
245 <listitem>
246 <para>Prints the super block and blocks group information for the
247 file system present on a given device</para>
248 <indexterm zone="ch-system-e2fsprogs dumpe2fs">
249 <primary sortas="b-dumpe2fs">dumpe2fs</primary>
250 </indexterm>
251 </listitem>
252 </varlistentry>
253
254 <varlistentry id="e2freefrag">
255 <term><command>e2freefrag</command></term>
256 <listitem>
257 <para>Reports free space fragmentation information</para>
258 <indexterm zone="ch-system-e2fsprogs e2freefrag">
259 <primary sortas="b-e2freefrag">e2freefrag</primary>
260 </indexterm>
261 </listitem>
262 </varlistentry>
263
264 <varlistentry id="e2fsck">
265 <term><command>e2fsck</command></term>
266 <listitem>
267 <para>Is used to check, and optionally repair <systemitem
268 class="filesystem">ext2</systemitem> file systems and <systemitem
269 class="filesystem">ext3</systemitem> file systems</para>
270 <indexterm zone="ch-system-e2fsprogs e2fsck">
271 <primary sortas="b-e2fsck">e2fsck</primary>
272 </indexterm>
273 </listitem>
274 </varlistentry>
275
276 <varlistentry id="e2image">
277 <term><command>e2image</command></term>
278 <listitem>
279 <para>Is used to save critical <systemitem
280 class="filesystem">ext2</systemitem> file system data to a file</para>
281 <indexterm zone="ch-system-e2fsprogs e2image">
282 <primary sortas="b-e2image">e2image</primary>
283 </indexterm>
284 </listitem>
285 </varlistentry>
286
287 <varlistentry id="e2label">
288 <term><command>e2label</command></term>
289 <listitem>
290 <para>Displays or changes the file system label on the <systemitem
291 class="filesystem">ext2</systemitem> file system present on a given
292 device</para>
293 <indexterm zone="ch-system-e2fsprogs e2label">
294 <primary sortas="b-e2label">e2label</primary>
295 </indexterm>
296 </listitem>
297 </varlistentry>
298
299 <varlistentry id="e2undo">
300 <term><command>e2undo</command></term>
301 <listitem>
302 <para>Replays the undo log undo_log for an ext2/ext3/ext4 filesystem
303 found on a device [This can be used to undo a failed operation by an
304 e2fsprogs program.]</para>
305 <indexterm zone="ch-system-e2fsprogs e2undo">
306 <primary sortas="b-e2undo">e2undo</primary>
307 </indexterm>
308 </listitem>
309 </varlistentry>
310
311 <varlistentry id="e4defrag">
312 <term><command>e4defrag</command></term>
313 <listitem>
314 <para>Online defragmenter for ext4 filesystems</para>
315 <indexterm zone="ch-system-e2fsprogs e4defrag">
316 <primary sortas="b-e4defrag">e4defrag</primary>
317 </indexterm>
318 </listitem>
319 </varlistentry>
320
321 <varlistentry id="filefrag">
322 <term><command>filefrag</command></term>
323 <listitem>
324 <para>Reports on how badly fragmented a particular file might be</para>
325 <indexterm zone="ch-system-e2fsprogs filefrag">
326 <primary sortas="b-filefrag">filefrag</primary>
327 </indexterm>
328 </listitem>
329 </varlistentry>
330
331 <varlistentry id="fsck.ext2">
332 <term><command>fsck.ext2</command></term>
333 <listitem>
334 <para>By default checks <systemitem class="filesystem">ext2</systemitem>
335 file systems and is a hard link to <command>e2fsck</command></para>
336 <indexterm zone="ch-system-e2fsprogs fsck.ext2">
337 <primary sortas="b-fsck.ext2">fsck.ext2</primary>
338 </indexterm>
339 </listitem>
340 </varlistentry>
341
342 <varlistentry id="fsck.ext3">
343 <term><command>fsck.ext3</command></term>
344 <listitem>
345 <para>By default checks <systemitem class="filesystem">ext3</systemitem>
346 file systems and is a hard link to <command>e2fsck</command></para>
347 <indexterm zone="ch-system-e2fsprogs fsck.ext3">
348 <primary sortas="b-fsck.ext3">fsck.ext3</primary>
349 </indexterm>
350 </listitem>
351 </varlistentry>
352
353 <varlistentry id="fsck.ext4">
354 <term><command>fsck.ext4</command></term>
355 <listitem>
356 <para>By default checks <systemitem class="filesystem">ext4</systemitem>
357 file systems and is a hard link to <command>e2fsck</command></para>
358 <indexterm zone="ch-system-e2fsprogs fsck.ext4">
359 <primary sortas="b-fsck.ext4">fsck.ext4</primary>
360 </indexterm>
361 </listitem>
362 </varlistentry>
363
364 <varlistentry id="fsck.ext4dev">
365 <term><command>fsck.ext4dev</command></term>
366 <listitem>
367 <para>By default checks <systemitem class="filesystem">ext4</systemitem>
368 development file systems and is a hard link to
369 <command>e2fsck</command></para>
370 <indexterm zone="ch-system-e2fsprogs fsck.ext4dev">
371 <primary sortas="b-fsck.ext4dev">fsck.ext4dev</primary>
372 </indexterm>
373 </listitem>
374 </varlistentry>
375
376 <varlistentry id="logsave">
377 <term><command>logsave</command></term>
378 <listitem>
379 <para>Saves the output of a command in a log file</para>
380 <indexterm zone="ch-system-e2fsprogs logsave">
381 <primary sortas="b-logsave">logsave</primary>
382 </indexterm>
383 </listitem>
384 </varlistentry>
385
386 <varlistentry id="lsattr">
387 <term><command>lsattr</command></term>
388 <listitem>
389 <para>Lists the attributes of files on a second extended file
390 system</para>
391 <indexterm zone="ch-system-e2fsprogs lsattr">
392 <primary sortas="b-lsattr">lsattr</primary>
393 </indexterm>
394 </listitem>
395 </varlistentry>
396
397 <varlistentry id="mk_cmds">
398 <term><command>mk_cmds</command></term>
399 <listitem>
400 <para>Converts a table of command names and help messages into a C
401 source file suitable for use with the <filename
402 class="libraryfile">libss</filename> subsystem library</para>
403 <indexterm zone="ch-system-e2fsprogs mk_cmds">
404 <primary sortas="b-mk_cmds">mk_cmds</primary>
405 </indexterm>
406 </listitem>
407 </varlistentry>
408
409 <varlistentry id="mke2fs">
410 <term><command>mke2fs</command></term>
411 <listitem>
412 <para>Creates an <systemitem class="filesystem">ext2</systemitem>
413 or <systemitem class="filesystem">ext3</systemitem> file system on
414 the given device</para>
415 <indexterm zone="ch-system-e2fsprogs mke2fs">
416 <primary sortas="b-mke2fs">mke2fs</primary>
417 </indexterm>
418 </listitem>
419 </varlistentry>
420
421 <varlistentry id="mkfs.ext2">
422 <term><command>mkfs.ext2</command></term>
423 <listitem>
424 <para>By default creates <systemitem class="filesystem">ext2</systemitem>
425 file systems and is a hard link to <command>mke2fs</command></para>
426 <indexterm zone="ch-system-e2fsprogs mkfs.ext2">
427 <primary sortas="b-mkfs.ext2">mkfs.ext2</primary>
428 </indexterm>
429 </listitem>
430 </varlistentry>
431
432 <varlistentry id="mkfs.ext3">
433 <term><command>mkfs.ext3</command></term>
434 <listitem>
435 <para>By default creates <systemitem class="filesystem">ext3</systemitem>
436 file systems and is a hard link to <command>mke2fs</command></para>
437 <indexterm zone="ch-system-e2fsprogs mkfs.ext3">
438 <primary sortas="b-mkfs.ext3">mkfs.ext3</primary>
439 </indexterm>
440 </listitem>
441 </varlistentry>
442
443 <varlistentry id="mkfs.ext4">
444 <term><command>mkfs.ext4</command></term>
445 <listitem>
446 <para>By default creates <systemitem class="filesystem">ext4</systemitem>
447 file systems and is a hard link to <command>mke2fs</command></para>
448 <indexterm zone="ch-system-e2fsprogs mkfs.ext4">
449 <primary sortas="b-mkfs.ext4">mkfs.ext4</primary>
450 </indexterm>
451 </listitem>
452 </varlistentry>
453
454 <varlistentry id="mkfs.ext4dev">
455 <term><command>mkfs.ext4dev</command></term>
456 <listitem>
457 <para>By default creates <systemitem class="filesystem">ext4</systemitem>
458 development file systems and is a hard link to <command>mke2fs</command></para>
459 <indexterm zone="ch-system-e2fsprogs mkfs.ext4dev">
460 <primary sortas="b-mkfs.ext4dev">mkfs.ext4dev</primary>
461 </indexterm>
462 </listitem>
463 </varlistentry>
464
465 <varlistentry id="mklost-found">
466 <term><command>mklost+found</command></term>
467 <listitem>
468 <para>Used to create a <filename class="directory">lost+found</filename>
469 directory on an <systemitem class="filesystem">ext2</systemitem> file
470 system; it pre-allocates disk blocks to this directory to lighten the
471 task of <command>e2fsck</command></para>
472 <indexterm zone="ch-system-e2fsprogs mklost-found">
473 <primary sortas="b-mklost+found">mklost+found</primary>
474 </indexterm>
475 </listitem>
476 </varlistentry>
477
478 <varlistentry id="resize2fs">
479 <term><command>resize2fs</command></term>
480 <listitem>
481 <para>Can be used to enlarge or shrink an <systemitem
482 class="filesystem">ext2</systemitem> file system</para>
483 <indexterm zone="ch-system-e2fsprogs resize2fs">
484 <primary sortas="b-resize2fs">resize2fs</primary>
485 </indexterm>
486 </listitem>
487 </varlistentry>
488
489 <varlistentry id="tune2fs">
490 <term><command>tune2fs</command></term>
491 <listitem>
492 <para>Adjusts tunable file system parameters on an <systemitem
493 class="filesystem">ext2</systemitem> file system</para>
494 <indexterm zone="ch-system-e2fsprogs tune2fs">
495 <primary sortas="b-tune2fs">tune2fs</primary>
496 </indexterm>
497 </listitem>
498 </varlistentry>
499
500 <varlistentry id="libcom_err">
501 <term><filename class="libraryfile">libcom_err</filename></term>
502 <listitem>
503 <para>The common error display routine</para>
504 <indexterm zone="ch-system-e2fsprogs libcom_err">
505 <primary sortas="c-libcom_err">libcom_err</primary>
506 </indexterm>
507 </listitem>
508 </varlistentry>
509
510 <varlistentry id="libe2p">
511 <term><filename class="libraryfile">libe2p</filename></term>
512 <listitem>
513 <para>Used by <command>dumpe2fs</command>, <command>chattr</command>,
514 and <command>lsattr</command></para>
515 <indexterm zone="ch-system-e2fsprogs libe2p">
516 <primary sortas="c-libe2p">libe2p</primary>
517 </indexterm>
518 </listitem>
519 </varlistentry>
520
521 <varlistentry id="libext2fs">
522 <term><filename class="libraryfile">libext2fs</filename></term>
523 <listitem>
524 <para>Contains routines to enable user-level programs to manipulate an
525 <systemitem class="filesystem">ext2</systemitem> file system</para>
526 <indexterm zone="ch-system-e2fsprogs libext2fs">
527 <primary sortas="c-libext2fs">libext2fs</primary>
528 </indexterm>
529 </listitem>
530 </varlistentry>
531
532 <varlistentry id="libquota">
533 <term><filename class="libraryfile">libquota</filename></term>
534 <listitem>
535 <para>Provides an interface for creating and updating quota files
536 and ext4 superblock fields</para>
537 <indexterm zone="ch-system-e2fsprogs libquota">
538 <primary sortas="c-libquota">libquota</primary>
539 </indexterm>
540 </listitem>
541 </varlistentry>
542
543 <varlistentry id="libss">
544 <term><filename class="libraryfile">libss</filename></term>
545 <listitem>
546 <para>Used by <command>debugfs</command></para>
547 <indexterm zone="ch-system-e2fsprogs libss">
548 <primary sortas="c-libss">libss</primary>
549 </indexterm>
550 </listitem>
551 </varlistentry>
552
553 </variablelist>
554
555 </sect2>
556
557</sect1>
Note: See TracBrowser for help on using the repository browser.