Mandrake Auto-Install

Camille Bégnis camille@mandrakesoft.com

v0.1 17/11/1999


Contents

1. Introduction

This document is intended for Linux-Mandrake users that wish to automate the complete installation procedure on a machine. Just insert the boot disk into the machine, and eventually the CD, et voilà!

This feature may be particularly useful to system administrators, reducing considerably the time spent in front of a machine for a new installation or even an update... The different installation modes currently available are from:

You'll notice while reading this dicument that the process of creating an auto_install boot disk is not designed for beginners. Here are described all the steps to do so for a Linux system administrator (for whom this feature is intended). However, following carefully all the steps, a Linux user knowing basic commands should complete the challenge, moreover if he needn't to modify by hand the configuration file.

2. The overall process

The process of setting up an automated install and using it consists of 4 single steps:

2.1 Generate the auto_inst.cfg.pl file

This file contains all of the information needed by the install script to actually perform the install automatically. It contains all the info the users would have entered if in manual mode.

There are basically three ways to generate this file:

2.1.1 Perform a normal install on a machine

This install machine should be similar to the ones the automatic install will be applied. However this is not a requirement as we'll see later.

Each install generates a file /tmp/auto_inst.cfg.pl containing all of your choices and all automatically chosen parameters (for example partitioning, NIC card, etc.). This is the file that will be used for automatic install.

2.1.2 Perform a simulated install on a Linux box

Just launch Mandrake/mdkinst/usr/bin/perl-install/g_auto_install on your install cd. It'll open 4 windows corresponding to the four zones displayed during ``real'' install. Then just follow the steps as if you were installing Linux-Mandrake onto the machines the auto-install is intended for. Of course, this install won't partition nor format your disk, The ONLY modification on your system (remember this is a simulated install) this install will perform is creating some few files into /tmp. Among them, of course, is the /tmp/auto_inst.cfg.pl file we just talk about.

2.1.3 Write the file from scratch

Well, indeed, not really from scratch. You are encouraged to start from an existing /tmp/auto_inst.cfg.pl file you previously generated with a normal or simulated install.

In fact, it is recommended whatever the method you used to generate the auto_inst.cfg.pl file, to edit it by hand, following the details given in the last section of that documentation ``Inside the auto_inst file''.



Important
You probably noted that this file follow the perl syntax. Before using such a file you modified by hand you should use perl -c auto_inst.cfg.pl in order to check the syntax of your customised file.



2.2 Create a boot disk containing the image corresponding to the install mode.

Just follow the instructions given in the install section of the userguide, just as if you were beginning a normal install. Use

2.3 Modify the boot disk in order to make it an ``auto_install'' boot disk

There are a few modifications to make to the boot disk in order to get it self-sufficient for the auto_install we try to setup.

It consists of modifying an existing file to tell the install disk this is an auto_install, and adding files to automate the process:

2.3.1 Alter the syslinux.conf file

Your origin file looks like that:

default linux

prompt 1

timeout 72

display boot.msg

F1 boot.msg

F2 general.msg

F3 expert.msg

F4 rescue.msg

F5 kickit.msg

F6 param.msg

label linux
kernel vmlinuz

append ramdisk=32000 initrd=network.rdz mdkinst network
label expert
kernel vmlinuz

append expert ramdisk=32000 initrd=network.rdz mdkinst network
label ks
kernel vmlinuz

append ks ramdisk=32000 initrd=network.rdz mdkinst network
label rescue
kernel vmlinuz

append rescue root=/dev/fd0 load_ramdisk=1 prompt_ramdisk=1
You can then suppress three of the four boot modes (keep ks) and change default to ks. The timeout line is then useless. You will also need to add a parameter to the append line: kickstart=floppy.

Your file will then look like:

default ks

prompt 1

display boot.msg

F1 boot.msg

F2 general.msg

F3 expert.msg

F4 rescue.msg

F5 kickit.msg

F6 param.msg

label ks

kernel vmlinuz

append ks kickstart=floppy ramdisk=32000 initrd=network.rdz mdkinst network

2.3.2 Add auto_inst.cfg.pl file

Here comes the file we finely tuned to achieve the whole automated install process. You just need to copy it to your boot disk.

2.3.3 Add ks.cfg file for network install

In case that you wish your install to be performed via nfs or ftp, you'll need an additional ks.cfg file to tell the install where to find the install source tree. It consists of two lines, one for network configuration, one for the location, on the network, of the install source tree.

2.3.3.1 1. For network configuration, three options:

2.3.3.2 2. To tell the location of the install source tree:

Where 192.168.1.9 refers to the IP address of your NFS or FTP server, and /export to the directory on that server containing the install source tree. For ftp access supply your username and password on that server.

3. Inside the ``auto_inf'' file

This file (formatted in PERL) contains, as we previously saw, all the information the install process needs to install Linux-mandrake on a particular machine. It is, roughly speaking, made of a hash tree, containing keys and their corresponding values, each one on one side of the ``=>'' sign. Note that a value may be itself a hash, or a list of values.

Let's analyse each section of the file, corresponding to the first level of the tree:

3.1 lang

The code used (en, fr_FR, ...) corresponds to the codes used for locales.

3.2 autoSCSI

To automatically probe SCSI devices. Disable for some special machines.

3.3 authentication

3.4 printer

Various parameters for configuring your printer, being local, remote, remote SMB, remote NCP,...

3.5 mouse

You should just suppress this section as it is highly probable that the install process will recognise the mouse on the target machine.

3.6 netc

Various parameters to configure the network on the target machine,

3.7 timezone

'GMT' => 'true' (if you wish your BIOS clock to be setup to GMT time (recommended)

'timezone' => 'Europe/Paris' (or wherever you are located)

3.8 superuser

Contains the password of root. It may be one of:

3.9 intf

Contains the information for the network interface, and notably the boot protocol ('BOOTPROTO') used for static, bootp, or DHCP network configuration.

3.10 keyboard

Used to tell the disposition of the keyboard, with country code (e.g. us, uk, de, fr, ...).

3.11 mkbootdisk

set it to:

3.12 base

Contains the list of all packages needed for base installation of Linux-Mandrake. You shouldn't modify it unless you know what you do.

3.13 users

Contains username and password information for optional non-privileged users.

3.14 installClass

The install class chosen during install ('normal' | 'developer' | 'server').

3.15 partitioning

Various boolean parameters to setup how the partitioning will occur

3.16 partitions

In the case that you did not choose 'auto_allocate' you'll have to add a section here for each partition:

3.17 isUpgrade

True for an update, false or absent for an install

3.18 X

the default X configuration

3.19 default_packages

The packages to install.

4. Authors

This feature of the Linux Mandrake distribution have been coded by:

the programmers of the wondefull DrakX.