OS Customization (Linux)
Note
The instructions on this page only apply to Linux installations.
Partitioning
The OS will be installed on the first disk. NVME drives will be preferred, if a server has multiple disk types.
Default Linux Disk Partitions
By default, regular Linux installations will have the following partitioning details:
Partitions:
/boot
, 4096MB/
, using the remaining space on the diskswap
is enabled and has a size of 8192MB
Custom Partitioning
During new server requests, it is possible to provide your own partitioning scheme.
In the partitions
field of the OS object, you can customize your Linux partitions by specifying a list of them. Each partition object should have the following fields:
Field | Type | Description | Example Value |
---|---|---|---|
target |
string | The mount point for the partition | /boot |
filesystem |
string | The filesystem to use for the target. Currently supported types: ext2 , ext3 , ext4 , xfs |
ext4 |
size |
int | The size of the partition in MB, or -1 for the remaining disk space | 4096 |
Example
{
"name": "MyFlexServer",
"location": "EU: Rotterdam",
"instanceType": "bm7.std.8",
"os": {
"slug": "ubuntu-2404-lts",
"partitions": [
{
"target": "/boot",
"filesystem": "ext4",
"size": 4096
},
{
"target": "/",
"filesystem": "ext4",
"size": -1
},
{
"target": "/custom",
"filesystem": "ext4",
"size": 10240
},
{
"target": "swap",
"size": 8192
}
]
},
"sshKey": [
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIWrzxdeW3hhkejzSfFBFzPzcEBJBGtggOUJpLBCakbqmV/NztCaUoh631Xnk46MFn2snF89tSZZzlp9ySpqW7c= ecdsa-key-example"
],
"postInstallScript": "#!/bin/bash\necho \"Hello flex world\" > /tmp/test.txt",
"tags": [
"My-tag1",
"env:dev"
]
}
Summary
- The
/
and/boot
partitions are required and must be defined. - The
size
field is in MB. - The
size
field can be-1
to use the remaining disk space. - To disable the swap file, omit the
swap
partition from the list of partitions. - Accepted filesystems:
ext2
,ext3
,ext4
,xfs
. - Partitioning does not apply to Talos installations, because Talos does not support customizing partitions.
The Linux bootloader
Default bootloader options
During the OS installation process, we apply a specific customization to enable legacy network interface naming. This ensures that network interfaces follow the traditional ethX naming convention for OS install compatibility reasons.
The following kernel parameters are set:
- net.ifnames=0: Disables predictable network interface names.
- biosdevname=0: Disables naming based on BIOS device names.
No additional options are configured by default.
Customizing the bootloader
Warning
Incorrect kernel arguments can prevent the server from booting. Please ensure that you provide valid kernel arguments.
You can provide additional kernel arguments to the bootloader by specifying them in the kernelParams
field of the OS object when you request a new server. These values will be added to the GRUB configuration file and applied as follows:
- Add the kernel parameters to the
GRUB_CMDLINE_LINUX
variable in/etc/default/grub
- Update the GRUB configuration with
update-grub
(Debian based systems) orgrub2-mkconfig -o /boot/grub/grub.cfg
(RH / Centos based systems)- This generates the
grub.cfg
file and generates the/boot/grub/grubenv
file
- This generates the
Example
In the kernelParams
field of the OS object, you can provide a list of custom kernel or GRUB parameters. For example:
{
"name": "MyFlexServer",
"location": "EU: Rotterdam",
"instanceType": "bm7.std.8",
"os": {
"slug": "ubuntu-2404-lts",
"kernelParams": [
{
"key": "mitigations",
"value": "auto,nosmt"
},
{
"key": "nopti",
"value": ""
}
],
},
"sshKey": [
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIWrzxdeW3hhkejzSfFBFzPzcEBJBGtggOUJpLBCakbqmV/NztCaUoh631Xnk46MFn2snF89tSZZzlp9ySpqW7c= ecdsa-key-example"
],
"postInstallScript": "#!/bin/bash\necho \"Hello flex world\" > /tmp/test.txt",
"tags": [
"My-tag1",
"env:dev"
]
}
This example disables hyperthreading (on the OS level) and disables Page Table Isolation (PTI) in the kernel. The options added to the GRUB configuration are: mitigations=auto,nosmt nopti
.
Note
Talos Linux requires special kernel arguments to boot. Please refer to the Talos installation documentation for more details.