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.).
-
Boot the server into rescue mode. Refer to How to use rescue mode for detailed instructions.
-
Log in via SSH. Use the temporary credentials shown on the server’s status page in the Scaleway console.
ssh root@<DEDIBOX_IP> -
Identify your disk and partitions:
lsblk -f # shows size, type, and filesystem labelExample 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
-
Check the filesystem integrity (recommended).
ext4
fsck -f /dev/sda2XFS
xfs_repair /dev/sda2Btrfs
btrfs check --repair /dev/sda2 -
Create a mount point:
mkdir -p /mnt/root -
Mount the root filesystem. Replace
/dev/sda2with your actual root partition:mount /dev/sda2 /mnt/rootVerify the mount:
ls /mnt/root `` If you have a separate `/boot` (often `sda1`): ```bash mount /dev/sda1 /mnt/root/bootFor UEFI systems with an EFI System Partition (ESP):
mount /dev/sda1 /mnt/root/boot/efi -
(Optional) Mount additional partitions. Common examples:
mount /dev/sda3 /mnt/root/home mount /dev/sda4 /mnt/root/var -
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- Unmount and clean up once you are done. Exit chroot first (if used):
exitThen unmount everything recursively:
umount -R /mnt/rootRemove the temporary directory:
rmdir /mnt/rootTroubleshooting
Mount fails with “wrong fs type”
Run the following command to identify the filesystem type of the partition:
blkid /dev/sdaXThen specify the filesystem type explicitly:
mount -t ext4 /dev/sdaX /mnt/rootEncrypted 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/rootLVM 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
lvdisplayMount the logical volume:
mount /dev/<VG_NAME>/<LV_NAME> /mnt/rootRAID volume not detected
Run the following command to scan for RAID devices:
mdadm --assemble --scan
cat /proc/mdstatMount the assembled device:
mount /dev/md0 /mnt/root