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. 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.
qemu-system-x86_64 -boot d -display curses -cdrom YOUR_OS.iso -drive file=/dev/sda,format=raw -drive file=/dev/sdb,format=raw
  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.
  2. After QEMU is fully stopped, 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.

Jo has written 1 article

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>