4.d. Creating Filesystems
Introduction
Now that your partitions are created, it is time to place a filesystem on them. If you don't care about what filesystem to choose and are happy with what we use as default in this handbook, continue with Applying a Filesystem to a Partition. Otherwise read on to learn about the available filesystems...
Filesystems?
The Linux kernel supports various filesystems. We'll explain ext2, ext3, ReiserFS, XFS and JFS as these are the most commonly used filesystems on Linux systems.
ext2 is the tried and true Linux filesystem but doesn't have metadata journaling, which means that routine ext2 filesystem checks at startup time can be quite time-consuming. There is now quite a selection of newer-generation journaled filesystems that can be checked for consistency very quickly and are thus generally preferred over their non-journaled counterparts. Journaled filesystems prevent long delays when you boot your system and your filesystem happens to be in an inconsistent state.
ext3 is the journaled version of the ext2 filesystem, providing metadata journaling for fast recovery in addition to other enhanced journaling modes like full data and ordered data journaling. ext3 is a very good and reliable filesystem. It has an additional hashed b-tree indexing option that enables high performance in almost all situations. You can enable this indexing by adding -O dir_index to the mke2fs command. In short, ext3 is an excellent filesystem.
ReiserFS is a B*-tree based filesystem that has very good overall performance and greatly outperforms both ext2 and ext3 when dealing with small files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is solid and usable as both general-purpose filesystem and for extreme cases such as the creation of large filesystems, the use of many small files, very large files and directories containing tens of thousands of files.
XFS is a filesystem with metadata journaling which comes with a robust feature-set and is optimized for scalability. We only recommend using this filesystem on Linux systems with high-end SCSI and/or fibre channel storage and an uninterruptible power supply. Because XFS aggressively caches in-transit data in RAM, improperly designed programs (those that don't take proper precautions when writing files to disk and there are quite a few of them) can lose a good deal of data if the system goes down unexpectedly.
JFS is IBM's high-performance journaling filesystem. It has recently become production-ready and there hasn't been a sufficient track record to comment positively nor negatively on its general stability at this point.
Applying a Filesystem to a Partition
To create a filesystem on a partition or volume, there are tools available for each possible filesystem:
Filesystem Creation Command
ext2-->mke2fs
ext3-->mke2fs -j
reiserfs-->mkreiserfs
xfs-->mkfs.xfs
jfs-->mkfs.jfs
For instance, to have the boot partition (/dev/hda1 in our example) in ext2 and the root partition (/dev/hda3 in our example) in ext3 (as in our example), you would use:
Code Listing 12: Applying a filesystem on a partition
# mke2fs /dev/hda1
# mke2fs -j /dev/hda3
Now create the filesystems on your newly created partitions (or logical volumes).
Depends on what filesystem you are going to use....for example...rakeyry wrote:The coding for the file systems.
Like the guide sais "Now create the filesystems on your newly created partitions (or logical volumes"
How do I do that?
Code: Select all
#mke2fs /dev/hda1 ----> creates an ext2 fs on the first partition on hda
#mke2fs -j /dev/hda3 ----> creates an ext3 fs on the 3rd partition of hda
#mkreiserfs /dev/hda6 ----> creates a reiser fs on partition 6 of hda


do you only have the one hard drive or more than one? What is the output of #fdisk -l /dev/hda. Ideally, if you only have one (hda - ide, sda - sata) you would have it set up as the master. Is the ide cable shared with another drive such as a cdrom or something that is set to master? If so, you may want to swap the jumper settings around making the drive you want to install gentoo on "master" and whatever else is sharing that cable set it as "slave". On the otherhand if you don't really care about that, and you have only one hard disk, you can setup your partitions on hdb...you can #cfdisk /dev/hdb...cfdisk will give you a ncurses view of your partitioning scheme. Write the partition table, and create your filesystem as described in the handbook...replacing where it says hda with hdb. IMO your much better off, changing the jumpers and making the drive your master...creates a lot less problems further down the road. No warranty expressed or implied, mileage may vary.rakeyry wrote:Idealy I only want Gentoo on my system, nothing else. Help


