Increase the disk size in Kali Linux

0xLeeBai

--

Step 1: follow the steps below to increase your disk size, i am currently using 200 GB, but I want to increase it to 300 GB.

Step 2: check the disk size -> it is still 200 GB

fdisk -l

Step 3: run fdisk utility

fdisk /dev/sda

Step 4: Type p to print the current partition table and identify the partition you need to resize (e.g., /dev/sda1).

Step 5: Type d and hit Enter to delete the partition (/dev/sda1).

Step 6: Type n and hit Enter to create a new partition:

  • For the Partition Type: Choose primary.
  • For the Partition Number: Type 1 and press Enter.
  • For the First Sector: It is crucial to use the same starting sector as before (from our fdisk -l screenshot, it’s 2048), so type 2048 and press Enter
  • For the Last Sector, simply press Enter to accept the default
  • Do you want to remove the signature?
    The message indicates that the new partition overlaps with the existing filesystem (ext4 signature) from the previous configuration. Since you are re-creating the partition to expand it, do not remove the ext4 signature, as this could corrupt your existing data. So type N (No) and press Enter.

Step 7: Write the changes by typing w and pressing Enter.

Step 8: Once done, run the following command to resize the filesystem

resize2fs /dev/sda1

Step 9: check the disk size -> it is now 300 GB

fdisk -l

--

--

No responses yet