To display the list of all partitions :

#  fdisk   -l

For first time partition :

1. #  fdisk  /dev/sda
2. Press ‘n’                                                 { To choose between extended and primary partition}.
3. Press ‘e’                                                 {For extended partition}.
4. Skip the first cylinder
5. +100M                                                  {Enter size}.
6. Press ‘w’                                                {To write partition to disk}.
7. #  partprobe   /dev/sda OR  #  partprobe {To update kernel online}.

For Linux partitions repeat the above process, but eliminate the process number 3 .

Formatting :

For ext2 format :

#  mke2fs  /dev/sda9

For ext3 format :

#  mke2fs  -j  /dev/sda9

To convert ext2 to ext3 format :

#  tune2fs  -f  /dev/sda10

For ext4 format :

# mke2fs -t ext4 /dev/sda9

Mounting :

#  mount [sourcepoint]  [mount point]

Eg. #  mount  /dev/dvd  /media/pd {For mounting dvd}.
#  mount  /dev/cdrom  /media/pd {For mounting cd}.
#  mount  /dev/sdb1  /media/pd {For mounting pen drive}.

Permanent Mounting :

Edit in ‘fstab’ file :

#  vi  /etc/fstab

/dev/sda9        /test       ext3       defaults      0      0

{mount point, filesystem and attributes can be changed as per the needs}

Advertisements