I am currently trying to write a bash script that when executed creates a new partition that is 100mb in size. However, I want to use the free space on /dev/sda1
- the parition on which the system is installed for that. Is that possible, while the system is running, that is?
gparted
,parted
,fdisk
, etc.)/dev/sda1
, you'll need to shrink the partition by 102.4MB (possibly slightly more at 102.5MB or 103MB) which will then be used to create the 100MB partition. If you intended to have multiple new partitions, determine the approx amount and resizesda1
accordingly. The OS partition cannot be unmounted while the system is running in order to be resized... a partition must be unmounted first, preventing data corruption.