Dedicated server recovery mode

This is really just a note for my future reference, but these details should pretty much apply to most linux servers that have a recovery mode. As is the case with several suppliers the instructions for how to mount the hard disk to fix problems are often left out or buried in the deep recesses of a FAQ somewhere. These instructions work for both the Amenworld server that this site runs on as well as 1&1's dedicated boxes.

First step is to boot the server into it's recovery/repair mode from your control panel.

Once that is done you will be navigating a basic linux install. To access your actual server you need to mount it's harddisk so you can take a look at the filesystem and fix any problems. To locate your hard drive run fdisk -l to output the partition data.

It should look something like this

Disk /dev/hda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   83  Linux
/dev/hda2              14          61      385560   82  Linux swap / Solaris
/dev/hda3              62        9726    77634112+  83  Linux

On my box I need to mount /dev/hda3 hence;

mount /dev/hda3 /mnt

Next chroot /mnt changes the root of the filesystem to /mnt

Once you are done follow your server's instructions to reboot your server normally.

Show Comments