Partition creation
Partition creation
Partition creation
• Large storage devices are divided into separate sections are called
partitions
• Partitioning allows the use of different file systems to be installed for
different kinds of files.
• There are three types of partitions with which you will be
dealing; Primary, Extended, and Logical partitions.
• fdisk and parted are a command-line disk partitioning tool that is
part of the util-linux utility package. It enables users to create,
manage, and delete disk partitions via a dialog-driven interface.
Key Reasons to Partition a Disk
• Organization
• Performance Optimization
• Multi-OS Booting
• Data Security and System Stability
• Flexibility in File System Choices
Process to Partition a Disk in
Linux
Step 1: List Disks and Partitions
• Identify the disk you want to partition . In this example we’ll be
working with /dev/sda.
• This command lists all the disks and their partitions:
• Syntax: sudo fdisk -1
• The example output below shows two disks, /dev/sda and /dev/sdb.
The first storage disk, /dev/sda, has been formatted already and
contains the operating system. The second disk, /dev/sdb, contains
unallocated space only.
Step 2: Select Storage Disk
To select the storage disk for partitioning, run the following command,
replacing [disk-name] with the actual storage disk name.
• Syntax
• sudo fdisk [disk-name]
• The fdisk utility displays a welcome message and opens a shell
prompt.
#3 Create a New Partition
• Sudo fdisk -1
• The new /dev/sdb1 partition is now visible in the partition list.