Table of Contents

Remote Disaster Recovery Support for Clearbox

ClearBOX comes with a number of tools for remote support. This includes tools on the Compact Flash which allow for diagnosis, configuration, and repair of the ClearOS installation on ClearBOX.

Features of the compact flash currently include:

Qualified systems

Beginning with shipments of ClearBOX in August 2010, these utilities are already embedded on the compact flash included on the system. For older systems you can download the image here and use these steps to image the Compact Flash.

wget http://www.clearcenter.com/media/dev/clearbox-image/ClearBOX-with-ClearOS52.image.gz
md5sum ClearBOX-with-ClearOS52.image.gz

dd2522c6f773b438ff868cea3f604a2b  ClearBOX-with-ClearOS52.image.gz
gunzip ClearBOX-with-ClearOS52.image.gz 
dd if=ClearBOX-with-ClearOS52.image of=/dev/hda bs=512

Testing it out

Reboot the box and note the initial menu page for the boot loader. The only options here that are destructive are the installation and re-installation methods. The other are OK to test and run at any time.

Using Parted Magic

Parted Magic will boot into a graphical user interface. You should connect a USB keyboard and mouse to interact with the system.

Start the Network

To start the network, click the icon entitled, “Start Network”. You will be able to select the appropriate network type for your system. When the network comes up it may launch a browser to Google to show that it is working.

Enable Remote SSH

To enable remote SSH, click on the terminal icon down on the bottom bar (looks like a black monitor). Type the following to find your IP address:

ifconfig eth0

Set the root password by running the following:

passwd

It will ask you to type a password. If you type a poor password it will complain that it is too weak but it will do it anyways.

To start the SSH server type the following:

/usr/sbin/sshd

You should now be able to remote SSH into the box as root using the password specified above.

Getting Output from Boot Screen

ClearBOX comes with a serial port that can be used for a modem or for other COM/Serial port related activities. The console cable is beige and has an RJ-45 jack on one end and a DB-9 on the other end and is configured as a NULL modem. The serial port is located:

In case of bad activity like a kernel panic, you can use this method to capture the data from the boot process. This data can then be transferred to USB and be read by parted magic when working remotely. To set this up, run Hyperterminal from your workstation and connect it to the serial port on ClearBOX using the cable provided. Set the data rates for 8-None-1 and disable flow control. When booting ClearBOX, proceed to the second screen (green) and stop the boot using the arrow keys. Highlight the kernel you are booting from and type 'e' to edit the line. Arrow down to the kernel line and type 'e' again. At the end of the line append the following:

console=tty0 console=ttyS0,9600

Now when you boot, your output should display through the serial.

Fixing Partition Three

Partition three is designed to eventually provide the capability to boot your ClearBOX to a mode where gateway functions of your box are running and functional even if you hard drive is toast. This feature in on the current roadmap and will be implemented at some other time. If you received an error message while imaging the compact flash which stated that there was not any space left on the device, then you compact flash has a slightly different geometry from the original. To fix this, boot to your ClearOS system and start a command prompt. Run the following commands:

parted /dev/hda rm 3

Next run the fdisk utility to re-create partition 3.

fdisk /dev/hda

You will get an interactive menu driven utility type the bolded characters at the appropriate time. If you get stuck type q <enter> to quit or CTRL+c.

fdisk utility

The number of cylinders for this disk is set to 15538. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs

 (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n Command action

 e   extended
 p   primary partition (1-4)

p Partition number (1-4): 3 First cylinder (7890-15538, default 7890): <press enter> Using default value 7890 Last cylinder or +size or +sizeM or +sizeK (7890-15538, default 15538): <press enter> Using default value 15538

Command (m for help): w The partition table has been altered!

Calling ioctl() to re-read partition table. Syncing disks.

Completing the process

Finish up by formatting the partition:

mkfs.ext3 /dev/hda3

This will format the partition. After it is done, confirm that your partition 3 exists by running:

fdisk -l /dev/hda

It should look similar to this:

Disk /dev/hda: 8019 MB, 8019099648 bytes
16 heads, 63 sectors/track, 15538 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         252      126976+  83  Linux
/dev/hda2             253        7889     3849048   83  Linux
/dev/hda3            7890       15538     3855096   83  Linux

search?q=clearos%2C%20clearos%20content%2C%20clearbox%2C%20userguide%2C%20features%2C%20kb%2C%20maintainer_dloper&amp;btnI=lucky