0

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?

3
  • It is possible, and you have a wide range of software to choose from (gparted, parted, fdisk, etc.)
    – JW0914
    Commented Sep 30, 2019 at 12:57
  • @JW0914 I wonder how. All solutions I have seen so far are not possible while the system is running. I am trying to do this with fdisk, do you mind giving some guidance?
    – Kyu96
    Commented Sep 30, 2019 at 13:14
  • I misread your question the first time around... if the OS is installed to /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 resize sda1 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.
    – JW0914
    Commented Sep 30, 2019 at 13:21

0

You must log in to answer this question.

Browse other questions tagged .