source: BOOK/partitioning/common/creatingfilesystem.xml@ bd3445c

systemd
Last change on this file since bd3445c was 4260133, checked in by Chris Staub <chris@…>, 10 years ago

Specify root user for more commands, for consistency

  • Property mode set to 100644
File size: 3.2 KB
RevLine 
[3f8be484]1<?xml version="1.0" encoding="ISO-8859-1"?>
[aa18ac0]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[3f8be484]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-partitioning-creatingfilesystem">
9 <?dbhtml filename="creatingfilesystem.html"?>
10
11 <title>Creating a File System on the Partition</title>
12
13 <para os="a">Now that a blank partition has been set up, the file system can be
14 created. The most widely-used system in the Linux world is the second
15 extended file system (ext2), but with newer high-capacity hard disks,
16 journaling file systems are becoming increasingly popular. We will create
17 an <systemitem class="filesystem">ext2</systemitem> file system.
[9680956]18 Instructions for other file systems can be found at
[ed5961e]19 <ulink url="&cblfs-root;index.php?section=6#File_System"/>.</para>
[3f8be484]20
21 <para os="b">To create an <systemitem class="filesystem">ext2</systemitem> file
[4260133]22 system on the CLFS partition, run the following as
23 <systemitem class="username">root</systemitem>:</para>
[3f8be484]24
25<screen os="c"><userinput>mke2fs /dev/<replaceable>[xxx]</replaceable></userinput></screen>
26
[fb40919]27 <para os="d">Replace <replaceable>[xxx]</replaceable> with the name of the CLFS
[706c361]28 partition (<filename class="devicefile">sda5</filename> in our previous
[3f8be484]29 example).</para>
30
31 <note os="e">
32 <para>Some host distributions use custom features in their filesystem
33 creation tools (E2fsprogs). This can cause problems when booting into
[fb40919]34 your new CLFS system, as those features will not be supported by the
35 CLFS-installed E2fsprogs; you will get an error similar to
36 <computeroutput>unsupported filesystem features, upgrade your
37 e2fsprogs</computeroutput>. To check if your host system uses custom
38 enhancements, run the following command:</para>
[3f8be484]39
40<screen os="f"><userinput>debugfs -R feature /dev/<replaceable>[xxx]</replaceable></userinput></screen>
41
42 <para>If the output contains features other than: dir_index; filetype;
43 large_file; resize_inode or sparse_super then your host system may have custom
[4260133]44 enhancements. In that case, to avoid later problems, you should compile the
[3f8be484]45 stock E2fsprogs package and use the resulting binaries to re-create the
[4260133]46 filesystem on your CLFS partition. To do this, run the following commands
47 as <systemitem class="username">root</systemitem>:</para>
[3f8be484]48
49<screen os="g"><userinput>cd /tmp
50tar xjf /path/to/sources/e2fsprogs-&e2fsprogs-version;.tar.bz2
51cd e2fsprogs-&e2fsprogs-version;
52mkdir build
53cd build
54../configure
55make #note that we intentionally don't 'make install' here!
56./misc/mke2fs /dev/<replaceable>[xxx]</replaceable>
57cd /tmp
58rm -rf e2fsprogs-&e2fsprogs-version;</userinput></screen>
59
60 </note>
61
[4260133]62 <para os="h">If you created a swap partition, you will need to initialize it
63 for use by issuing the command below as
64 <systemitem class="username">root</systemitem>:</para>
[3f8be484]65
66<screen os="i"><userinput>mkswap /dev/<replaceable>[yyy]</replaceable></userinput></screen>
67
68 <para os="j">Replace <replaceable>[yyy]</replaceable> with the name of the
[4260133]69 swap partition. If you are using an existing swap partition, there is no
70 need to format it.</para>
[3f8be484]71
72</sect1>
Note: See TracBrowser for help on using the repository browser.