1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Reboot a VPS Cloud / VPS Lite (safe mode included)
This guide explains how to reboot a VPS Cloud / VPS Lite and what you can do if you no longer have access to the server.
Reboot of VPS Cloud / VPS Lite
The classic mode allows you to normally reboot your server. To access the VPS Cloud / VPS Lite:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on the Manage button.
- Click on Restart (classic mode):
Enable/disable safe mode
If you have lost your SSH key, or made a configuration error, etc.
You have the option to reboot in rescue mode. This involves rebooting from a base image from which you can mount the partitions of your cloud. This way, you will be able to modify/repair your configuration.
Warning: depending on the installed operating system, the system volume may be named /dev/sda
, /dev/sda1
or /dev/vda
; the same applies to the data volume /dev/sdb
, /dev/sdb2
or /dev/vdb
! It is therefore appropriate to replace these indications with those corresponding to your situation.
To activate the rescue mode:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on the Manage button.
- Click on Reboot (safe mode):
Perform operations
Once safe mode is active, access your Cloud via SSH, either with your ssh key or with the temporary password available in the interface.
Once connected, do:
sudo -i
then list the available partitions (replace ov-abcd by your hostname):
[root@ov-abcd ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 253:0 0 8G 0 disk
└─vda1 253:1 0 8G 0 part /
vdb 253:16 0 20G 0 disk
└─vdb1 253:17 0 20G 0 part
vdb
corresponds to your cloud disk.
To access it in write mode, you must mount it:
[root@ov-abcd ~]# mount /dev/vdb1 /mnt/
You can then edit the files:
[root@ov-abcd ~]# ls /mnt/
bin boot dev etc home initrd.img initrd.img.old lib lib64 lost+found media mnt opt proc root run sbin srv sys tmp usr var vmlinuz vmlinuz.old
Depending on your cloud's operating system, you can also perform a chroot
to replicate your usual environment:
[root@ov-abcd ~]# chroot /mnt/
bash: ls: command not found
root@ov-abcd:/# export PATH="$PATH:/usr/sbin:/sbin:/bin"
root@ov-abcd:/# ls
bin boot dev etc home initrd.img initrd.img.old lib lib64 lost+found media mnt opt proc root run sbin srv sys tmp usr var vmlinuz vmlinuz.old
Once the necessary modifications have been made, disable safe mode to restart your cloud on the original disk.