Re: Making a partition larger without affecting my OS.

William Kenworthy <[email protected]>
Newsgroups gmane.linux.gentoo.user
Organization me@home
Message-ID <[email protected]>
Dale, I highly recommend gparted - its FAR less likely you will make a 
mistake.  Practise on a usb stick first if you need confirmation.  
gparted handles file system creation and in some cases data movement.  
ie, think of it as creating a script that you approve before pressing 
go.  You can queue up commands like move this partiion (including data) 
to the end of the disk , delete that partition, extend another  
partition (moving data if needed) to fill up half the free space.  
Create a new partition and format it as btrfs. Check that it looks good 
(visualisation and any errors highlighted) and press go!

This is one case where the visualisation and protection for shooting 
yourself in the foot can be worth its weight in gold!

BillK


On 15/3/26 02:33, Dale wrote:
> On 3/14/26 12:10 PM, Michael wrote:
>> On Saturday, 14 March 2026 14:06:41 Greenwich Mean Time Dale wrote:
>>> Howdy,
>>>
>>> As some know, on my old and new rig, I compile my updates in a chroot
>>> environment.  Then I copy the binaries over and use the -k option on
>>> my running OS.  That way I don't have a crash when one program is
>>> updated and another it depends on is not yet updated. Anyway, my
>>> chroot is getting squeezed a little.  I need to expand it another
>>> 30GBs or so so that I don't get not enough space errors. It's only
>>> the largest packages right now but the next larger ones are growing
>>> and will start having issues as well.  I have a m.2 stick for my OS.
>>> It's a 1TB stick.  I have plenty of space unused. I did the OS first
>>> and then did a partition for the chroot thingy. The partition named
>>> build-part is the chroot. The parts above it are the OS.  This is the
>>> current layout.
>>>
>>>
>>>
>>> Part. #     Size        Partition Type            Partition Name
>>> ----------------------------------------------------------------
>>>               1007.0 KiB  free space
>>>      1        2.0 GiB     EFI system partition      efi-part
>>>      2        10.0 GiB    Linux filesystem          boot
>>>      3        400.0 GiB   Linux filesystem          root-part
>>>      4        180.0 GiB   Linux filesystem          var-part
>>>      5        150.0 GiB   Linux filesystem          build-part
>>>               189.5 GiB   free space
>>>
>>>
>>>
>>> I think I can just delete the partition for build-part and then add a
>>> new partition that is larger, then do a file system and rsync the
>>> files back over.
>> Yes, you could delete and recreate the last partition in the table, but
>> this sounds like a lot of extra (unnecessary) work.
>>
>>
>>> My question, thing I want to be sure of, if I
>>> delete that and re-add it, that will not affect my OS at all? Right?
>>> I may do a back up first but still, I'd like to be sure this is at
>>> least doable and not risky.
>> Any interaction with partitions can result in loss of data, so a fresh
>> backup at least of the partition table before you start any resizing/
>> deleting/creating partitions is advisable.
>>
>>
>>> I'll be using cgdisk and the usual file
>>> system tools for this.  I'm assuming I'll have to recreate the file
>>> system and such.
>>>
>>> Thanks in advance.
>>>
>>> Dale
>>>
>>> :-)  :-)
>> I suggest you unmount partition 5, then use parted (or if you prefer a
>> GUI try gparted, or the KDE Partition Manager) to resize the end point
>> of it.  If you use parted on the CLI you will additionally need to
>> increase the size of the filesystem within the partition after the
>> partition has been resized.
>
>
> Well, this turned out to be easy enough.  I thought I'd check out 
> gparted.  After all, if I only look, it doesn't do anything, I guess.  
> When I opened it up, it had a triangle next to part 5.  I right 
> clicked and found a option for more info.  It said some of the 
> partition was not formatted.  No idea how that happened since I 
> haven't touched the partitions since I built this rig.  It said for me 
> to run a 'check' on it.  So, I told it too.  Well, I selected for it 
> to do it.  It took me a minute to realize I had to tell it to actually 
> go do it.  Once I hit the 'apply' button, it resized the file system 
> and then it was big enough.  At least I think it grew. This is what it 
> shows now.
>
> FILESYSTEM USED %USED   USED AVAILABLE  TOTAL MOUNTED ON
> /dev/nvme0n1p5 61.5%             83.0G  56.6G         147.1G 
> /mnt/build-sys
>
>
> I kinda edited that a little so it hopefully won't line wrap.  I'm 
> pretty sure that before the available space was only like 20GBs or 
> less.  Anyway, I'll see how 56GBs works.  It'll be next weekend tho.  
> If it's not large enough, I'll make it bigger then.  :-D
>
> I think I used gparted before.  It kinda looked familiar but I could 
> have just read about it and installed it to take a look see. Anyway, 
> it may have did the job.  We'll will see.
>
> Thanks again to all.
>
> Dale
>
> :-)  :-)
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.