{"id":866,"date":"2022-11-04T18:46:56","date_gmt":"2022-11-04T18:46:56","guid":{"rendered":"https:\/\/server-help.org\/?p=866"},"modified":"2023-03-23T16:34:43","modified_gmt":"2023-03-23T16:34:43","slug":"installing-custom-isos-on-ionos-dedicated-servers","status":"publish","type":"post","link":"https:\/\/server-help.org\/index.php\/2022\/11\/04\/installing-custom-isos-on-ionos-dedicated-servers\/","title":{"rendered":"Installing custom ISOs on IONOS Dedicated Servers"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Note: This process is not officially supported by IONOS. For more information, please refer to their <a rel=\"noreferrer noopener\" href=\"https:\/\/www.ionos.com\/help\/server-cloud-infrastructure\/scope-of-support\/general-information-about-the-11-ionos-scope-of-support-for-server-products\/\" target=\"_blank\">scope-of-support<\/a>. This documentation was written for Dedicated Servers managed via the Cloud Panel; this process may differ for servers purchased before 2018-10-28, &#8216;Value Server Deals&#8217;, and &#8216;Value Dedicated Servers&#8217;.<\/h4>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>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 <em>installed<\/em> 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.<\/p>\n\n\n\n<p>Additional configuration (i.e. network) may be needed afterwards. The <a href=\"https:\/\/www.ionos.com\/help\/server-cloud-infrastructure\/first-steps-dedicated-servers\/accessing-a-server-via-the-vnc-console-dedicated-server\/\" target=\"_blank\" rel=\"noreferrer noopener\">VNC console<\/a> in the Cloud Panel may be used to perform this.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps<\/h2>\n\n\n\n<ol><li>Boot the server into <strong>Linux 64-bit Rescue-System (debian\/stable)<\/strong> rescue mode, and SSH into it. Although the VNC console can be used, you will not be able to copy and paste.<\/li><li>You will need to make some space by uninstalling software, then install the QEMU emulator. Installing the <code>ca-certificates<\/code> package is also recommended, so you may download your ISO over HTTPS later. You may paste the following command into your terminal:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code><code>apt-get -y purge chkrootkit duplicity memtester smartmontools tcpdump bonnie++ samba-common samba-libs reiserfsprogs linux-libc-dev &amp;&amp; apt-get -y autoremove &amp;&amp; apt-get update ; apt-get -y install ca-certificates qemu-system-x86 &amp;&amp; apt-get -y clean<\/code><\/code><\/pre>\n\n\n\n<ol start=\"3\"><li>The ISO will need to be stored in RAM. We will create a temporary filesystem in memory for this purpose:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>mount -t tmpfs -o size=4G tmpfs \/mnt<\/code><\/pre>\n\n\n\n<p>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 <code>free -h<\/code><\/p>\n\n\n\n<ol start=\"4\"><li>We are now ready to download the ISO. First, enter the new tmpfs:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/mnt\/<\/code><\/pre>\n\n\n\n<p>Then, download your ISO. Replace the URL with the URL to your ISO, and keep the single quotes around it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget '<strong>INSERT_URL_HERE<\/strong>'<\/code><\/pre>\n\n\n\n<ol start=\"5\"><li>Run the ISO in a virtual machine, and begin the installation. This guide assumes 2 drives; <strong>you may need to adjust the drives, depending on your server\u2019s hardware<\/strong>. <strong>This is particularly true for NVMe servers, which may not follow the \/dev\/sd* naming convention.<\/strong> 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 <code>\/dev\/sda<\/code> and omit the other drives.<br><br>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 &#8216;m&#8217; parameter at the end of the command.<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>qemu-system-x86_64 -boot d -display curses -cdrom <strong>YOUR_OS.iso<\/strong> -drive file=\/dev\/sda,format=raw -drive file=\/dev\/sdb,format=raw -m 2G<\/code><\/pre>\n\n\n\n<p>If your operating system requires graphical output, and cannot use the serial console, you can follow these steps instead, to use VNC:<br><br>            5a. SSH into your server with &#8220;ssh -L localhost:5900:localhost:5900 root@[YOUR SERVER IP]&#8221;<\/p>\n\n\n\n<p>            5b. Navigate back to \/mnt\/ with &#8220;cd \/mnt&#8221;<\/p>\n\n\n\n<p>            5c.  Run &#8220;qemu-system-x86_64 -boot d -vnc :0 -cdrom <strong>YOUR_OS.iso<\/strong> -drive file=\/dev\/sda,format=raw  -drive file=\/dev\/sdb,format=raw -m 2G&#8221;<\/p>\n\n\n\n<p>            5d. Connect to 127.0.0.1 using a VNC client.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<ol start=\"6\"><li>Install your operating system. When done, <strong>turn the virtual machine off<\/strong>. This can be performed from your installation media, or from QEMU by pressing <kbd>ALT+2<\/kbd> and running <code>system_powerdown<\/code> in the QEMU console. If your operating system does not support ACPI or is not responding, you can quit QEMU by running <code>q<\/code> instead.<br><br>Optionally, you can test that your system is bootable by running QEMU again, without the &#8216;-cdrom&#8217; option.<br><\/li><li>After QEMU is fully stopped, end the SSH session and <strong>reboot the system into \u2018local\u2019 mode via your Cloud Panel<\/strong>. Your server should boot into your new operating system.<\/li><\/ol>\n\n\n\n<p>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 <a rel=\"noreferrer noopener\" href=\"https:\/\/www.ionos.com\/help\/server-cloud-infrastructure\/first-steps-dedicated-servers\/accessing-a-server-via-the-vnc-console-dedicated-server\/\" target=\"_blank\">VNC console<\/a> to configure your network interfaces and services.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/866"}],"collection":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/comments?post=866"}],"version-history":[{"count":15,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/866\/revisions"}],"predecessor-version":[{"id":915,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/866\/revisions\/915"}],"wp:attachment":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/media?parent=866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/categories?post=866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/tags?post=866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}