Linux 101 Essay

Submitted By romel0408
Words: 490
Pages: 2

Create Partitions and Filesystems
OBJECTIVE: Candidates should be able to configure disk partitions and then create filesystems on media such as hard disks. This includes the handling of swap partitions.

1

Create Partitions and Filesystems
KEY KNOWLEDGE AREAS: Use various commands to set up partitions and create various filesystems, including ext2, ext3, reiserfs, vfat, and xfs.

2

Create Partitions and Filesystems
KEY FILES,TERMS, UTILITIES fdisk mkfs mkswap

3

fdisk
Typical output of fdisk -l
Device Boot /dev/hda1 * /dev/hda2 /dev/hda3 /dev/hda5 /dev/hda6 /dev/hda7 /dev/hda8 /dev/hda9 /dev/hda10 /dev/hda11 Start 1 785 789 789 1236 1619 1721 1785 1836 1875 End 748 788 2432 1235 1618 1720 1784 1835 1874 1883 Blocks 6297448+ 32130 13205430 3590496 3076416 819283+ 514048+ 409626 313236 72261 Id System b Win95 FAT32 83 Linux 5 Extended 83 Linux 83 Linux 83 Linux 83 Linux 83 Linux 83 Linux 82 Linux swap

On this system the main feature to notice is that there are 3 primary partitions. The third partition is extended (/dev/hda3) and holds 8 logical partitions. The primary partition /dev/hda3 is not used. In fact /dev/hda3 acts as a 'container' and a filesystem exists only on the enclosed logical partitions.
4

mkfs
Used to create a filesystem on a new partition. You may use mkfs or mke2fs. Syntax mkfs [ -V ] [ -t fstype ] [ fs-options ] filesys [ blocks ]

The exit code returned by mkfs is 0 on success and 1 on failure.
OPTIONS -V Produce verbose output, including all file system-specific commands that are executed. Specifying this option more than once inhibits execution of any file system-specific commands. This is really only useful for testing. -t fstype Specifies the type of file system to be built. If not specified, the default file…