Shrink partition & add new partition without removing HDD

I have installed dietpi on my NUC/mini pc. For installing dietpi I had removed HDD & put into usb encloser & flash the image on HDD. Everything work perfectly. Thanks for Dietpi administrators for making this perfect operating system.

After I reviewing the storage consumption in HDD (it is about 4GB this time). I think I overkill my 400GB HDD. Now I am thinking to make a two partition.One 50 GB for operating system & 350 GB for data storage. I do not want to remove HDD from NUC (as physically removing means more possibility of hardware failure) . Is there any way we can shrink the main partition & then allocated unalotted memory to new data partition . both partitions in linux EXT4 format.
Please guide me how this thing possible without removing HDD from NUC.

Hi,

many thanks for your request. Maybe you can have a look to the following guide. It will explain how to use GParted incl small video :sunglasses:

https://averagelinuxuser.com/shrink-linux-partition-without-losing-data/

But the etcher delete all partitions & use complete hdd for its installation. i try this many time but etcher ruined all partitions.

is i can install only dietpi-software on my ubantu server.

i am familiar with ubantu installation. please guide me towards if i will install ubantu. and after that i will install dietpi-software. with this way i can utilize my familiarity toward ubantu & dietpi-software.

thanks

Hi,

probably there is a misunderstanding. Did you checked the link I provided? It describe how to create a bootable live usb stick that can be used to run GParted tool from that usb stick.

Next to that, DietPi needs a Debian base image. It’s not able to run on an Ubuntu based system.

Thanks for guidance. i will do experimentation with both methodology & will utilize best in usage. thanks

using GParted is pretty straightforward. Just create a bootable usb stick and do your changes on a graphical interface.