Using the self-serve net installer
For most guest operating systems it is possible for customers to launch a self-service network installer from the Xen Shell.
Default image installs vs. network installer
Most BitFolk customers have their VPS initially provisioned by BitFolk support via an image file. This results in a minimal install fully-customised for the BitFolk environment, but with very little flexibility.
Some customers prefer to run through their chosen operating system's familiar network installer in order to carry out a custom install to their specification. This can also be useful to reinstall your VPS without requiring assistance from BitFolk support.
Not all operating systems that BitFolk supports are available as self-service network installs. It requires that the operating system has a Xen-compatible network installer, and that this has been tested by BitFolk.
Prerequisites
In order to initiate a network install you must:
- Have access to your Xen Shell.
- If you don't know the password then you'll need to do a reset or contact BitFolk Support.
- Be running a new enough version of Xen Shell.
- Xen Shell stays running if you disconnect from it, so it's possible that you're still running an old version. You need to be running version v1.48bitfolk8 or later.
- You can see the version of a running Xen Shell instance by using the help command. If yours is too old just exit from every screen until you're disconnected, and then reconnect.
- Have a modern enough VPS configuration.
- You may be warned that your VPS's disk layout is non-standard. In that case you'll need to use the reset command of the disks sub-menu to standardise it.
- Be prepared to nuke your existing VPS and any data stored on it.
- Generally the first thing the network installers do is format your VPS's block device(s), so don't try to do this unless you have backups or don't care about your data. It might be possible depending on the installer to preserve the contents of some block devices, but please don't rely on this.
Initiating a network install
Use the install command. It's as simple as:
xen-shell v1.48bitfolk2 - type 'help' for help.
xen-shell> install debian_lenny
About to overwrite your VPS with the debian_lenny network installer - this will result in a loss of all data, without further confirmation!
Are you sure? Please type "Yes" to confirm, or anything else to abort.
INSTALL?> yes
Booting debian_lenny net installer for: debtest1
Using config file "/etc/xen/debtest1.conf".
Install Mirror: http://ftp.uk.debian.org/debian
Install Suite: lenny
Installer: http://ftp.uk.debian.org/debian/dists/lenny/main/installer-i386/current/images
WARNING: Installer kernel and ramdisk are not authenticated.
Fetching http://ftp.uk.debian.org/debian/dists/lenny/main/installer-i386/current/images/netboot/xen/vmlinuz
Fetching http://ftp.uk.debian.org/debian/dists/lenny/main/installer-i386/current/images/netboot/xen/initrd.gzThe network installer should then boot and you'll follow the usual procedure for installing your chosen operating system.
General issues to be aware of
Partitioning
| You must place your root filesystem on the first partition of the first disk (i.e. xvda1), it must be ext3 filesystem and /boot must be contained within it. If you don't do this then your VPS almost certainly will not boot again after your install is complete. |
Apart from the restriction of having to have your root filesystem as ext3 on xvda1, you can use your distribution's installer to add extra partitions of any filesystem type that your distribution normally supports, and lay out your filesystems as you please.
For later ease of resizing it is recommended that you restrict yourself to one partition per disk. The typical BitFolk VPS has two disks, xvda and xvdb each of which has a single partition spanning the whole disk (xvda1 and xvdb1 respectively). If you require more partitions then you can add them via the disks sub-menu of the Xen Shell prior to install. This will give you extra disks, e.g. xvdc, xvdd and so on. You can split your disk allocation up into as many disk devices as you like.
If you don't do this and instead put multiple partitions on a disk it will still work fine, but if you should ever come to want a disk resized it makes the process more difficult.
Consider using LVM if you plan to have a lot of different filesystems and/or plan to do frequent resizing. As long as you keep the first block device outside of LVM it works fine.
OS-specific notes
Debian
So far supported:
- lenny (5.x)
- squeeze (6.x)
- wheezy (testing) from v1.48bitfolk13
The installation process is pretty much identical to a normal Debian net install, with the following quirks.
Disk partitioning
The first partman dialog you'll be shown looks like this:
┌────────────────────────┤ [!!] Partition disks ├─────────────────┐ │ │ │ The installer can guide you through partitioning a disk (using │ │ different standard schemes) or, if you prefer, you can do it │ │ manually. With guided partitioning you will still have a chance later │ │ to review and customise the results. │ │ │ │ If you choose guided partitioning for an entire disk, you will next │ │ be asked which disk should be used. │ │ │ │ Partitioning method: │ │ │ │ Guided - use entire disk │ │ Guided - use entire disk and set up LVM │ │ Guided - use entire disk and set up encrypted LVM │ │ Manual │ │ │ │ <Go Back> │ │ │ └─────────────────────────────────────────────────────────────┘
You're advised to select Manual so that you can ensure that your root filesystem goes on xvda1 and your swap goes on xvdb1 as per the notes above.
"relatime" is a good idea as a mount option, and using a filesystem label is also smart.
Once you've selected Finish partitioning and write changes to disk the installation will proceed as normal. If you don't select any additional software it should only take a few minutes.
Finishing the install
At the end you'll see:
┌────────────┤ [!!] Finish the installation ├────────────────────┐ ┌│ Installation complete │ ││ Installation is complete, so it is time to boot into your new system. │ ││ Make sure to remove the installation media (CD-ROM, floppies), so │ ││ that you boot into the new system rather than restarting the │ ││ installation. │ ││ │ └│ <Go Back> <Continue> │ │ │ └───────────────────────────────────────────────────────────┘
Normally at this point you'd select <Continue> and your machine would reboot into your new install. Under Xen though, a reboot does not fully destroy the virtual machine. If the installer did do a reboot here, all that would happen is that Xen would restart the installer again. For that reason the installer has been set to halt here. You'll be dropped back to the Xen Shell prompt, and issuing a boot command will boot up your new VPS:
The system is going down NOW!ystem... │
Sending SIGTERM to all processes │
Sending SIGKILL to all processes─────────────────────────────────────┘
Requesting system halt
[ 4298.952440] md: stopping all md devices.
[ 4299.944797] xenbus_dev_shutdown: device/console/0: Initialising != Connected, skipping
[ 4300.295265] System halted.
xen-shell> boot
Booting instance: debtest1
pyGRUB version 0.6
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Debian GNU/Linux, kernel 2.6.26-2-xen-686 x
x Debian GNU/Linux, kernel 2.6.26-2-xen-686 (single-user mode) x
Started domain debtest1
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.26-2-xen-686 (Debian 2.6.26-26lenny1) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Thu Nov 25 02:32:31 UTC 2010
.
.
.Things you might like to change after install
By this point you've just completed a fresh install of Debian and it should be working fine, but you won't have some of the nice features of a typical BitFolk VPS image configured. Things you may wish to look into:
- You either won't have an NTP server installed or else it won't be configured to talk to the NTP servers.
- /etc/resolv.conf will only have one of the two BitFolk DNS resolvers.
- Your /etc/fstab will be mounting things by device name, but it's recommended to change that to UUID or label. Future changes to the Linux kernel are more likely to rename virtual block devices than devices for regular SATA disks, so it's wise to make sure that things mount properly even if this should happen.
- If your VPS has multiple IPv4 addresses then only the first one will have been configured by the installer.
- The installer may not have set up IPv6 at all, or may have done so automatically. You may need to set this up how you prefer.
Breaking out of the installer
If you do something wrong then you can generally fix it by going back to the installer's main menu. You get there by selecting Go back when given that option in a dialog. From the main menu of the installer you can retrace your steps. You can also start a shell if you need to poke around.
You can of course always create a new Xen Shell window, shutdown or destroy your running installer VPS and just start over again.
Ubuntu
So far supported:
- Lucid (10.04 LTS)
- Maverick (10.10) from v1.48bitfolk12
- Natty (11.04) from v1.48bitfolk14
The process is largely identical to Debian.
Here's a screencast of someone installing Natty on a BitFolk VPS.
There seemed to be a large pause (as much as 4 minutes) with no visible progress in between setting hostname/domain and installing the base system, but the install did eventually proceed by itself.
CentOS and Scientific Linux
- Main article: CentOS and Scientific Linux
So far supported:
- CentOS 5.x
- CentOS 6.x (from v1.48bitfolk16)
- Scientific Linux 6.x (from v1.48bitfolk16)
Things you might like to change after install
- You may want to configure yum to take advantage of BitFolk's CentOS 5 mirror
- You either won't have an NTP server installed or else it won't be configured to talk to BitFolk's NTP servers
- /etc/resolv.conf will only have one of the two BitFolk DNS resolvers.
- If your VPS has multiple IPv4 addresses then only the first one will have been configured by the installer.
- The installer won't have set up IPv6 at all.
- A default firewall configuration has been loaded; this will likely need to be modified if you're going to run any public network services.