---
title: Troubleshooting issues with faulty kernel installations
description: Learn how to troubleshoot and resolve issues caused by faulty kernel installations with our comprehensive guide.
tags: kernel faulty-kernel reboot bugfix
dates:
  validation: 2025-07-15
  posted: 2022-11-23
---
import Requirements from '@macros/iam/requirements.mdx'


[Rescue mode](/instances/concepts/#rescue-mode) allows you to boot your Instance into a temporary operating system, running from the Instance's RAM. Rescue mode is often used to diagnose and resolve issues such as faulty kernel configurations, networking issues, firewall configurations, and more.

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- An [Instance](/instances/how-to/create-an-instance/)
- Installed and configured the Scaleway [CLI](/instances/api-cli/creating-managing-instances-with-cliv2) on your local computer


1. Switch the Instance's `boot-type` to `rescue` and reboot your Instance into rescue mode using the CLI-Tools:
    ```bash
    scw instance server update {Instance_ID} boot-type=rescue
    scw instance server reboot {Instance_ID}
    ```
    <Message type="note">
        Replace `{Instance_ID}` with the unique ID of your Instance, e.g. `0500ebd2-d70d-49af-a969-3ac09b6f7fff`.
    </Message>
2. Once the Instance is rebooted, log into your Instance using [SSH](/instances/how-to/connect-to-instance/) and set up the environment to be able to chroot into it:
    ```bash
    cat /proc/partitions
    major minor #blocks name

    8 0 9765625 sda
    8 1 9634536 sda1
    8 14 3072 sda14
    8 15 126976 sda15
    ```
    Then mount the partitions:
    ```
    mount /dev/sda1 /mnt
    mount /dev/sda15 /mnt/boot/efi
    mount -o bind /sys /mnt/sys
    mount -o bind /proc /mnt/proc
    mount -o bind /dev /mnt/dev
    ```
3. Once mounted, use the `chroot` command to get into your Instances' root file system. You can then change the `GRUB_DEFAULT` value to boot using the previous kernel:
    ```bash
    chroot /mnt
    nano /etc/default/grub
    ```
    <Message type="tip">
        In the example above, we use `nano` as text editor. Feel free to use your favorite text editor to edit the file.
    </Message>
    Change the value of `GRUB_DEFAULT` to `"1 > 2"`:
    ```bash
    # head /etc/default/grub
    # If you change this file, run 'update-grub' afterward to update
    # /boot/grub/grub.cfg.
    # For full documentation of the options in this file, see:
    #   info -f grub -n 'Simple configuration'

    GRUB_DEFAULT="1>2"
    GRUB_TIMEOUT=5
    GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_CMDLINE_LINUX_DEFAULT=""
    GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200 earlyprintk=ttyS0,115200 consoleblank=0"
    ```
    Save the file and exit the text editor.
4. Update the `grub` boatloader` to apply the kernel's update:
    ```
    # update-grub
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-6.0.0-0.deb11.2-cloud-amd64
    Found initrd image: /boot/initrd.img-6.0.0-0.deb11.2-cloud-amd64
    Found linux image: /boot/vmlinuz-5.19.0-0.deb11.2-cloud-amd64
    Found initrd image: /boot/initrd.img-5.19.0-0.deb11.2-cloud-amd64
    Found linux image: /boot/vmlinuz-5.10.0-19-cloud-amd64
    Found initrd image: /boot/initrd.img-5.10.0-19-cloud-amd64
    done
    ```
5. Switch back the Instance's `boot_type` to `local` and reboot the Instance:
    ```bash
    scw instance server update {Instance_ID} boot-type=local
    scw instance server reboot {Instance_ID}
    ```
    Your Instance reboots on the previously installed kernel.

 ### Examples of failed boots

* In the following example, the Instance may only boot with the root file system in `read-only` mode:
    ```bash
    [  OK  ] Finished Remove Stale Onli…ext4 Metadata Check Snapshots.
    [    4.219158] cloud-init[542]: Traceback (most recent call last):
    [    4.220328] cloud-init[542]:   File "/usr/bin/cloud-init", line 33, in <module>
    [    4.221518] cloud-init[542]:     sys.exit(load_entry_point('cloud-init==20.4.1', 'console_scripts', 'cloud-init')())
    [    4.223064] cloud-init[542]:   File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 891, in main
    [    4.224435] cloud-init[542]:     retval = util.log_time(
    [    4.225251] cloud-init[542]:   File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2348, in log_time
    [    4.226838] cloud-init[542]:     ret = func(*args, **kwargs)
    [    4.227743] cloud-init[542]:   File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 600, in status_wrapper
    [    4.229478] cloud-init[542]:     util.ensure_dirs((data_d, link_d,))
    [    4.230501] cloud-init[542]:   File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1534, in ensure_dirs
    [    4.232014] cloud-init[542]:     ensure_dir(d, mode)
    [    4.232540] cloud-init[542]:   File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1591, in ensure_dir
    [    4.233980] cloud-init[542]:     chmod(path, mode)
    [    4.234756] cloud-init[542]:   File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1830, in chmod
    [    4.235672] cloud-init[542]:     os.chmod(path, real_mode)
    [    4.236227] cloud-init[542]: OSError: [Errno 30] Read-only file system: '/var/lib/cloud/data'
    [FAILED] Failed to start Apply the …ngs specified in cloud-config.
    ```