How To Install A Debian Based Distro On An EasySpeedy Server

Want to support HowtoForge? Become a subscriber!
 
Submitted by danf.1979 (Contact Author) (Forums) on Wed, 2007-03-14 19:00. :: Debian

How To Install A Debian Based Distro On An EasySpeedy Server

Introduction

This is a copy & paste howto. The easiest way to follow this tutorial is to copy paste the commands directly into your ssh client. Be careful when you're required to provide your own custom data, like IP addresses, hostnames or passwords.

The following tutorial is a detailed description of how to install a Debian based distro (Debian Etch in this example) on an EasySpeedy server. EasySpeedy offers dedicated server hosting with the ability for customers to perform remote recovery and maintenance over ssh. This is exactly what we need to install our debian based distro from scratch, using debootstrap.

I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal and there are no guarantees that this howto will work for you.

 

The Server

I will be using a standard EasySpeedy server:

Processor AMD Athlon 64 3500+
RAM 1 GB DDR2 RAM
Hard drive 250 GB SATA

After you've logged in to your server control panel on the EasySpeedy website, you're presented with an automated system for installing several linux distributions. Although this is very handy, I wanted Debian Etch on my server. Sadly, it hasn't been added yet to the list of available distributions for automated installation. Because of this, I decided to try the Debian Sarge installation and then dist-upgrade to Etch. This should have been fairly easy to do, but the default partition scheme that came with Sarge didn't meet my needs.

 

The Handy Rescue System

To install Debian Etch using deboostrap we're going to use one of the rescue systems that EasySpeedy provides. The one I chose for doing this, is described as follows:

"This is our Forensic Recovery Tool. It boots a minimal Linux distro into RAM, and allows SSH login. Using this recovery tool it is possible to perform most recovery operations, as well as more complex forensic tasks. It includes a complete build environment, and is capable of using slackware packages. It also includes a pre-built version of chkrootkit (from the slackware project)."

As it provided a build environment, I thought this tool was the best one for this task. Select the Forensic Recovery Tool and press the install button. An email will be sent to you after the system is rebooted and ready to use. This process takes no time.

We need to log in to our little rescue friend now. If you don't have an ssh client, you can install it with aptitude or apt-get.

aptitude install openssh-client

Now let's connect to the rescue system:

ssh 82.103.XXX.XXX

 

The Partition Scheme

At this point, we need to plan a partition scheme for our new Etch system. What we're going to do now is to delete the existing partition scheme and create a new one. We're going to do so with fdisk.

First of all, this is the partition scheme I had in mind:

/ => /dev/sda5
/home => /dev/sda6
/usr => /dev/sda7
/tmp => /dev/sda8
/var => /dev/sda9
swap => /dev/sda10

Now lets execute fdisk on /dev/sda:

fdisk /dev/sda

We need to erase the existing partitions. To do this, you must press d and then enter the partition number for the partition you want to delete. You'll have to delete all partitions.

Command (m for help): d
Partition number (1-7): 7

Command (m for help): d
Partition number (1-6): 5

Command (m for help): d
Partition number (1-5): 5

Command (m for help): d
Selected partition 1

Now that you have erased your existing partitions, you need to create your new partition scheme. Press n and then enter e to make a new extended partition. Answer 1 when you're required to enter a partition number. Next, you'll be asked about what should be the first cylinder for the extended partition. Default value is 1. Accept it and press enter. Then, you will be asked for the last cylinder. Accept the default value too, and press enter. This will make a new extended partition starting at cylinder 1 to the last cylinder. When you've done this, you'll have to create logical partitions for sda5 through sda10, though sda10 will be our swap.

For setting up the size of the partitions you can answer with cylinders or with size in MB. For answering with MB size, you use the following syntax: for example, 10000M would be 10GB.

In this tutorial I use the cylinder approach, but you're free to use the M approach also.

Please notice that the first command I enter is p. This should show an empty partition set, as is shown now:

Command (m for help): p

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

No we create the extended partition.

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

To create the logical partitions, press n key, and then l. Accept default first cylinder and then for the last cylinder you can either enter the size like in 10000M, or specify the exact last cylinder number. I will enter cylinder numbers.

Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (1-30401, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-30401, default 30401): 366

Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (367-30401, default 367):
Using default value 367
Last cylinder or +size or +sizeM or +sizeK (367-30401, default 30401): 1583

Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (1584-30401, default 1584):
Using default value 1584
Last cylinder or +size or +sizeM or +sizeK (1584-30401, default 30401): 2192

Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (2193-30401, default 2193):
Using default value 2193
Last cylinder or +size or +sizeM or +sizeK (2193-30401, default 30401): 2497

Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (2498-30401, default 2498):
Using default value 2498
Last cylinder or +size or +sizeM or +sizeK (2498-30401, default 30401): 29915

Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (29916-30401, default 29916):
Using default value 29916
Last cylinder or +size or +sizeM or +sizeK (29916-30401, default 30401): 30401

Now you must change /dev/sda10 to Linux swap / Solaris. To accomplish this press t, and select the partition number (10). Then enter 82. This should make /dev/sda10 a swap.

Command (m for help): t
Partition number (1-10): 10
Hex code (type L to list codes): 82

To save changes to the disk, press w key.

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

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

At this point, we're finished with fdisk.

You can exit fdisk with q:

Command (m for help): q

This is what my partition scheme looked like when I finished:

Device Boot Start End Blocks Id System
/dev/sda1 1 30401 244196001 5 Extended
/dev/sda5 1 366 2939832 83 Linux
/dev/sda6 367 1583 9775521 83 Linux
/dev/sda7 1584 2192 4891761 83 Linux
/dev/sda8 2193 2497 2449881 83 Linux
/dev/sda9 2498 29915 220235053+ 83 Linux
/dev/sda10 29916 30401 3903763+ 82 Linux swap / Solaris


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.