Jump toUpdate content

How to use boot modes

Reviewed on 26 May 2021Published on 26 May 2021

A number of different boot modes are available for your Instances. You can use a local boot, a rescue image or a bootscript. This page explanins how to use these different boot modes.

Tip:

This document explains how to reboot an existing Instance using different boot modes. Alternatively, you can choose to use local boot, a bootscript or cloud-init when creating an Instance via Advanced Settings. This enables you to control the mode of the Instance’s very first boot.

Requirements:

How to use local boot

Local boot allows you to start your Instance with a local configuration and a specific kernel version. This is the default option. You only need to follow these instructions to revert to local boot after using a different boot mode.

  1. Click Instances in the Compute section of the side menu. The Instances page displays.

  2. Click the Instance you wish to start with a local boot.

  3. Click the Advanced Settings tab.

  4. In the Boot Mode section, select Use local boot.

  5. Click Save.

  6. Click Reboot in the top right corner of the page, and confirm the reboot of your Instance when prompted.

Your Instance is rebooted using local boot.

How to use rescue mode

Rescue mode restarts your Instance via the network on a minimal operating system. You can use rescue mode to debug your Instance and recover your system data.

  1. Click Instances in the Compute section of the side menu. The Instances page displays.

  2. Click the Instance you wish to boot into Rescue Mode.

  3. Click the Advanced Settings tab.

  4. In the Boot Mode section, select Use rescue image.

  5. Click Save.

  6. Click Reboot in the top right corner of the page, and confirm the reboot of your Instance when prompted.

Your Instance is rebooted into Rescue Mode.

How to use a bootscript

A bootscript allows you to choose a pre-built configuration script to boot your Instance.

  1. Click Instances in the Compute section of the side menu. The Instances page displays.

  2. Click the Instance you wish to use a bootscript with.

  3. Click the Advanced Settings tab.

  4. In the Boot Mode section, select Use bootscript.

  5. Select a bootscript from the drop-down menu.

  6. Click Save.

  7. Click Reboot in the top right corner of the page, and confirm the reboot of your Instance when prompted.

How to use cloud-init

Cloud-init enables automatic configuration of an Instance as it boots into the cloud, turning it from a generic Ubuntu image into a configured server in a few seconds.

The cloud-init program that is available on recent distributions (Ubuntu, Fedora, Debian) is able to consume and execute data from the user-data field of the Scaleway Console. The process then behaves differently depending on the format of the information it finds. One of the most popular formats for scripts within user-data is the cloud-config file format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server.

Cloud-init is enabled for the following image versions:

OSVersions
UbuntuXenial / Bionic
DebianStretch
Fedora32
Centos8
Rocky Linux8

Follow the instructions below to reboot an existing Instance using cloud-init.

  1. Click Instances in the Compute section of the side menu. The Instances page displays.

  2. Click the Instance you wish to use a bootscript with.

  3. Click the Advanced Settings tab.

  4. In the Cloud-init section, use the «Toogle Icon» toggle to to select Use cloud init

  5. Enter your user-data. User data is the mechanism by which a user can pass information contained in a local file to an Instance at launch time. The typical use case is to pass something like a shell script or a configuration file as user data.

    Cloud-init supports different input formats for user-data:

    FormatStarts withDescription
    Cloud Config File#cloud-config or Content-Type: text/cloud-configThis file contains cloud-config data
    Shell Script#! or Content-Type: text/x-shellscriptA shell script will be executed at rc.local like level during first boot.
    Include File#include or Content-Type: text/x-include-urlAn include file contains a list of one or different urls, one per line. Each of the URLs will be read, and their content will be passed through this same set of rules. The content read from the URL can either be gzipped, mime-multi-part, or plain text.
    Gzip Compressed ContentGzip compressed content will be uncompressed and then be used as if were not compressed. This is useful as user-data is limited to 16384 bytes.
    Mime Multi Part archiveIt is possible to specify more than one type of data by using a Mime multi part file. This can be used to specify both, a shell script and a cloud-config task.
    Upstart Job#upstart-job or Content-Type: text/upstart-job
    Cloud Boothook#cloud-boothook or Content-Type: text/cloud-boothook
    Part HandlerStarts with #part-handler or Content-Type: text/part-handler
  6. Click Save.

  7. Click Reboot in the top right corner of the page, and confirm the reboot of your Instance when prompted.

Your Instance is rebooted using Cloud-init.

See Also