T
T
Talyan2018-04-03 22:27:47
Debian
Talyan, 2018-04-03 22:27:47

How to expand the root partition?

Please tell me how to be. I installed Debian netinst in VirtualBox to compile OpenWRT with the necessary packages for my router.
Since debian with LXDE weighs nothing at all, and git itself with packages for router firmware and its compilation weighs a little - I set the disk size to 10 gigs, 2 gigs to swap and the rest - to the root directory /.
After compilation, errors appeared that there was no disk space. Damn pip. To make a firmware of 3 megabytes 10 gigs, he does not have enough, you know.
I increased the virtualbox vdi disk to 40 gigs using the command line, installed GParted, but there is such a picture:5ac3d512d08d3465800027.png
It would be possible, of course, to create a section of the home folder where compilation takes place - separately in this empty space, but I want a whole disk, because all sorts of shmaket packages are also placed in var / and somewhere else, but I don’t know all these folders, I'm used to C:/Program files and there's a whole bunch of them. What to increase, where - ????
Therefore, it is necessary to increase the root and that's all - there are no problems.
I removed the swap, and now there are two empty partitions that do not merge into one solid one, and accordingly I cannot expand the root partition to 38 gigs and give the swap 2 gigs at the end of the partition.
What should be done? I do not understand. Or what? Do you need to download some liveseed and do it before loading the OS?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Syomov, 2018-04-03
@kotomyava

/ dev / sda2 (extended) must be deleted, then at the end create a partition for the swap (you can primary) and format and expand / dev / sda1 to it.
Also, don't forget to check /etc/fstab, and possibly change the device where the swap is.

T
Talyan, 2018-04-03
@flapflapjack

In the screenshot, sda2 has already been removed. It remains unallocated and does not stick to another partition. At what 2 gigs - logical and a large section - primary and you can not change it. Other items are simply stupidly not active in choosing the type of partition. ((Now, for the time being, I temporarily expanded the home folder separately, but I feel like I’ll compile again for 2 hours and again some errors will come because of /var or something like that.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question