Using the self-serve net installer

From BitFolk

(Redirected from Self-serve installer)
Jump to: navigation, search

For most guest operating systems it is possible for customers to launch a self-service network installer from the Xen Shell.

Contents

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:

If you don't know the password then you'll need to do a reset or contact BitFolk Support.
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.
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.
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.gz

The 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

Warning Warning: 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). xvda1 would normally be the root filesystem and xvdb1 would usually be used for swap. 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:

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.

If using a separate /boot (commonly-needed for more complicated filesystem layouts, LVM, etc.) then please note that it has been observed that an i686 install of Debian jessie (8.x) with a 20MiB /boot failed due to lack of space while installing the kernel (actually while creating the initramfs), whereas the same install with a 25MiB /boot succeeded. A few megabytes could possibly be shaved off by telling it to build a targeted initramfs instead of a generic one (untested).

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:

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.

Saving logs

If you're having problems then showing BitFolk Support the logs from your installer will be helpful. There is a "Save debug logs" option near the end of the main menu of the installer which will create a directory with the logs in it. Available options for saving the logs are:

The easiest way to get the logs off is probably the Web choice, as you can just point your web browser at the VPS's IP and download the files.

Next easiest would probably be to enable SSH support in the installer and then use the Mounted file system option to save the logs somewhere (e.g. /mnt as it suggests would be fine), start a shell and scp them out. To enable SSH in the installer:

  1. Use the "Change debconf priority" option to change priority to low.
  2. Use the "Download installer components" to select openssh-client-udeb.

Now when you use the "Execute a shell" option you should have ssh and scp commands available.

Another possibility would be to use the Mounted file system option to save the logs somewhere inside the system being installed, which is somewhere under /target from the point of view of the installer, e.g. /target/var/tmp. You would then boot into the rescue VM to access the logs, copy them elsewhere, etc.

Ubuntu

So far supported:

The process is largely identical to Debian.

Here's a screencast of someone installing 11.04 on a BitFolk VPS.

There seemed to be a large pause (as much as 20 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 7.x used to install with 1GiB of memory but at some point started requiring 2GiB. If your installer crashes with an error like:

[   19.588648] dracut-initqueue[597]: curl: (23) Failed writing body (480 != 5336)
[   19.842042] dracut-initqueue[597]: mount: wrong fs type, bad option, bad superblock on /dev/loop0,

then please ensure you are running version v1.48bitfolk37 of the Xen Shell which will temporarily give you 2GiB of memory to install with.

As the Xen Shell stays running when you log out you may still be running an older version. The version command will tell you what you're running. If it's too old then use the exit command to get out of it and re-connect. A new, up to date copy will be spawned.

Things you might like to change after install

Arch Linux

A guide has been written up for installing Arch Linux via the rescue VPS.

Gentoo

A guide has been written up for installing Gentoo via the rescue VPS.

Slackware

A guide has been written up for installing Slackware via the rescue VPS.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox