RangeeOS - Enlarge partitions afterwards

Last modified by Tobias Wintrich on 2025/07/14 10:19

An error during partition resizing can lead to irreversible data loss. It is recommended to create a backup beforehand and to take a snapshot on the hypervisor side after expanding the virtual hard drive.

It is possible to enlarge the system partition afterwards; to do so, proceed as follows:

  1. Set up an admin account for the terminal
    To do this, navigate to kommbox →  System/Users Root-Terminal-Password , and activate the admin account."

    01_partition_extend.png
  2. Start the terminal
    Go to Kommbox Tools Start Terminal , or use the keyboard shortcut   CTRL  +  alt  +  shift  + t . Log in with the newly created admin account.

    image-20221220114334-2.png
  3. Display existing partitions

    Use the following command to display all partitions on the storage device /dev/sda: 

    sudo fdisk -l /dev/sda

     Then, make a note of the start sector of /dev/sda2.
    02_partition_extend.png

  4. Start Fdisk
    Start Fdisk for the storage device /dev/sda using the following command:

    sudo fdisk /dev/sda
  5. Delete old partition and create a new one
    Enter the following commands and confirm each with Enter:
    dDelete partition
    2Select the 2nd partition
    nCreate a new partition
    pPrimary partition
    2Partition number: 2
    ......Start sector: the one noted in step 4
    EnterSet the last sector of the partition to the maximum value
    nNo, do not remove the signature
    wSave the changes to the partition

    03_partition_extend.png

  6. Adjust the file system to the new partition size
    Use the following command to resize the file system to match the new partition size: 
    sudo resize2fs /dev/sda2
  7. Restart Client