Installing custom ISOs on IONOS Dedicated Servers

Note: This process is not officially supported by IONOS. For more information, please refer to their scope-of-support. This documentation was written for Dedicated Servers managed via the Cloud Panel; this process may differ for servers purchased before 2018-10-28, ‘Value Server Deals’, and ‘Value Dedicated Servers’.

Introduction

Installing a custom ISO onto a dedicated server involves booting the server into rescue mode (similar to a live CD), then using an emulator to boot the ISO and install the new operating system. The emulator will be given access to the actual disks in the server, so even though it is not running on bare-metal, it will be installed to bare-metal. Even more complex setups, such as software RAID or full-disk encryption, are possible with this method. After installation, the dedicated server can be rebooted into the new operating system.

Additional configuration (i.e. network) may be needed afterwards. The VNC console in the Cloud Panel may be used to perform this.

Steps

  1. Boot the server into Linux 64-bit Rescue-System (debian/stable) rescue mode, and SSH into it. Although the VNC console can be used, you will not be able to copy and paste.
  2. You will need to make some space by uninstalling software, then install the QEMU emulator. Installing the ca-certificates package is also recommended, so you may download your ISO over HTTPS later. You may paste the following command into your terminal:
apt-get -y purge chkrootkit duplicity memtester smartmontools tcpdump bonnie++ samba-common samba-libs reiserfsprogs linux-libc-dev && apt-get -y autoremove && apt-get update ; apt-get -y install ca-certificates qemu-system-x86 && apt-get -y clean
  1. The ISO will need to be stored in RAM. We will create a temporary filesystem in memory for this purpose:
mount -t tmpfs -o size=4G tmpfs /mnt

You may change the size parameter if needed. Keep in mind that increasing the size will cause it to occupy more memory. You can check your memory usage with free -h

  1. We are now ready to download the ISO. First, enter the new tmpfs:
cd /mnt/

Then, download your ISO. Replace the URL with the URL to your ISO, and keep the single quotes around it:

wget 'INSERT_URL_HERE'
  1. Run the ISO in a virtual machine, and begin the installation. This guide assumes 2 drives; you may need to adjust the drives, depending on your server’s hardware. This is particularly true for NVMe servers, which may not follow the /dev/sd* naming convention. If you do not need other drives during installation (no software RAID, or you wish to set up other drives later), you can specify only /dev/sda and omit the other drives.

    2 GB of memory will be assigned to the virtual machine, which will accommodate most operating systems. If you need to adjust this, you can change the ‘m’ parameter at the end of the command.
qemu-system-x86_64 -boot d -display curses -cdrom YOUR_OS.iso -drive file=/dev/sda,format=raw -drive file=/dev/sdb,format=raw -m 2G

If your operating system requires graphical output, and cannot use the serial console, you can follow these steps instead, to use VNC:

5a. SSH into your server with “ssh -L localhost:5900:localhost:5900 root@[YOUR SERVER IP]”

5b. Navigate back to /mnt/ with “cd /mnt”

5c. Run “qemu-system-x86_64 -boot d -vnc :0 -cdrom YOUR_OS.iso -drive file=/dev/sda,format=raw -drive file=/dev/sdb,format=raw -m 2G”

5d. Connect to 127.0.0.1 using a VNC client.

  1. Install your operating system. When done, turn the virtual machine off. This can be performed from your installation media, or from QEMU by pressing ALT+2 and running system_powerdown in the QEMU console. If your operating system does not support ACPI or is not responding, you can quit QEMU by running q instead.

    Optionally, you can test that your system is bootable by running QEMU again, without the ‘-cdrom’ option.
  2. After QEMU is fully stopped, end the SSH session and reboot the system into ‘local’ mode via your Cloud Panel. Your server should boot into your new operating system.

If your operating system already has the necessary drivers for the NIC(s) and uses DHCP by default, it may connect to the Internet without any further configuration. If it does not, use the VNC console to configure your network interfaces and services.

Mohammed has written 29 articles

3 thoughts on “Installing custom ISOs on IONOS Dedicated Servers

  1. Andy says:

    Hi Jo, this is a great tutorial but I ran into a problem: what would you do to use this to install Ubuntu on an Ionos dedicated server? Problem: Ubuntu uses a (graphical) live installer and so you only get a “x times y Graphic mode” screen when starting qemu….

  2. Chris says:

    Hello Andy,
    When you get the “640 x 480 Graphic mode” message, press ESCAPE. Then you get a “boot:” prompt -> type “install vga=normal fb=false” and press ENTER.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>