Linux-Mandrake:
User Guide and
Reference Manual

MandrakeSoft

 
 
January 2000
http://www.linux-mandrake.com


Next : The startup files: init "System V"
Previous : MSEC
Up

(Back to the table of contents)

Chapter 8 : Auto Install


Introduction

This chapter is intended to Linux-Mandrake users that wish to automate the complete install procedure on a machine. Just insert the boot disk into the machine, and the CD if needed, « et voilą »!

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

You'll notice while reading this document 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 (whom this feature is intented to). However, following carefully all the steps, a Linux user knowing basic commands should achieve the challenge, moreover if he needn't to edit by hand the configuration file.

The overall process

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

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:

Perform a normal install on a machine

This install machine should be similar to the ones the automatic install will be applied to. 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.

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 to. Of course, this install won't partition nor format your disks, The only modification this install will perform on your system (remember this is a simulated install) is creating some few files into /tmp. Among them, of course, is the /tmp/auto_inst.cfg.pl file we just talked about.

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 this chapter "Inside the auto_inst file".

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:

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:

Alter the syslinux.conf file

Your original 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

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.

Add ks.cfg file for network install

In case 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.

  1. For network configuration, three options:
  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.

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.

lang

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

autoSCSI

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

authentication

printer

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

mouse

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

netc

Various parameters to configure the network on the target machine,

timezone

superuser

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

intf

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

keyboard

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

mkbootdisk

Set it to:

base

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

users

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

installClass

The install class chosen during install.

partitioning

Various boolean parameters to setup how the partitioning will occur:

partitions

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

isUpgrade

true for an update, false or absent for an install

X

the default X configuration.

default_packages

The packages to install.


Next : The startup files: init "System V"
Previous : MSEC
Up

Copyright © 2000 MandrakeSoft