cant resize partition

koklimena

New Member
Joined
Dec 12, 2023
Messages
11
Reaction score
0
Credits
81
so i am new to kali linux and im taking a course on cybersecurity so im kinda new on linux and everything , the problem im having is that the apps and everything i install from the apt-get command is installed to a partition that for some reason has limited storage , 10gb to be exact , now my problem is that i cant resize that partition because it doesnt allow for more than 10gb , i have another partition that is 480gb but i cant seem to find a way , lets say to give some of those 480gb to the other partition (10gb one)
 

Attachments

  • Screenshot from 2023-12-12 10-12-12.png
    Screenshot from 2023-12-12 10-12-12.png
    150.7 KB · Views: 94
  • Screenshot from 2023-12-12 10-12-22.png
    Screenshot from 2023-12-12 10-12-22.png
    95.9 KB · Views: 82


if anyone can help with the problem i can provide more info.
thanks in advance.
 
It sounds like Kali is installed on partition 5.
Code:
+-------------+--------------+--------------+---------------+
| partition 5 | partition 6  | partition 7  | partition 8   |
|             |              |              |               |
|  10G        |  1G          | 2G           |  462G         |
|             |              |              |               |
+-------------+--------------+--------------+---------------+

In that case it's possible to enlarge partition 5 by adding space to the right of it with a partitioning tool such as Gparted. One way to do this is to boot up a live disk with the Gparted program on it and make the adjusments.

Gparted is available on it's own bootdisk from here: https://gparted.org/livecd.php, where there is also documentation on the website about how to proceed.

The partitions 6, 7 and 8 would have their data lost in a new partitioning, so if you have data you wish to save, then it would need to be backed it up. Gparted on their website itself advises to take a whole image or partition image backup.

If however, there is nothing to back up, you can simply re-partition the disk to more amenable sizes and re-install the distro and start again.

It's possible to use other partitioning tools to do the same job from the command line, but since you mention you are "kinda new on linux", Gparted is probably the easiest way, though it's important to read the documentation so that you know what you are doing.

Suitable sizes for a root partition vary depending on a user's intended uses. For just running an installation that isn't expected to grow much, 30G to 50G may suffice. If on the other hand one might be running a number of virtual machines, then those sizes may need to be doubled or trebled. Horses for courses.
 
It sounds like Kali is installed on partition 5.
Code:
+-------------+--------------+--------------+---------------+
| partition 5 | partition 6  | partition 7  | partition 8   |
|             |              |              |               |
|  10G        |  1G          | 2G           |  462G         |
|             |              |              |               |
+-------------+--------------+--------------+---------------+

In that case it's possible to enlarge partition 5 by adding space to the right of it with a partitioning tool such as Gparted. One way to do this is to boot up a live disk with the Gparted program on it and make the adjusments.

Gparted is available on it's own bootdisk from here: https://gparted.org/livecd.php, where there is also documentation on the website about how to proceed.

The partitions 6, 7 and 8 would have their data lost in a new partitioning, so if you have data you wish to save, then it would need to be backed it up. Gparted on their website itself advises to take a whole image or partition image backup.

If however, there is nothing to back up, you can simply re-partition the disk to more amenable sizes and re-install the distro and start again.

It's possible to use other partitioning tools to do the same job from the command line, but since you mention you are "kinda new on linux", Gparted is probably the easiest way, though it's important to read the documentation so that you know what you are doing.

Suitable sizes for a root partition vary depending on a user's intended uses. For just running an installation that isn't expected to grow much, 30G to 50G may suffice. If on the other hand one might be running a number of virtual machines, then those sizes may need to be doubled or trebled. Horses for courses.
i forgot to mention but kali is installed on partition 1 (25gb) and also i have kali installed on my laptop so im not running it on a virtual machine
the /var file which from what i researched is a file which keeps temporary stuff in it and i find it confusing why the terminal is installing apps there
ok so also what i understood from ur message is that i should boot Gparted from an usb and resolve the issue from there?
 
Installation of programs do not occur into a /var partition, rather, the files of the program are placed in the filesystem in appropriate places. For example, the program cmatrix has files installed in the directories shown:
Code:
[tom@min ~/configs]$ apt-file list cmatrix
cmatrix: /usr/bin/cmatrix          
cmatrix: /usr/share/applications/cmatrix.desktop
cmatrix: /usr/share/consolefonts/matrix.fnt
cmatrix: /usr/share/consolefonts/matrix.psf.gz
cmatrix: /usr/share/doc/cmatrix/README
cmatrix: /usr/share/doc/cmatrix/README.md
cmatrix: /usr/share/doc/cmatrix/changelog.Debian.gz
cmatrix: /usr/share/doc/cmatrix/changelog.gz
cmatrix: /usr/share/doc/cmatrix/copyright
cmatrix: /usr/share/icons/hicolor/128x128/apps/cmatrix.png
cmatrix: /usr/share/man/man1/cmatrix.1.gz

It may be the case that the apt installer stores the package in its .deb form in the directory /var/cache/apt/archives after it has been installed, but that can be deleted with the command: apt clean, and has no effect on the functioning of the installation of the package. Whether or not this storage happens under /var can be configured and I can't say what the default setting is on your system.

In general there is no need to have a separate partition for /var, if by chance that's what you have configured. The simplest functional installations are for a single partition for root, which includes a home directory among all the other necessary directories (including a /var of course). If that single partition is large enough, then problems with space will be taken care of by the filesystem and the user needn't bother with it. Some users like to have a separate home partition, which means there's a second partition for data, so that if they re-install the operating system on the root partition, it can be done without altering the home partition whose data can remain intact. The swap partition is separate again.

If you need to alter the partition sizes, then, yes, I think Gparted is the way to go in the first instance in this case. But as implied in post #3, it's easiest to enlarge a partition by increasing it's size to the right side. Doing anything else can be more complicated, and more risky, other than a wholly new set of partitions which is the easiest thing to do.
 
Last edited:
i
Installation of programs do not occur into a /var partition, rather, the files of the program are placed in the filesystem in appropriate places. For example, the program cmatrix has files installed in the directories shown:
Code:
[tom@min ~/configs]$ apt-file list cmatrix
cmatrix: /usr/bin/cmatrix         
cmatrix: /usr/share/applications/cmatrix.desktop
cmatrix: /usr/share/consolefonts/matrix.fnt
cmatrix: /usr/share/consolefonts/matrix.psf.gz
cmatrix: /usr/share/doc/cmatrix/README
cmatrix: /usr/share/doc/cmatrix/README.md
cmatrix: /usr/share/doc/cmatrix/changelog.Debian.gz
cmatrix: /usr/share/doc/cmatrix/changelog.gz
cmatrix: /usr/share/doc/cmatrix/copyright
cmatrix: /usr/share/icons/hicolor/128x128/apps/cmatrix.png
cmatrix: /usr/share/man/man1/cmatrix.1.gz

It may be the case that the apt installer stores the package in its .deb form in the directory /var/cache/apt/archives after it has been installed, but that can be deleted with the command: apt clean, and has no effect on the functioning of the installation of the package. Whether or not this storage happens under /var can be configured and I can't say what the default setting is on your system.

In general there is no need to have a separate partition for /var, if by chance that's what you have configured. The simplest functional installations are for a single partition for root, which includes a home directory among all the other necessary directories (including a /var of course). If that single partition is large enough, then problems with space will be taken care of by the filesystem and the user needn't bother with it. Some users like to have a separate home partition, which means there's a second partition for data, so that if they re-install the operating system on the root partition, it can be done without altering the home partition whose data can remain intact. The swap partition is separate again.

If you need to alter the partition sizes, then, yes, I think Gparted is the way to go in the first instance in this case. But as implied in post #3, it's easiest to enlarge a partition by increasing it's size to the right side. Doing anything else can be more complicated, and more risky, other than a wholly new set of partitions which is the easiest thing to do.
i think ill have to alter it with gparted , since the maximum i can resize it to is only 10gb
 

Members online


Top