Recovery
Recovery
It's easy to use the admin shell to recover from situations such as a forgotten root password, as well as more drastic situations.
Boot from CD
First, log into your admin shell. Shut down your virtual machine:
[myvps] admin> shutdown [myvps] admin> poweroff
Tell the virtual machine to boot from CD.
[myvps] admin> boot cdrom
Normally, the current CD will be whatever you installed the OS from, and this is a good choice for simple tasks, such as resetting the root password. If you want to do something more complicated, such as recovering deleted files, one option is the system rescue CD. You can get a list of available CD images with the following command:
[myvps] admin> cdrom
One of options will begin systemrescuecd
, followed some version numbers, for example systemrescuecd-x86-4.4.1
.
You can select this CD with a command like the following (using the appropriate image name):
[myvps] admin> cdrom systemrescuecd-x86-4.4.1
Now start the virtual machine with the following command.
[myvps] admin> start
Connect a VNC client
You will need to connect a VNC client to communicate with your virtual machine. Use the following command at the admin shell to get the VNC connection details.
[myvps] admin> status
Boot to recovery mode
We will assume you are using the Debian CD. Most Linux distros offer a similar recovery mode, but the details will be different.
-
Select
Advanced options
→Rescue mode
. - Select a language, location, and keyboard from the next 3 menu screens.
- Wait for the CD to find various components and configure the network.
- If you are invited to configure a hostname and domain name, you can accept the defaults.
-
Now you will be asked to choose a root filesystem. Unless you chose an
unusual partitioning scheme when you installed the OS, the highlighted option
/dev/sda1
will usually be correct. -
Finally, choose the highlighted option
Execute a shell in /dev/sda1
.
Perform your recovery steps
At this point, you will be at a root shell prompt, and you can perform any
recovery steps you need. For the case of resetting the root password, all you
need to type is the passwd
command.
Rebooting
When you are finished, exit the recovery shell with the command
exit
. This will return you to the last menu; this time you can
choose the Reboot the system
option. This will reboot from the CD,
so you need to go back to the admin shell, and reconfigure booting from disk.
[myvps] admin> shutdown [myvps] admin> poweroff [myvps] admin> boot disk [myvps] admin> start
More help?
If you need further help, please email support for advice. If you have a complicated recovery situation, or one which you think is beyond your expertise, we may be able to help on a chargeable consultancy basis—please ask.