Linode provides a default set of server types.
Does that mean you cannot have a custom server type?
No. Luckily, there are options in Linode to use custom iso images. This helps to build a server of your choice.
At Bobcares, we often get requests from Linode customers to set up custom OS as part of our Managed Cloud Services.
Today, we’ll see how our Cloud Experts setup Linode with custom iso and fix typical errors with it.
How we install custom iso in Linode?
The option to setup a custom operating system is literally a boon in cloud servers. But, this process involves a series of steps. Again, these steps depend on the type of Linode server too. That is, steps differ in Xen based Linode than a KVM based Linode.
Let’s now see how our Dedicated Engineers install Linode server with custom distro.
Step1. Find the type of Linode
First and foremost, we need to figure out the type of Linode that we have. For this we need to check the name of the drives in the Linode server.
For example, our Dedicated Engineers view the disk details on a KVM based server using df command and the results look like:
[root@lixxx-241 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda 25G 1.9G 22G 8% /
Here, KVM Linodes use the “sd” naming convention whereas Xen Linodes use “xvd”. The drives in Xen will look as “/dev/xvda“.
Step2. Enable custom iso
The next step is to enable the custom distribution of operating system in the Linode server. We’ll now see how we do this in KVM and Xen Linodes.
KVM Linode
Linode now uses the Kernel-based Virtual Machine (KVM) technology. So, almost all newly setup Linode servers will fall into the KVM category.
Here, to build a system based on custom ISO, our Dedicated Engineers will make use of the custom distro on a raw disk. This involves adding the installer iso file to the installer disk of the Linode in Rescue mode. For this to work, we need to set the boot option for the Linode server as “direct disk”. Afterwards, with a reboot, the custom distro will boot up from the installer disk and we complete the installation.
However, here we need to update the settings in the boot loader file at /etc/default/grub to enable the Lish serial connection.
Xen Linode
Similarly, for Linodes using older Xen hypervisor, there is a different set of steps.
Here, we make use of the virtual machine set up using a software called ‘VirtualBox‘. We boot the virtual machine with Finnix and then take the image of local vm drive that holds custom operating system iso. The next step is to copy it to the Linode server via Lish console.
Our Dedicated Engineers edit the /media/xvda/etc/fstab file and the set the entries as
proc /proc proc defaults 0 0
/dev/xvda / ext4 noatime,errors=remount-ro 0 1
/dev/xvdb none swap sw 0 0
Now its time to boot the Linode normally and log in via SSH. And, Linode now runs the custom OS.
[Trouble getting custom OS work in Linode? Our Cloud Experts can help you.]
Common errors with custom iso install and their fixes
Till now, we saw the steps involved in the installation of custom iso images in Linode. Now, we’ll check the common errors that can happen with this process.
1. Resource errors with downloading custom iso
Often while downloading the custom ISO, the process can stop in-between and report the error:
“Cannot write to download (no space left on device)”
The happens due to memory issues on the Linode server. To fix, our Dedicated Engineers use the curl method to download the installer file.
Fox example, to get the Debian installer file, we use the command :
curl http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/mini.iso | dd of=/dev/sda
2. Problems with Network Helper
Similarly, we see problems with Network Helper that automatically setup a static networking configuration into the Linode at boot.
A typical error in Linodes with custom iso is
"Network Helper did not run: could not reliably determine distribution or distribution version"
Here, our Support Engineers manually fix the networking configuration after checking the IP information on the Network tab in Linode manager.
Conclusion
In short, it is possible to install custom iso in Linode servers. Today, we discussed the actual steps to do the custom iso install in Linode and how our Support Engineers fix the common errors in the process.
0 Comments