Previous Section  < Day Day Up >  Next Section

Recipe 9.17. Creating a Filesystem on a New Partition

9.17.1 Problem

You have a brand-new disk partition all ready to go to work. But you can't use it yet. A partition by itself is just a chunk of disk. How do you put a filesystem on it?

9.17.2 Solution

Use the commands specific to the filesystem you want to use.


# mke2fs  /dev/hda3


# mke2fs -j /dev/hda3


# mkreiserfs /dev/hda3


# mkfs.jfs  /dev/hda3


# mkfs.xfs  /dev/hda3

9.17.3 Discussion

mke2fs is for creating Ext2/3 filesystems. It is part of the e2fsprogs package, available from

mkreiserfs comes with ReiserFS, as part of reiserfsprogs. Get it from

mkfs.jfs is part of jfsutils, from

mkfs.xfs is part of xfsprogs, which can be downloaded from

9.17.4 See Also

    Previous Section  < Day Day Up >  Next Section