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

Hide last authors
Tobias Wintrich 12.1 1 (% class="box warningmessage" %)
2 (((
Tobias Wintrich 17.1 3 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.
Tobias Wintrich 12.1 4 )))
5
Tobias Wintrich 17.1 6 It is possible to enlarge the system partition afterwards; to do so, proceed as follows:
Patrick Theil 3.2 7
Tobias Wintrich 17.1 8 1. **Set up an admin account for the terminal**
9 To do this, navigate to {{status title="kommbox"/}}→ {{status title="System/Users"/}}→ {{status title="Root-Terminal-Password"/}}, and activate the admin account."
10 \\[[image:01_partition_extend.png]]
11 1. **Start the terminal**
12 Go to **{{status title="Kommbox"/}}**→ {{status title="Tools"/}}→ {{status title="Start Terminal"/}}, or use the keyboard shortcut  {{status title="CTRL"/}} + {{status title="alt"/}} + {{status title="shift"/}} +{{status title="t"/}}. Log in with the newly created admin account.
Patrick Theil 3.2 13 \\[[image:image-20221220114334-2.png||data-xwiki-image-style-border="true" height="315" width="450"]]
Tobias Wintrich 17.1 14 1. **Display existing partitions**(((
15 (% id="cke_bm_11121S" style="display:none" %) (%%)Use the following command to display all partitions on the storage device /dev/sda:
Patrick Theil 3.2 16
17 {{code}}
18 sudo fdisk -l /dev/sda
19 {{/code}}
20
Tobias Wintrich 17.1 21 (% id="cke_bm_11760S" style="display:none" %) (%%) Then, make a note of the start sector of /dev/sda2.
22 [[image:02_partition_extend.png]]
Patrick Theil 3.2 23 )))
24 1. (((
Tobias Wintrich 17.1 25 **Start Fdisk**
26 Start Fdisk for the storage device /dev/sda using the following command:
Patrick Theil 3.3 27
28 {{code}}
29 sudo fdisk /dev/sda
30 {{/code}}
Patrick Theil 3.2 31 )))
Tobias Wintrich 17.1 32 1. **Delete old partition and create a new one**
33 Enter the following commands and confirm each with Enter:(((
Patrick Theil 4.2 34 (% style="width:530px" %)
Tobias Wintrich 17.1 35 |(% style="width:35px" %)d|(% style="width:493px" %)Delete partition
36 |(% style="width:35px" %)2|(% style="width:493px" %)Select the 2nd partition
37 |(% style="width:29px" %)n|(% style="width:1953px" %)Create a new partition
38 |(% style="width:29px" %)p|(% style="width:1953px" %)Primary partition
39 |(% style="width:29px" %)2|(% style="width:1953px" %)Partition number: 2
40 |(% style="width:29px" %)......|(% style="width:1953px" %)Start sector: the one noted in step 4
41 |(% style="width:29px" %)Enter|(% style="width:1953px" %)Set the last sector of the partition to the maximum value
42 |(% style="width:35px" %)n|(% style="width:493px" %)No, do not remove the signature
43 |(% style="width:35px" %)w|(% style="width:493px" %)Save the changes to the partition
Patrick Theil 4.2 44
Tobias Wintrich 17.1 45 [[image:03_partition_extend.png]]
Patrick Theil 4.2 46 )))
Tobias Wintrich 17.1 47 1. **Adjust the file system to the new partition size**
48 Use the following command to resize the file system to match the new partition size: (((
Patrick Theil 7.4 49 {{code}}
50 sudo resize2fs /dev/sda2
51 {{/code}}
Patrick Theil 3.2 52 )))
Tobias Wintrich 17.1 53 1. **Restart Client**