Experiment No: 07
HARDDISK PARTITION USING PARTED
AimAim :To partitioning harddisk using parted
Procedure:Procedure:
1.To create partitions in a particular hard disk, start parted
command and select hard disk
#sudo parted /dev/sdd
•
•
•
•
mklabel ms dos
mkpart
primary partition
lsblk for check the status.
2. The next step to create file system. mkfs command is
used for this purpose
Use mkfs.ext4 /dev/sdd1 command to create file system in
sdd1 partition.Using the same command create file
systems in other partitions also
#sudo mkfs. ext4 /dev/sdd1
3.The next step is mouting the partition againt a mount point.
Follow the below steps
4.Create a mount point for each partition using mkdir
command (eg: mkdir /mnt/program)
5.Mount the directories against each partition using mount
command (eg: mount /dev/sdd1 /mnt/program)
6.To automatically mount all the partitions during booting,
modify fstab file and add all the mount points and
corresponding partition. Follow the below steps
#nano /etc/fstab.
Add each partitions into the file using the format
Partition name mount point file system defaults 0 0
(eg: /dev/sdd1 /mnt/pic1 ext4 defaults 0 0 )
Reboot the server and check whether the partitions are
mounted or not using #lsblk. This completes the
partitioning of harddisk using parted utility
ResultResult : Harddisk partition using parted is
successfully completed.