Skip to navigationSkip to main contentSkip to footerScaleway DocsAsk our AI
Ask our AI

Manually mounting the filesystem of your Dedibox in rescue mode

This guide explains how to manually mount your server’s filesystem when running in rescue mode. This procedure is commonly used to diagnose and repair issues on the root disk (e.g., filesystem corruption, kernel upgrade failure, lost credentials, etc.).

Important

Filesystem repair tools such as fsck or xfs_repair can cause data loss if used incorrectly. Always create a backup when possible.

  1. Boot the server into rescue mode. Refer to How to use rescue mode for detailed instructions.

  2. Log in via SSH. Use the temporary credentials shown on the server’s status page in the Scaleway console.

    ssh root@<DEDIBOX_IP>
  3. Identify your disk and partitions:

    lsblk -f   # shows size, type, and filesystem label

    Example output (your layout will differ):

    NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
    sda            8:0    0   447G  0 disk
    ├─sda1         8:1    0   512M  0 part /boot
    │   vfat     FAT32
    └─sda2         8:2    0 446.5G  0 part /
        ext4     1.0
Tip

Use blkid or fdisk -l if you need UUIDs or more details. Disk names may vary with names like /dev/nvme0n1, /dev/vda, etc. Replace /dev/sdaX in later steps with the correct device.

  1. Check the filesystem integrity (recommended).

    Important

    Always run repair tools on unmounted filesystems.

    ext4

    fsck -f /dev/sda2

    XFS

    xfs_repair /dev/sda2

    Btrfs

    btrfs check --repair /dev/sda2
  2. Create a mount point:

    mkdir -p /mnt/root
  3. Mount the root filesystem. Replace /dev/sda2 with your actual root partition:

    mount /dev/sda2 /mnt/root

    Verify the mount:

    ls /mnt/root
    ``
    If you have a separate `/boot` (often `sda1`):
    ```bash
    mount /dev/sda1 /mnt/root/boot

    For UEFI systems with an EFI System Partition (ESP):

    mount /dev/sda1 /mnt/root/boot/efi
  4. (Optional) Mount additional partitions. Common examples:

    mount /dev/sda3 /mnt/root/home
    mount /dev/sda4 /mnt/root/var
  5. Bind system directories (required for chroot).

    mount -t proc none /mnt/root/proc
    mount -t sysfs none /mnt/root/sys
    mount --bind /dev /mnt/root/dev
    mount --bind /run /mnt/root/run

9 Enter the chroot environment to perform your desired rescue actions:

chroot /mnt/root
  1. Unmount and clean up once you are done. Exit chroot first (if used):
exit

Then unmount everything recursively:

umount -R /mnt/root

Remove the temporary directory:

rmdir /mnt/root

Troubleshooting

Mount fails with “wrong fs type”

Run the following command to identify the filesystem type of the partition:

blkid /dev/sdaX

Then specify the filesystem type explicitly:

mount -t ext4 /dev/sdaX /mnt/root

Encrypted partitions (LUKS)

If your partition is encrypted, you have to open it before mounting it:

cryptsetup luksOpen /dev/sdaX encrypted_root
mount /dev/mapper/encrypted_root /mnt/root

LVM volume not found

If you are using LVM and cannot find your LVM volume, run the following commands to identify the volume:

vgscan
vgchange -ay
lvdisplay

Mount the logical volume:

mount /dev/<VG_NAME>/<LV_NAME> /mnt/root

RAID volume not detected

Run the following command to scan for RAID devices:

mdadm --assemble --scan
cat /proc/mdstat

Mount the assembled device:

mount /dev/md0 /mnt/root
Still need help?

Create a support ticket
No Results