Expanding the Kali Root Partition

37,701

Solution 1

If you need the text mode to resize partitions you can try parted: https://www.centos.org/docs/5/html/5.2/Deployment_Guide/s2-disk-storage-parted-resize-part.html

Solution 2

Have you tried using cfdisk? It's a command line based partition editor, and it's worked for me whenever I needed to do anything involving creating/resizing partitions.

Share:
37,701

Related videos on Youtube

amartin94
Author by

amartin94

Updated on September 18, 2022

Comments

  • amartin94
    amartin94 over 1 year

    I have a live distribution of Kali running on a usb with persistence. However, after installing updates and a few new software packages, the root drive is pretty much out of space.

    How do I go about resizing this? I've tried booting GParted on a separate live USB and extending the drive, however GParted puts a little yellow triangle to the left of the /dev/sdb1 partition and essentially locks it.

    I have also tried resizing the disk during runtime using resize2fs but to no avail. I have been at this for hours now and I'm at breaking point so if anyone could help me out i'd very much appreciate it.

    Below is a copy of my fdisk -l output:

    Disk /dev/sdb: 7.3 GiB, 7864320000 bytes, 15360000 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x0a9a1b1a
    
    Device     Boot   Start      End Sectors  Size Id Type
    /dev/sdb1  *         64  6324223 6324160    3G 17 Hidden HPFS/NTFS
    /dev/sdb2       6324224  6485375  161152 78.7M  1 FAT12
    /dev/sdb3       6486016 15359999 8873984  4.2G 83 Linux
    
    Disk /dev/loop0: 2.8 GiB, 2969686016 bytes, 5800168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
  • amartin94
    amartin94 almost 8 years
    How would one use this?
  • amartin94
    amartin94 almost 8 years
    Is there any graphical tool? and would a CentOS tool work on Kali? Or will i have to download and boot a CentOS distro?
  • Mars
    Mars almost 8 years
    Go to bash, and type 'cfdisk' with superuser privileges (i.e. with 'sudo' or after an 'su' or 'sudo su'). You should see a menu pop up where you can select/alter/resize partition tables. If you've not heard of this command until now, then I feel obligated to point out that reading the man page would be helpful.