Muffinresearch Labs by Stuart Colville

Dedicated server recovery mode | Comments (0)

Posted in Linux/Unix on 1st January 2007, 11:27 pm by Stuart

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.

Post Tools

Comments: Add yours







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



GNU screen: open tab in current working directory|(1)

A nice trick for having screen open a new tab in the same directory as the one you’re currently in. To use it add it to your .screenrc

# Open new window in current dir.
bind c stuff "screen -X chdir \$PWD;screen^M"
bind ^c stuff "screen -X chdir \$PWD;screen^M"

Hat tip: mteckert on SuperUser.com

Ubuntu: add-apt-repository: command not found|(2)

When you’re using a minimal Ubuntu install if you find the ‘add-apt-repository’ command is missing (it’s useful for adding PPAs and other repositories), then simply run:

sudo apt-get install python-software-properties

Photos on Flickr

© Copyright 2004-12 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.492s.