NavigationContentFooter
Jump toSuggest an edit

How to use boot modes on Instances

Reviewed on 26 August 2024Published on 26 May 2021

You can boot your Instances using local boot or a resuce image. This page explains how to use each of these boot modes.

Tip
  • You can choose to use cloud-init when creating an Instance via Advanced settings. This enables you to control the mode of the Instance’s very first boot.
  • Your Instance must be powered off in order to change its boot mode.

Before you start

To complete the actions presented below, you must have:

  • A Scaleway account logged into the console
  • Owner status or IAM permissions allowing you to perform actions in the intended Organization
  • An SSH key
  • An Instance

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. Use the toggle «Toogle Icon» in the top right corner of the screen to power off your Instance.

  4. Click the Advanced settings tab.

  5. In the Boot mode section, select Use local boot.

  6. Click Save.

  7. Use the toggle «Toogle Icon» in the top right corner of the screen to power on your Instance.

    Your Instance starts 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. Use the toggle «Toogle Icon» in the top right corner of the screen to power off your Instance.

  4. Click the Advanced settings tab.

  5. In the Boot mode section, select Use rescue image.

  6. Click Save.

  7. Use the toggle «Toogle Icon» in the top right corner of the screen to power on your Instance.

    Your Instance starts in Rescue mode.

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 can 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 available for all Scaleway Instances OS images.

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 with cloud-init.

  3. Click the Advanced settings tab.

  4. In the Cloud-init section, use the «Toogle Icon» toggle to activate 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 it were not compressed. This is useful as user data is limited to 16384 bytes.
    MIME multipart archiveIt is possible to specify more than one type of data by using a MIME multipart 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.

How to change the boot volume

The boot-on-block feature allows Instances to boot from attached Block Storage volumes instead of local volumes. When creating an Instance, you can select Block Storage as a boot volume.

Once the Instance is created, you can select a different volume to boot from.

  1. Click Instances in the Compute section of the side menu. The Instances page displays.
  2. Click the Instance you wish to change the boot volume for.
  3. Click the Advanced settings tab.
  4. Go to the Boot volume section.
  5. Select a volume in the drop-down.
  6. Click Save and reboot now to reboot instantly. Alternatively, click Save and reboot later.
    Important

    If you have two or more volumes with identical operating systems, or a volume with no operating system, choosing one of these as your boot volume may cause unpredictable boot behavior.

See also
How to use standby modeHow to protect an Instance
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway