Step 1
Check the partition label with fdisk command
fdisk -l
Step 2
Now we need to use that in parted command to create partition
parted /dev/sda
Now set the partition table format as gpt with below command
mklabel gpt
Now assign primary partition and assign capacity of the disk with below command
mkpart primary 0GB 4000.8GB
Step 3
Now check the partition that we have created in fdisk
fdisk -l
Now format it with below command
mkfs.ext4 /dev/sda1
Now we can mount that partition with below command
mount /dev/sda1 /USB_DISK
and also add the same in /etc/fstab
/dev/sda1 /USB_DISK ext4 defaults 0 0
Now check the mounted partition with df command
df -h
Check the partition label with fdisk command
fdisk -l
Step 2
Now we need to use that in parted command to create partition
parted /dev/sda
Now set the partition table format as gpt with below command
mklabel gpt
Now assign primary partition and assign capacity of the disk with below command
mkpart primary 0GB 4000.8GB
Step 3
Now check the partition that we have created in fdisk
fdisk -l
Now format it with below command
mkfs.ext4 /dev/sda1
Now we can mount that partition with below command
mount /dev/sda1 /USB_DISK
and also add the same in /etc/fstab
/dev/sda1 /USB_DISK ext4 defaults 0 0
Now check the mounted partition with df command
df -h
No comments:
Post a Comment