Using the self-serve net installer/CentOS Linux

From BitFolk
Jump to: navigation, search

Installing CentOS Linux using the BitFolk installer.

Supported distributions

  • CentOS 7.x
  • CentOS 8.x

Supported install methods

CentOS 7.x

  • Semi-interactive text mode (automated partitioning)
  • Custom kickstart URL

CentOS 8.x

  • Semi-interactive text mode (automated partitioning)
  • Custom kickstart URL

About kickstart

All RHEL-like installs use a kickstart profile.

The default kickstart profile

The default kickstart profiles for CentOS 7.x and beyond perform a mostly automatic install. In particular, the default installer kickstart has automated partitioning and package selection.

If you're curious about what the default kickstart profile contains, use the kickstart Xen Shell command to see the URL to the file. You can just view it in your web browser.

Briefly, the default kickstart does this:

  • Automatically blanks your xvda disk then puts a single partition across the whole of it for a root filesystem.
  • Automatically blanks your xvdb disk then puts a single partition across the whole of it for a swap partition.
  • Installs a minimal package selection.
  • Leaves you to interactively set up a user account as the only manual step.

Selecting a different kickstart profile

Since version v1.48bitfolk16 you can use the kickstart Xen Shell command to choose from some alternate kickstart profiles, or (from version v1.48bitfolk18) to specify a URL to your own custom profile.

You should use BitFolk's default kickstart file as a template for making your own modifications.

It is possible to make your install entirely automated if you're willing to put (crypted) password information in your kickstart file.

CentOS 7.x's text mode installer

On CentOS 7.x the default kickstart sets all defaults and leaves you to set your own root password. If you wish it is then possible at this point for you to alter most settings apart from disk partitioning. The initial installer screen will look something like the following:

Starting automated install......
Generating updated storage configuration
Checking storage configuration...
================================================================================
================================================================================
Installation

 1) [x] Language settings                 2) [x] Timezone settings
        (English (United Kingdom))               (Etc/UTC timezone)
 3) [x] Software selection                4) [x] Installation source
        (Custom software selected)               (http://lon.static.bitfolk.com/
 5) [x] Network settings                         centos/7/os/x86_64)
        (Wired (eth0) connected)          6) [x] Install Destination
 7) [x] Kdump                                    (Custom partitioning selected)
        (Kdump is enabled)                8) [!] Create user
 9) [!] Set root password                        (No user will be created)
        (Password is not set.)
  Please make your choice from above ['q' to quit | 'b' to begin installation |
  'r' to refresh]:

You will need to select 9 to set a root password.

In what appears to be a bug, after setting the root password the installer will insist now that "3) Software selection" now needs completing. Select 3 and then make your selection (e.g. just 1 for a minimal install), then c to continue.

The installer screen will now resemble:

 1) [x] Language settings                 2) [x] Timezone settings
        (English (United Kingdom))               (Etc/UTC timezone)
 3) [!] Software selection                4) [!] Installation source
        (Processing...)                          (http://lon.static.bitfolk.com/
 5) [x] Network settings                         centos/7/os/x86_64)
        (Wired (eth0) connected)          6) [x] Install Destination
 7) [x] Kdump                                    (Custom partitioning selected)
        (Kdump is enabled)                8) [x] Create user
 9) [x] Set root password                        (No user will be created)
        (Password is set.)
  Please make your choice from above ['q' to quit | 'b' to begin installation |
  'r' to refresh]:

r to refresh until it changes to:

 1) [x] Language settings                 2) [x] Timezone settings
        (English (United Kingdom))               (Etc/UTC timezone)
 3) [x] Software selection                4) [x] Installation source
        (Minimal Install)                        (http://lon.static.bitfolk.com/
 5) [x] Network settings                         centos/7/os/x86_64)
        (Wired (eth0) connected)          6) [x] Install Destination
 7) [x] Kdump                                    (Custom partitioning selected)
        (Kdump is enabled)                8) [x] Create user
 9) [x] Set root password                        (No user will be created)
        (Password is set.)
  Please make your choice from above ['q' to quit | 'b' to begin installation |
  'r' to refresh]:

and then you are ready to use b to begin the installation. There will be no further questions until the installation is completed.

If you desire an entirely automated installation then:

  1. Take a copy of the default kickstart file.
  2. Add an appropriate rootpw command.
  3. Host your kickstart file on some web server.
  4. Select your kickstart file from BitFolk's Xen Shell.

The addition of a rootpw command to the default kickstart will result in an entirely automated install that will not pause for input at all.

CentOS 8.x's text mode installer

The CentOS 8.x installer with the default kickstart is very similar to the CentOS 7 version above, except:

  • It doesn't have an option to set root password. Instead there is only option 8, to create a user. You should give that user administrator privileges, then it will be able to use sudo. The root password is locked.
  • The bug where you have to set some other things again is fixed. After adding an admin user you'll use b to begin and then the install will be entirely automated.

Navigating the installer screens

The CentOS 8 installer (Anaconda) now runs under tmux, a terminal multiplexer.

While you can normally complete the install without ever switching between the installer's screens — or even pressing a key at all, if you used an automated kickstart file — you may wish to do so when debugging the process or for other advanced tasks.

As with normal usage of tmux you can switch to other screens by using the command sequence Ctrl+b and then the screen number (e.g. Ctrl+b then 2). The usual screens are:

  • main installer on screen 1
  • shell prompt on screen 2
  • logs on screen 3
  • command output on screen 4

The ElRepo kernel-ml will be automatically installed

Warning Warning: As of CentOS 8, Red Hat removed the ability to boot their kernels under Xen PV and PVH mode, even though the upstream Linux kernel enables this by default. Therefore BitFolk's CentOS 8 installer will automatically switch you to the kernel-ml mainline kernel from the ElRepo project.

SELinux relabel

Upon first boot the first thing your install will do is an SELinux relabel so that SELinux functions correctly. If you're watching on the console it will tell you it's doing this, and then after a minute or so it will reboot. You can then use the Xen Shell console command to again connect to its console and see the subsequent normal boot.