- 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.
How to use boot modes on Instances
You can boot your Instances using local boot or a resuce image. This page explains how to use each of these boot modes.
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.
-
Click Instances in the Compute section of the side menu. The Instances page displays.
-
Click the Instance you wish to start with a local boot.
-
Use the toggle «Toogle Icon» in the top right corner of the screen to power off your Instance.
-
Click the Advanced settings tab.
-
In the Boot mode section, select Use local boot.
-
Click Save.
-
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.
-
Click Instances in the Compute section of the side menu. The Instances page displays.
-
Click the Instance you wish to boot into Rescue Mode.
-
Use the toggle «Toogle Icon» in the top right corner of the screen to power off your Instance.
-
Click the Advanced settings tab.
-
In the Boot mode section, select Use rescue image.
-
Click Save.
-
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.
-
Click Instances in the Compute section of the side menu. The Instances page displays.
-
Click the Instance you wish to use with cloud-init.
-
Click the Advanced settings tab.
-
In the Cloud-init section, use the «Toogle Icon» toggle to activate Use cloud-init.
-
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:
Format Starts with Description Cloud Config File #cloud-config
orContent-Type: text/cloud-config
This file contains cloud-config
dataShell Script #!
orContent-Type: text/x-shellscript
A shell script will be executed at rc.local
like level during first boot.Include File #include
orContent-Type: text/x-include-url
An 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 Content Gzip 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 archive It 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
orContent-Type: text/upstart-job
Cloud Boothook #cloud-boothook
orContent-Type: text/cloud-boothook
Part Handler Starts with #part-handler
orContent-Type: text/part-handler
-
Click Save.
-
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.
- Click Instances in the Compute section of the side menu. The Instances page displays.
- Click the Instance you wish to change the boot volume for.
- Click the Advanced settings tab.
- Go to the Boot volume section.
- Select a volume in the drop-down.
- 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.