Linux-Mandrake: |
User Guide and |
Reference Manual |
MandrakeSoft
January 2000 http://www.linux-mandrake.com
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 process of setting up an automated install and using it consists of 4 single steps:
auto_inst.cfg.pl
fileThis 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:
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.
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.
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".
Just follow the instructions given in the "install" section of the userguide, just as if you were beginning a normal install. Use:
hd.img
for an install from the local hard drive,
cdrom.img
for an install from the local CDROM drive,
network.img
for an install through NFS or FTP
using an ISAPCI NIC,
pcmcia.img
for an install through NFS or FTP (and
possibly CDROM) using a PCMCIA card.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:
syslinux.conf
fileYour 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
auto_inst.cfg.pl
fileHere comes the file we finely tuned to achieve the whole automated install process. You just need to copy it to your boot disk.
ks.cfg
file for network installIn 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.
network --ip 192.168.1.25 \
--netmask 255.255.255.0 \
--gateway 192.168.1.1 \
--nameserver 192.168.1.12 \
(of course, adapt IP addresses to your local context)
network --bootproto dhcp
network --bootproto bootp
nfs --server 192.168.1.9 --dir /export
url --url ftp://user:password@192.168.1.9//export
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.
auto_inf
fileThis 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
$shadow
: set at 1
to use shadow
passwords, 0
elsewhere,
$md5
: idem
$nis
: set at 1
if you wish to use a NIS
server, you will then need to setup:
$nis_server
: the IP address of the NIS server the
machine will use.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,
NETWORKING
(to true
or false
)
DOMAINNAME
dnsServer
FORWARD_IPV4
(to true
or false
)
HOSTNAME
timezone
GMT =>
(to true
or false
)
timezone => Europe/Paris
(for
example)superuser
Contains the password of root
. It may be one of:
pw
: contains the encrypted password,
password
: contains the password in clear.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:
0
if you don't want a boot disk (recommended),
1
to write a boot disk on drive fd0
,
fdx
to write a boot disk on drive fd<x>
(<x>=[0,1]
).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:
clearall
to clear existing partition table (usefull,
erase all previous partitions)
autoformat
(recommended)
eraseBadPartitions
auto_allocate
for auto-partitioningpartitions
In the case that you did not choose auto_allocate
you'll have to
add a section here for each partition:
mntpoint
the directory where the partition will be
mounted,
type
the decimal number corresponding to the partition
type chosen,
size
the size in bytes of the partition.isUpgrade
true
for an update, false
or absent for an install
X
the default X configuration.
default_packages
The packages to install.