1. Home
  2. Dedicated Servers
  3. Reimaging your Dedicated Server

Reimaging your Dedicated Server

At any time you wish, you may reinstall the operating system on your Dedicated Server. This action is irreversible and will mean that your machine will lose all data stored upon it, and will be back to its “factory settings”.

Again, please make sure that any files are removed, as this is a one-way process.

Simple usage

You need to have started our network boot environment environment from the console, and have a shell prompt in front of you.

You can pick all the default options, with Bytemark’s Symbiosis distribution by simply typing:

bytemark-installer --dist symbiosis

The script will then confirm some installation details.

stoneboat.dh.bytemark.co.uk
---------------------------

Distribution    : symbiosis
Imager          : imager3.bytemark.co.uk
Net IPV4 gateway: 212.110.173.65
Net IPv4        : 212.110.173.90/26
Root password   : xxxxxxxxx
Single disc     : /dev/vda
Continue? (y/N) > 

The server name, IP address and other details should be automatically filled in for you.

If you confirm by typing y the system will have its drives wiped and the new OS installed within about 5 minutes. The process looks like this:

Building filesystems:
  /dev/md0...
  /dev/md1...
Mounting filesystems...
Requesting image...
Imaging system...
Executing post-install script...
Installing boot loader...
Installation of symbiosis complete in 259 seconds.

At this point you can type reboot and the system will start with the new image, and you can log in with the root password it supplied.

Choosing your distribution

In the previous example we installed Bytemark’s Symbiosis distribution, which is based on Debian.

If you wish to specify a different distribution you should make use of the --distparameter. This specifies the distribution you would like to be installed. You can call bytemark-installer --distributions on its own to see the list of distributions available.

Advanced Usage

Here is a brief and non-exhaustive list of the more advanced options in bytemark-installer.

A list of the advanced options can be printed with:

bytemark-installer --help

This will yield a wall of text, so you might want to pipe it into a pager, e.g.:

bytemark-installer --help | less

A lot of these options are really meant only for debugging purposes, so use only at the risk of ending up with a badly set-up system, or if instructed by Bytemark support.

Network configuration

Normally, the installer will take the network boot system’s current IP address as its permanent one for installations. If this is not correct (usually only if you have your own VLAN) you can specify the network parameters precisely:

--ip 212.110.173.90
--gateway 212.110.173.65
--netmask 255.255.255.192
--broadcast 212.110.173.127

Advanced partitioning

Normally the installer will make one small partition for /boot, and use the rest of the disc for the root (/). There are two ways of overriding this. We would recommend using the option:

--lvm=partition

This tells the installer to allocate the normal /boot partition, then only a 15GB root partition, and to use the rest of the disc for LVM. When the system has installed, you can use the normal LVM tools to carve up the rest of the disc dynamically.

On premium dedicated hosts it is also possible to allocate a second logical volume that is then used for LVM. This is only really useful where the total disc capacity is greater than 2TB, beyond the limit for traditional partition tables.

--lvm=logicalvolume

If you want the root partition to be a size other than 15GB (20GB, for example), you can specify that with the option:

--root-size=20GB

Alternatively, you can do the partitioning and filesystem creation completely in advance. Once you have created your partitions, create a directory called /tmp/target and mount your root and boot filesystems onto it. You then need to tell the installer which partitions you are using, and where you would like the boot-loader to be installed, for example:

--mounted
--root-disc=/dev/sda
--boot-dev=/dev/sda1
--root-dev=/dev/sda2

This tells it to skip the disc set-up entirely, and trust you. Obviously if you’ve made any mistakes in partitioning, it may not complete.

Updated on April 5, 2019

Was this article helpful?

Related Articles

Have you tried Kubernetes?
Kubernetes (K8s) is helping enterprises to ship faster & scale their business. Sounds good? Let us build a K8s solution for your needs.
Register your interest