Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions compute/instances/how-to/use-boot-modes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,26 +68,29 @@ 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](https://console.scaleway.com/instance/servers) 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 <Icon name="toggle" /> toggle to activate **Use cloud-init**.
4. In the **Cloud-init** section, use the toggle icon 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:

|Format|Starts with|Description|
| ---- | ------------- | --------- |
|**Cloud Config File**|`#cloud-config` or `Content-Type: text/cloud-config`| This file contains `cloud-config` data|
| **Shell Script**|`#!` or `Content-Type: text/x-shellscript`|A shell script will be executed at `rc.local` like level during first boot.|
|**Include File**|`#include` or `Content-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` or `Content-Type: text/upstart-job`||
|**Cloud Boothook**|`#cloud-boothook` or `Content-Type: text/cloud-boothook`||
|**Part Handler**|Starts with `#part-handler` or `Content-Type: text/part-handler`||
| Format | Starts with | Description |
|------------------------|------------------|----------------------------------------------------------------------------------------------|
| **Cloud Config File** | `#cloud-config` | This file contains `cloud-config` data. |
| **Shell Script** | `#!` | A shell script executed at `rc.local` like level during first boot. |
| **Include File** | `#include` | Contains a list of one or more URLs. Content from these URLs is processed similarly. |
| **Gzip Compressed Content** | N/A | Gzip compressed content is decompressed and used as if uncompressed. Useful for data limits.|
| **MIME multipart archive** | N/A | Specifies multiple data types in one file (e.g., shell script + cloud-config). |
| **Upstart Job** | `#upstart-job` | Specifies an Upstart job to be executed. |
| **Cloud Boothook** | `#cloud-boothook` | Contains scripts run very early in the boot process. |
| **Part Handler** | `#part-handler` | Provides custom handling for specific data parts. |

<Message type="note">
Only the content type `text/plain` is currently supported.
</Message>
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](/compute/instances/concepts/#boot-on-block) feature allows Instances to boot from attached [Block Storage](/compute/instances/concepts/#block-volumes) volumes instead of local volumes. When [creating an Instance](/compute/instances/how-to/create-an-instance/), you can select Block Storage as a boot volume.
Expand Down
Loading