source: partitioning/common/creatingfilesystem.xml@ ffc750b

Last change on this file since ffc750b was bf8c11f, checked in by Jim Gifford <clfs@…>, 19 years ago

r627@server (orig r625): jim | 2005-10-31 12:59:34 -0800
Import of Cross-LFS Book

  • Property mode set to 100644
File size: 3.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
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.
18 Build instructions for other file systems can be found at
19 <ulink url="&blfs-root;view/svn/postlfs/filesystems.html"/>.</para>
20
21 <para os="b">To create an <systemitem class="filesystem">ext2</systemitem> file
22 system on the LFS partition, run the following:</para>
23
24<screen os="c"><userinput>mke2fs /dev/<replaceable>[xxx]</replaceable></userinput></screen>
25
26 <para os="d">Replace <replaceable>[xxx]</replaceable> with the name of the LFS
27 partition (<filename class="devicefile">hda5</filename> in our previous
28 example).</para>
29
30 <note os="e">
31 <para>Some host distributions use custom features in their filesystem
32 creation tools (E2fsprogs). This can cause problems when booting into
33 your new LFS, as those features will not be supported by the LFS-installed
34 E2fsprogs; you will get an error similar to <computeroutput>unsupported
35 filesystem features, upgrade your e2fsprogs</computeroutput>. To check
36 if your host system uses custom enhancements, run the following
37 command:</para>
38
39<screen os="f"><userinput>debugfs -R feature /dev/<replaceable>[xxx]</replaceable></userinput></screen>
40
41 <para>If the output contains features other than: dir_index; filetype;
42 large_file; resize_inode or sparse_super then your host system may have custom
43 enhancements. In that case, to avoid later problems, you should compile the
44 stock E2fsprogs package and use the resulting binaries to re-create the
45 filesystem on your LFS partition:</para>
46
47<screen os="g"><userinput>cd /tmp
48tar xjf /path/to/sources/e2fsprogs-&e2fsprogs-version;.tar.bz2
49cd e2fsprogs-&e2fsprogs-version;
50mkdir build
51cd build
52../configure
53make #note that we intentionally don't 'make install' here!
54./misc/mke2fs /dev/<replaceable>[xxx]</replaceable>
55cd /tmp
56rm -rf e2fsprogs-&e2fsprogs-version;</userinput></screen>
57
58 </note>
59
60 <para os="h">If a swap partition was created, it will need to be initialized
61 for use by issuing the command below. If you are using an existing swap
62 partition, there is no need to format it.</para>
63
64<screen os="i"><userinput>mkswap /dev/<replaceable>[yyy]</replaceable></userinput></screen>
65
66 <para os="j">Replace <replaceable>[yyy]</replaceable> with the name of the
67 swap partition.</para>
68
69</sect1>
Note: See TracBrowser for help on using the repository browser.