You are in Home page

Soluzione integrata di telefonia su internet a banda larga.
Search on this site:  

Are you interested to be updated about all things happens to me day by day?
Visit my new blog

3. Preparing the destination computer

3.1. How to run netcat on destination computer?

To let the destination computer to be visible on the network, to run netcat and to mount the destination hard disk, an operating system is required to be running on this computer.

Where lives this OS if its hard disk is empty. We could install another hard disk, to use the first one for installing a Linux distribution with netcat support and to use the other one clone the original box. We could prepare a linux bootable floppy that create a root ram disk that can enable networking and with a static linked version of netcat tools. But the best and fast way i found is to use a CD bootable Linux distribution like knoppix which have all we need (and also over) for our scopes. In the next of the document we referer to Knoppix Live CD version 3.2.

So, let's download this CD Live distribution and let's copy it to a writable CD-ROM. Be sure that the computer bios boot sequence begins with CD-ROM drive, insert Knoppix in the CD drive and power on this computer.

After boot sequence we have a running Linux box that only use the CD drive. We have now an environment where bigins our path to backup the source box by partitioning the destination disk.

3.2. Partitionate the destionation disk.

First of all we need to partitionate the destination disk. Since original filesystem it's located in a single partition plus a swap partition we must create two partition on this new disk.

Open a shell console terminal, using su - become root and start fdisk.


knoppix@0[knoppix]$ su -
root@0[root]# fdisk /dev/hda
Type p on the fdisk command line to see disk information and to be sure that it's empty.

Command (m for help): p

Disk /dev/hda: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
and, as you can see, destination hard disk is not partitionating and is 4.3 Gbyte.

Let's go to create a new swap partition with side double as the available RAM memory. In our scenario RAM size is 256 Mbyte so we creare a swap partition of 512 Mbyte:


Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-522, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-522, default 522): +512M

Command (m for help): p

Disk /dev/hda: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1        63    506016   83  Linux
This partition is now a standard linux partition (Id=83). Let's modify Id type to 82 to change it to a Linux swap partition.

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 82
Changed system type of partition 1 to 82 (Linux swap)

Command (m for help): p

Disk /dev/hda: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1        63    506016   82  Linux swap
Let's create the Linux system partition

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (64-522, default 64): 
Using default value 64
Last cylinder or +size or +sizeM or +sizeK (64-522, default 522): 
Using default value 522

Command (m for help): p

Disk /dev/hda: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1        63    506016   82  Linux swap
/dev/hda2            64       522   3686917+  83  Linux
set the bootable flag to /dev/hda2

Command (m for help): a
Partition number (1-4): 2

Command (m for help): p

Disk /dev/hda: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1        63    506016   82  Linux swap
/dev/hda2   *        64       522   3686917+  83  Linux
and commit changes to partition table:

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

Calling ioctl() to re-read partition table.
Syncing disks.
The destination disk is now properly partitionated. We proceed to format it.

JavaScript Menu Courtesy of Milonic.com



 Copyright© 1997-2006 Emiliano Bruni Online from 16/08/1998 with visitors Write me to: