Auto Install for Mandrake Linux | ||
---|---|---|
Prev | Next |
SYSLINUX is a light weight boot loader used to start Stage 1 of the Mandrake Linux installation. The file, 'syslinux.cfg', is used to specify what the boot loader is suppose to do and what options, if any, are available to an installer (you) at boot time. In addition, SYSLINUX passes parameters to the linux kernel when it loads and starts the kernel; a few of the parameters are used by the kernel and some are passed on to the Stage 1 program. Some of these parameters are specific to an installation method (as is the initial ram disk contained on the floppy).
Consequently, the Auto Install diskette that you created (at the end of your initial installation or from the Mandrake Control Center on a running system) is set up to match the installation method that was originally used. If you are planning to install multiple computers the same way, then you are all set.
However, if you intend to change the installation method, you will have to create your own Auto Install diskette (see the section Scratch Built Auto Install Diskette). The reason for this is due to the flexibility needed to support a variety of installation methods and options. You just can not get it all on one diskette. This is not as bad as you may think, since the most important file, 'auto_inst.cfg', is independent of the installation method.
The following are going review the contents of the 'syslinux.cfg' file as used by MandrakeSoft. For an in depth description of the capabilities of SYSLINUX see the web site: http://syslinux.zytor.com.
The contents of the 'syslinux.cfg' file are a set of directives which control the actions of the boot loader. These directives can be divided into two groups; global directives and section specific directives. The global ones control the operation of the boot loader, whereas the section directives are only effective when the installer (you) selects them (selection is accomplished by typing the name of the sections' label in response to the boot prompt).
The following is a fragment extracted from a 'syslinux.cfg' file used with a Network Services:NFS install.
default linux |
prompt 1 |
timeout 50 |
display boot.msg |
F1 help.msg |
F2 advanced.msg |
F3 boot.msg |
label linux |
kernel vmlinuz |
append kickstart=floppy automatic=method:nfs, |
server:fileserver,directory:/mnt/mass/Mandrake/mandrake/9.0, |
network:static,ip:192.168.5.202,netmask:255.255.255.0, |
gateway:192.168.5.253,dns:192.168.5.253, |
ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 vga=788 |
NOTE: All the text starting with 'append' through '788' are on ONE line.
The global directives usually occur at the beginning of the file and specify things like which section is selected by default, how long to wait for the installer to enter a section label, etc.
The section specific directives are identified by a line containing label <name> and followed by two lines which specify the kernel image to load and, what parameters (append) to pass to the kernel (and the Stage 1 program). The <name> parameter is the value that an installer would type in at the boot prompt to select a specific section other than the default one.
The following details the purpose of the directives that you can use in the 'syslinux.cfg' file. You should check out the Syslinux web page for more information regarding its capabilities and the options that are available to you. MandrakeSoft only uses a subset because they are generating "general purpose" files. You, on the other hand, are not as limited. Besides, if you want flashy color or graphics then you will find the pertinent information there.
The Global Directives are not method or mode specific, rather they affect all methods/modes the same.
default linux - if the user presses ENTER or the optional timeout expires, this tells the loader to locate the section label linux and begin booting the kernel as defined by the lines after the label.
prompt 1 - this tells the loader to prompt the user to enter an alternate label rather than just using the default one. You can have several different boot scenarios in this file, which is the reason that the generated file has so much in it. This parameter is optional, removing it means the installer will not have the ability to select an alternate boot section.
timeout 50 - this tells the loader to give the user 5 seconds to begin entering another label before using the default one and continuing on with the boot/install process. This parameter is optional and is not necessary if prompt is not used.
display boot.msg - this tells the loader to display the contents of the specified file before presenting a prompt. This is optional, but it may be a good idea to remind the installer what is being installed.
F1 help.msg - if the user presses the F1 key, then display the specified file's contents. This parameter and associated file are optional.
F2 advanced.msg - if the user presses the F2 key, then display the specified file's contents. This parameter and associated file are optional.
F3 boot.msg - if the user presses the F3 key, then display the specified file's contents. This parameter and associated file are optional.
label linux - this names a section that defines specific information that the loader uses for booting Stage 1 of the installation process. The value associated with any section label can be typed by the user at the prompt to instruct the loader to find the specific section, rather than use the one named by the default directive.
Section directives are preceded with the label directive. In this case, a section contains a kernel and an append directive (see the section Advanced Features for special options).
kernel vmlinuz - this is the name of the file containing the compressed kernel image to load and start.
append=... - this is a list of space separated parameters passed to the kernel when the loader starts it.
If you look in the file that was generated, you will find a number of sections (choices) that an installer could select. Each has a different effect or purpose which the following table briefly describes:
vgalo, vgahi, vga16 |
Are just different resolutions for graphic installs |
text |
Is a text based install |
expert |
Has the advantage of disabling Automatic Hardware Detection |
rescue |
Allows you to repair an already installed system using the CD-ROM. |
patch |
Allows you to install a patch from a floppy diskette. |
NOTE: You are going to get caught with this one so I will tell you now; the kernel will only pass a maximum of 256 characters from the 'append' line through to the Stage 1 installer, so be careful.
DrakX supports a substantial number of parameters that can be used to control its operation. This document will describe just the ones that affect the Automated Install.
The following are common and not related to a specific method or mode:
kickstart=floppy - required, do not change. This actually causes the installer to look on the floppy diskette for the 'auto_inst.cfg' file.
An interesting tidbit; if you omit this option and set the automatic= option, you can do GUI based installs without having to enter the method information each time. Of course the auto_inst.cfg file, if present, is ignored.
ramdisk_size=32000 - required, do not change.
root=/dev/ram3 - required, do not change.
vga=788 - required, can be changed. Generally, this parameter affects the GUI installation, but it does have interesting effects when used in the Automated install. If you want details, then check out the kernel documents: Documentation/svga.txt and Documentation/i386/boot.txt
text |
80x25 text |
vga16 |
80x25 text, 640 x 480 GUI |
785 |
80x30 text, 640 x 480 GUI (frame buffer) |
788 |
100x37 text, 800 x 600 GUI (frame buffer) |
791 |
130x48 text, 1024 x 768 GUI (frame buffer) |
794 |
158x64 text, 1280 x 1024 GUI (frame buffer) |
Others you can play with:
0x0f01 |
80x50 text |
0x0f02 |
80x43 text |
0x0f03 |
80x28 text |
0x0f05 |
80x30 text |
0x0f06 |
80x34 text |
0x0f07 |
80x60 text |
0x0122 |
100x30 text |
Ask |
prompt for desired video characteristics to use. You can use this to determine the selections actually available for your video card. |
initrd=network.rdz - required, changes based on the type of method being used:
cdrom.rdz |
for CD-ROM |
hd.rdz |
for Hard Disk |
network.rdz |
for Network Services |
usb.rdz |
for Network Services or CD-ROM/RW accessed via a USB device |
pcmcia.rdz |
for PCMCIA devices |
The 'automatic' parameter is used to select the install method type (cdrom, disk, nfs, ftp or http) and to specify additional parameters as necessary. Any additional parameters are appended after the method type, with each being separated by a COMMA (,) rather than a SPACE. It uses the following general form:
automatic=method:<type>,<parameter>:<value>,
The following are a summary of the method parameters grouped by method type along with any special notes. The additional parameters are simply concatenated together to form a single comma separated string.
automatic=method:cdrom,
NOTE: for those of you that are using CD-ROMs as the source media, the option interactive (see the section Anatomy of the 'auto_inst.cfg' File) is especially pertinent to package installation from more than the first CD.
domain:eastcott.net, - allows you to preset the domain name for the computer.
hostname:linux1, - allows you to set the host name for the computer.
automatic=method:disk,
directory:Mandrake/mandrake/9.0, - root directory where the files are found or, it may also specify the location and name of an ISO image (this image must be the 'first' CD's ISO image).
NOTE: If you specify an ISO file name, then you will be limited to installing ONLY those packages which are available in that ISO image. You will not be able to install packages from the other ISO images which form the complete set.
disk:hda, - disk drive containing the directory or ISO image.
domain:eastcott.net, - allows you to preset the domain name for the computer.
hostname:linux1, - allows you to set the host name for the computer.
partition:hda6, - partition name of specified disk drive containing the directory or ISO image.
automatic=method:nfs,
interface:eth1, - specifies the ethernet interface to use (eg. eth0, eth5, etc.). It is only required when there is more than 1 ethernet interface. This feature can only be used if DrakX can auto detect ALL the ethernet cards.
The trick when installing with multiple network card is convincing the computer that the ethX you specify is the same one it thinks is ethX. If you do not use the interface parameter, DrakX will ask you which one you want and then it will prompt you for the relevant information based on your specified method.
server:fileserver, - machine where the installable files are located, can be an IP or a host.domain (or host).
directory:/mnt/mass/Mandrake/mandrake/9.0, - root directory where the files are found.
network:static, - means you are going to specify the necessary IP information;
ip:192.168.5.202, - what is it for this machine.
netmask:255.255.255.0, - what is it's netmask. This is optional and is only required if you are using a non-standard netmask.
gateway:192.168.5.253, - what is the gateway's IP. This is optional and should only be included if the specified fileserver is not located on the same subnet.
dns:192.168.5.253, - what is the IP for the DNS server. Up to three DNS servers can be specified, each IP is separated by a comma. This is optional and should not be included if you do not have or use a DNS server. If it is not included, then the server: option must contain an IP address instead of a name.
or
network:dhcp, - means the IP, netmask, gateway and dns parameters are provided by the dhcp server. Depending on how the dhcp and DNS servers are configured, the host name and domain name may also be supplied.
or
network:adsl, - means the IP, netmask, gateway and dns parameters are provided by the ADSL service provider when you connect.
adsluser:my_adsl_name, - user name, as required, to login to your ADSL service provider.
adslpass:my_password, - password, as required, to login to your ADSL service provider.
NOTE: If you have selected network:adsl, be aware that ONLY the PPPoE protocol is currently supported.
domain:eastcott.net, - optionally allows you to preset the domain name for the computer. This parameter is only required if the stage 1 installer can not obtain the domain name from your DNS Server for the IP address that you specified.
hostname:linux1, - optionally allows you to set the host name for the computer. This parameter is only required if the stage 1 installer can not obtain the host name from your DNS Server for the IP address that you specified.
automatic=method:ftp,
interface:eth1, - specifies the ethernet interface to use (eg. eth0, eth5, etc.). It is only required when there is more than 1 ethernet interface. This feature can only be used if DrakX can auto detect ALL the ethernet cards.
The trick when installing with multiple network card is convincing the computer that the ethx you specify is the same one it thinks is ethx. If you do not use the interface parameter, DrakX will ask you which one you want and then it will prompt you for the relevant information based on your specified method.
server:fileserver, - machine where the installable files are located, can be an IP or a host.domain (or host).
directory:/mnt/mass/Mandrake/mandrake/9.0, - root directory where the files are found.
network:static, - means you are going to specify the necessary IP information;
ip:192.168.5.202, - what is it for this machine.
netmask:255.255.255.0, - what is it's netmask. This is optional and is only required if you are using a non-standard netmask.
gateway:192.168.5.253, - what is the gateway's IP. This is optional and should only be included if the specified fileserver is not located on the same subnet.
dns:192.168.5.253, - what is the IP for the DNS server. Up to three DNS servers can be specified, each IP is separated by a comma. This is optional and should not be included if you do not have or use a DNS server. If it is not included, then the server: option must contain an IP address instead of a name.
or
network:dhcp, - means the IP, netmask, gateway and dns parameters are provided by the dhcp server. Depending on how the dhcp and DNS servers are configured, the host name and domain name may also be supplied.
or
network:adsl, - means the IP, netmask, gateway and dns parameters are provided by the ADSL service provider when you connect.
adsluser:my_adsl_name, - user name, as required, to login to your ADSL service provider.
adslpass:my_password, - password, as required, to login to your ADSL service provider.
NOTE: If you have selected network:adsl, be aware that ONLY the PPPoE protocol is currently supported.
user:anonymous, - user name, as required, for ftp login.
pass:david@eastcott.net, - pass word, as required, for ftp login.
domain:eastcott.net, - optionally allows you to preset the domain name for the computer. This parameter is only required if the stage 1 installer can not obtain the domain name from your DNS Server for the IP address that you specified.
hostname:linux1, - optionally allows you to set the host name for the computer. This parameter is only required if the stage 1 installer can not obtain the host name from your DNS Server for the IP address that you specified.
automatic=method:http,
interface:eth1, - specifies the ethernet interface to use (eg. eth0, eth5, etc.). It is only required when there is more than 1 ethernet interface. This feature can only be used if DrakX can auto detect ALL the ethernet cards.
The trick when installing with multiple network card is convincing the computer that the ethx you specify is the same one it thinks is ethx. If you do not use the interface parameter, DrakX will ask you which one you want and then it will prompt you for the relevant information based on your specified method.
server:fileserver, - machine where the installable files are located, can be an IP or a host.domain (or host). This is only required for nfs, ftp or http methods.
directory:/mnt/mass/Mandrake/mandrake/9.0, - root directory where the files are found. This is only required for nfs, ftp, http or disk methods. For the disk method, this may also specify the location and name of an ISO image.
network:static, - means you are going to specify the necessary IP information;
ip:192.168.5.202, - what is it for this machine.
netmask:255.255.255.0, - what is it's netmask. This is optional and is only required if you are using a non-standard netmask.
gateway:192.168.5.253, - what is the gateway's IP. This is optional and should only be included if the specified fileserver is not located on the same subnet.
dns:192.168.5.253, - what is the IP for the DNS server. Up to three DNS servers can be specified, each IP is separated by a comma. This is optional and should not be included if you do not have or use a DNS server. If it is not included, then the server: option must contain an IP address instead of a name.
or
network:dhcp, - means the IP, netmask, gateway and dns parameters are provided by the dhcp server. Depending on how the dhcp and DNS servers are configured, the host name and domain name may also be supplied.
or
network:adsl, - means the IP, netmask, gateway and dns parameters are provided by the ADSL service provider when you connect.
adsluser:my_adsl_name, - user name, as required, to login to your ADSL service provider.
adslpass:my_password, - password, as required, to login to your ADSL service provider.
NOTE: If you have selected network:adsl, be aware that ONLY the PPPoE protocol is currently supported.
domain:eastcott.net, - optionally allows you to preset the domain name for the computer. This parameter is only required if the stage 1 installer can not obtain the domain name from your DNS Server for the IP address that you specified.
hostname:linux1, - optionally allows you to set the host name for the computer. This parameter is only required if the stage 1 installer can not obtain the host name from your DNS Server for the IP address that you specified.
DHCP Notes
Documenting how you should use the network:dhcp option and the related domain and hostname options is difficult since they are highly dependent on the characteristics and interactions of your DHCP and DNS servers. In addition to the conventional servers, there are a number of devices capable of acting as DHCP servers for a LAN which are designed primarily for use in the Windows world and may require a bit of effort on your part to get it working.
Since there are may ways to set the DHCP / DNS servers up, I will present a few of the more common arrangements and what may be required for the Stage 1 installer. These are by no means the only ways.
DHCP servers can be configured to provide IP, host name and domain name information based solely on the ethernet address of the network card in a computer and the associated DNS server can be pre-configured with the IP and host name association, or the DHCP server can inform the DNS server of the IP/name association (Dynamic DNS). In this case all that is required is the network:dhcp, parameter.
Another configuration scenario is where the computer must supply a host name when requesting IP information, then the DHCP server will return the IP, host name, and domain name information. This is the usual case for most Cable Modem connections and is the behaviour exhibited by most Windows based computers. Again, the DNS server can be pre-configured with the association or the DHCP server can inform it with the necessary information (DDNS). In this case, both the network:dhcp, and hostname:linux1, parameters are required.
Finally, there is the case where the DHCP server does not return the host name or domain name to be used, and/or the DNS server does not contain the IP to name association or is not informed by the DHCP server. In this case you will need to supply all three parameters, network:dhcp,hostname:linux1,domain:eastcott.net.
The Stage 1 installer passes what ever information it is provided (from the parameters supplied, from the DHCP server or the DNS server) to the stage 2 installer to set up the final configuration for your computer. Your actual DHCP / DNS environment will have an impact on two possible aspects of an automated install. For NFS installs, if the IP that you are assigned does not have an associated host name that the NFS server can obtain from a DNS server, you will have to ensure that the NFS server is set for IP authentication rather than name authentication (see the section Setting up a Simple NFS Server, Step 5). Also, the DHCP server can be configured to supply the name and location of the auto_inst.cfg file (see the section DHCP Server).
Regardless of how you think every things is supposed to work, you are advised to discuss things with your network administrator and experiment a bit to determine the best approach(s) for your actual environment.
The problem of the 256 character line length can be mitigated somewhat by the use of aliases for some of the parameters as follows:
Full name |
Alias |
adslpass |
adslp |
adsluser |
adslu |
directory |
dir |
disk |
dis |
domain |
dom |
gateway |
gat |
hostname |
hos |
interface |
int |
method |
met |
netmask |
netm |
network |
netw |
pass |
pas |
partition |
par |
server |
ser |
user |
use |
|
|
By rewriting the example from the beginning of this section using the aliases, you get the following:
default linux |
prompt 1 |
timeout 50 |
display boot.msg |
F1 help.msg |
F2 advanced.msg |
F3 boot.msg |
label linux |
kernel vmlinuz |
append kickstart=floppy automatic=met:nfs, |
ser:fileserver,dir:/mnt/mass/Mandrake/mandrake/9.0, |
netw:static,ip:192.168.5.202,netm:255.255.255.0, |
gat:192.168.5.253,dns:192.168.5.253, |
ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 vga=788 |
NOTE: All the text starting with 'append' through '788' are on ONE line.
For those of you who noticed, this example is now passed through to the Stage 1 installer intact (which, by the way, the original example is not).
Prev | Home | Next |
Installation Methods | Anatomy of the 'auto_inst.cfg' File |