Skip to main content
Install the OS manually from your image
Last update:

Install the OS manually from your image

You can manually install an OS from your own image on a dedicated server. If you do not have special requirements for the OS, we recommend using standard images — from them you can install the OS by auto-installation or manually.

  1. Boot the server in Rescue mode.
  2. Install the OS from your image.
  3. Optional: configure the network interface.
  4. Change the upload template.

1. Boot the server in Rescue mode

  1. In the Control Panel, on the top menu, click Products and select Dedicated Servers.

  2. In the Servers section, open the Server page → Operating System tab.

  3. Click Change Upload Template.

  4. In the Boot Template field, select Boot to Rescue.

  5. Click Save and reboot. The server will be rebooted.

2. Install the OS

The script qemu-iso is used to install the OS from its image. The script uploads the iso-image to the server, starts the VNC server and initiates the OS installation process.

The OS image can be uploaded to the server:

  • via the URL of the image, which is hosted on a publicly available resource. The qemu-iso script will load the OS image into the server RAM;
  • or manually from the local computer to the disk or RAM of the server.
  1. Install a VNC client on the local computer. For a list of VNC clients for different operating systems, see the Connect by VNC subsection of the Connect to Server instructions.

  2. Open the CLI. On a local Windows computer, use PowerShell.

  3. Connect to the server via SSH by forwarding the standard port for VNC — 5900:

    ssh -L 5900:localhost:5900 root@<ip_address>

    Specify <ip_address> — public IP address of the server. You can copy it in the control panel: in the top menu click ProductsDedicated ServersServers → Server → Server page → Operating System tab → in the IP field click .

  4. Copy the URL of the OS image you are going to install.The image must be hosted on a publicly available resource, and the image size must be smaller than the server's RAM by at least 2 GB.

    To load the image faster, we recommend that you place the image in Selectel Object Storage — see the Load Object instructions for details.

  5. Run the qemu-iso script.The script will upload the installation files to the server, start the VNC server, and initiate the OS installation process:

    qemu-iso <url>

    Specify:

    • <url> — path to the OS image you copied in step 4;
    • Optional: -nic_type <virtual_network_adapter> — the type of network device to emulate in the virtual machine.For example, for a VMware ESXi installation, change the virtual network adapter to vmxnet3. For a  complete list of supported virtual network adapters, see the qemu-system-x86_64 -device help command.
  6. Wait for a message that the OS image has been uploaded to the server and the VNC server is running:

    VM has been created!
  7. Open the VNC client on the local computer.

  8. Connect to the server. The connection process depends on the selected VNC client. Parameters to connect:

    • The IP address is localhost:5900;
    • password — leave the field blank.
  9. Go through all the steps of installing the OS.

  10. In the Rescue console, press Ctrl + C to complete the qemu-iso process.

  11. Optional: without leaving Rescue mode, configure the network interface.We recommend that you configure the network interface immediately after installing the OS, otherwise the server may not be accessible over the network.

3. Configure the network interface

After manually installing the OS, the network configuration file may contain the interface name that was used in the virtual environment, such as eth0.After a reboot on the physical server, the network interface may have a different name, such as enp1s0.Because of this mismatch, the server may not be accessible over the network until the network interface name is corrected to the correct one. We recommend that you correct the name immediately after installing the OS without exiting Rescue mode.

You can also configure the network interface and synchronize the time with an external NTP server later.Additional OS settings depend on the configuration of the image you are installing.

  1. In the Rescue console, look up the name of the network interface by bringing up the network interface information:

    ip a

    In the response, find the interface in the UP state that has a public IP address.Memorize or copy the name of the network interface in the altname field. For example:

      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
    valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:0c:00:0f:0:f0 brd ff:ff:ff:ff:ff:ff
    altname enp1s0
    inet 203.0.113.0/24 brd 203.0.113.255 scope global eth0
    valid_lft forever preferred_lft forever
    inet6 fe00::000c:00ff:fe0f:00f0/64 scope link proto kernel_ll
    valid_lft forever preferred_lft forever

    Here enp1s0 is the name of the desired network interface.

  2. Connect to the OS installed on the server by running the qemu-iso script without specifying an image:

    qemu-iso
  3. Change the values of the interface parameters:

    3.1 Open the configuration file of the netplan utility with the vi text editor:

    vi /etc/netplan/00-installer-config.yaml

    3.2 Change the values of the parameters.The correct values can be viewed in the control panel: in the top menu click ProductsDedicated Servers → Server page → Network tab → click on the desired subnet.The type of configuration file depends on the Ubuntu version:

    network:
    ethernets:
    <eth_name>:
    addresses:
    - <ip_address>/<mask>
    renderer: networkd
    version: 2

    Specify:

    • <eth_name> — name of the network interface of the public network, value from the field altname that you looked at in step 1;
    • <ip_address> — The public IP address of the server. Can be copied from the control panel: in the top menu, click ProductsDedicated ServersServers → Server page → tab Operating System → in the field IP click ;
    • <mask> — subnet mask.
  4. Press ESC.

  5. Exit the vi text editor with your changes saved:

    :wq
  6. Apply the configuration:

    netplan apply
  7. Synchronize the time with an external NTP server.

4. Change the upload template

Return the server boot template to the previous one When you reboot the server from the OS, the boot template will automatically change to the one that was set before the server was booted in Rescue mode. the server booted in Rescue mode.