163Chapter 4Learning Basic Administration6.To create a new partition, (Email web hosting)
Sunday, September 30th, 2007163Chapter 4Learning Basic Administration6.To create a new partition, type the following: n7.Choose an extended (e) or primary partition (p). To choose a primary parti- tion, type the following: p8.Type in the partition number. If you are creating the first partition (or for onlyone partition), type the number one: 1Enter the first cylinder number (1 is the default). A range of cylinder numbersis displayed (for example, 1-4865 is the number of cylinders that appears formy 40GB hard drive). 9.To assign the new partition to begin at the first cylinder on the new hard disk, type the number 1.10.Enter the last cylinder number. If you are using the entire hard disk, use thelast cylinder number shown. Otherwise, choose the ending cylinder numberor indicate how many megabytes the partition should have. 11.To create more partitions on the hard disk, repeat steps 6 through 10 for eachpartition. 12.Type wto write changes to the hard disk and exit from the fdiskcommand. At this point, you should be back at the shell. 13.To create a file system on the new disk partition, use the mkfscommand. Bydefault, this command creates an ext2 file system, which is usable by Linux. However, in most cases you will want to use a journaling file system (such asext3 or reiserfs). To create an ext3 file system on the first partition of the sec- ond hard disk, type the following: # mkfs -t ext3 /dev/hdb1If you created multiple partitions, repeat this step for each partition (such as/dev/hdb2, /dev/hdb3, and so on). If you don t use -t ext3, an ext2 file system is created by default. Use other com- mands, or options to this command, to create other file system types. For example, use mkfs.vfatto create a VFAT file system, mkfs.msdosfor DOS, or mkfs. reiserfsfor Reiser file system type. The tune2fscommand, described later inthis section, can be used to change an ext2 file system to an ext3 file system. 14.After the file system is created, you can have the partition permanentlymounted by editing the /etc/fstaband adding the new partition. Here isanexample of a line you might add to that file: /dev/hdb1 /abc ext3 defaults 1 1Tip10_