Auto Install for Mandrake Linux | ||
---|---|---|
Prev | Next |
This section is for those of you who are in a hurry and don't want to read all the preceding pages. This project started out small and turned into a bit more than just a couple pages, hehehe.
Unfortunately, to use the Auto Install Features of DrakX, you DO need to know a few things. There are short cuts, and you can mostly depend on DrakX auto detecting a lot of things for you, but you are going to get to a point or a situation where the rest of the document does come in handy.
The kinda Short Cuts.
1. If you already have Mandrake Linux 8.2 installed on a machine, then you can use the drakconf program to create a basic auto install disk.
2. Alternately, you can follow the first three steps from the section Getting Started, then copy the file found in /root/drakx called auto_inst.cfg.pl to the newly created boot floppy diskette as auto_inst.cfg. Then you need to modify the file syslinux.cfg to add the kickstart=floppy automatic=method:... options to the first append line (see the section Anatomy of the 'syslinux.cfg' File).
3. If you do not have Mandrake Linux 8.2 installed yet, you can go to the section Installation Methods and do the steps identified in the sub-section Getting Started, but stop after you complete step 5. While you are doing the Manual Install, and you get the point where it is asking you what packages to install (you have a choice here) deselect all packages, make sure that the Individual Package Selections is selected, then toggle to the Flat Package display, deselect Aurora (or not) and finish the install. You will, as part of step 5, now have a diskette containing, for the most part, a basic auto install diskette. From this point on, you can let your repressed creative talents have at it.
Using any of the above approaches will produce a syntactically correct auto_inst.cfg file on the floppy diskette. However, you MUST review the contents of the file to ensure that what it is going to cause, is in fact what you want it to do (see the section Anatomy of the 'auto_inst.cfg' File). Pay particular attention to the options: 'autoExitInstall', 'mkbootdisk', 'partitioning' and 'partitions' (if the diskette was created by the drakconf program, you can ignore the 'partitioning'and 'partitions' options since the Replay Install will force you to re-do these steps). Finally, if you are going to be auto installing from CD-ROM, then you might want to consider adding the 'interactive' option.
The general objective for creating an Auto Install diskette is to minimize the work that you will have to do when installing basically the same suite of programs on multiple computers. You have a choice at this point, create a 'Basic AutoInstall Diskette' which contains all stuff common to all computers and then use the Software Manager on each computer to customize for the user. Or, create a custom diskette for each computer, this is a lot of work and there are probably more optimal approaches that you could use.
Unless you are really a lucky individual and all the computers you are doing the installs for are identical, hardware wise, there is some customization that you will have to do for each. The following is a minimal list of things you need to know so that you can begin the 'customization'.
1. The amount of installed memory. (just in case the Auto Detection and your BIOS disagree).
2. The number of hard disk drives, their type (IDE and/or SCSI), their device ordering (hda, hdb, ... or sda, sdb, ...) and the size of each in terms of Cylinder/Heads/Sectors.
3. The number and type of CD or CD-RW or DVD drives and their device ordering (hda, hdb ... or sda, sdb ...).
4. The number of Floppy disk drives.
5. The number of types of other removable media devices (zip drives, Jazz drives, tape drives, ...) and their device ordering (hda, hdb ... or sda, sdb ...).
6. The type of pointer device, if any (typically a mouse) and how it is connected (serial, bus mouse, ps/2 ...).
7. The network card type, for non Plug and Pray types, you will also need to know its I/O address and the IRQ it uses.
8. The type of video card used (mostly the chip set that is used on it).
9. The type and capabilities of the monitor.
Next, you need to know how you plan to organize your devices (storage media) into a uniform file system hierarchy (/, /boot, ...). Which devices and partitions on each go where.
Finally, you need to determine what packages are going to be installed on the target computer.
So much for Quick, eh?
I almost forgot, you need to decide what Installation Method you plan on using (see the section Installation Methods). This document is going to use the NFS Server method and it also assumes that you have set up the NFS server with the required file set (see the section Setting Up a Simple NFS Serveras an example).
There is a vast volume of information regarding the general subject of setting up and organizing your computer available in book stores and on the web. Everyone has an opinion, good and bad, but you will find that experience is the best, so just use your own best judgment. A good place to start is at http://linuxdoc.org, look at the HOW-TOs, Mini HOW-TOs and Guides. Just in case, the Mandrake Distribution contains most of these documents (albeit somewhat dated) and they may already be installed in a computer that you can access.
Remember, if what you do the first time is not right, do it again. The beauty of the Auto Install process is that you can make changes to the auto_inst.cfg file and repeat the installation until you get it the way you want. Although, lots of coffee or other suitable stimulant may be required.
The best way to start is to create a known 'good' boot diskette using the images that Mandrake has supplied on their CD-ROM, then remove what you do not want, modify what is left as desired, then add anything that is missing. Sounds simple, eh?
Build Base diskette:
Load and mount the Install CD-ROM, or cd to the directory containing the Mandrake Linux file set, place a blank diskette in the floppy drive.
dd if=images/network.img of=/dev/fd0
Remove un-necessary files (optional):
Mount the floppy diskette.
rm -f /mnt/floppy/help.msg
Customize the Loader's Configuration File:
Edit /mnt/floppy/syslinux.cfg and remove/change what you do not need (see the section Anatomy of the 'syslinux.cfg' File); the following is my file's contents:
default linux |
display boot.msg |
label linux |
kernel vmlinuz |
append kickstart=floppy automatic=method:nfs, |
server:fileserver,directory:/mnt/mass/Mandrake/mandrake/8.2, |
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.
Customize the Boot Message:
This one is up to you, but here is what is in mine (create or replace the file /mnt/floppy/boot.msg):
<blank line> |
Installing Mandrake Linux 8.2 |
<blank line> |
This will install a basic system. |
<blank line> |
<blank line> is just in indicator meaning that an empty line is actually in the file. Be as creative or simplistic as you want. If you want flashy graphics, then check out the Syslinux home page at http://syslinux.zytor.com.
Adding your Customized Auto Install File:
Copy your customized auto_inst.cfg (or what ever name you used to distinguish it from other such files) file to the floppy diskette as auto_inst.cfg.
Un-mount the diskette and remove it. It is probably a good idea to put a label on the diskette with suitable markings so you can find it again and know what it contains. I have a bad habit of not putting labels on them and ending up with a table full of blank disks and not being able to find the one I want.
Test Drive:
This may be a good place to go get a good book, extra coffee etc.
Install your shiny new Auto Install disk in the target computer, turn it on an watch what happens. If everything went properly, the last message on the screen should be: Please remove disk and re-boot...
If not, then use Ctrl-Alt-F3 to switch to the diagnostic screen and see what the error message was. Then fix what its complaining about, and re-boot and do it again. It might be a good idea to use Ctrl-Alt-F3 shortly after the kernel boots so you can see all the steps that DrakX is going through.
Repeat as required until you get what you want.
A common problem with customized auto_inst.cfg files is you didn't get the syntax correct. Your first hint will be that the install stops with a cryptic error message indicating it could not load the auto_install.cfg file (maybe it even gives you the line number). If you are not in a rush, you could follow Mandrake's advice in the generated auto_inst.cfg file:
# You should always check the syntax with 'perl -cw auto_inst.cfg.pl' before testing
Another problem is that you did not get the settings and options correct in the syslinux.cfg file. In this case, you will probably be presented with the Manual Install GUI screens. Solving this type of problem is simply a matter of reviewing the file and ensuring that your options are correct.
A more difficult problem to resolve is if you forgot to add a field / line for one of the options you modified or added. There are two possible indications:
1. the install stops before completing, or
2. the hard one - you get the success - please re-boot message, but it doesn't boot or if it does boot, it does not seem to be working right.
Unfortunately, there is not easy answer here. Begin by reviewing the contents of the auto_inst.cfg file and comparing the entries to the descriptions in the section Anatomy of the 'auto_inst.cfg' File. Pay particular attention to those parts which relate to your hardware, maybe what you thought, is not what the computer knows.
Another approach may be to modify the contents of the auto_inst.cfg file down to an absolute minimum, get that working and then begin adding back the stuff you deleted.
The following are two example auto_inst.cfg files. The first is for a recent computer used as a workstation, the second is the same desired configuration except is uses older (dark ages) hardware. Your situation will obviously vary, but it they will give you an idea of what you could do.
By the way, these files were generated using the kinda Short Cut #3 described at the beginning of this section, with a few personal adjustments.
Example 1: Recent Computer
#!/usr/bin/perl -cw |
# |
# You should check the syntax of this file before using it in an auto-install. |
# You can do this with 'perl -cw auto_inst.cfg.pl' or by executing this file |
# (note the '#!/usr/bin/perl -cw' on the first line). |
$o = { |
'partitions' => [ |
{ |
'mntpoint' => '/boot', |
'size' => 80262, |
'type' => 1155 |
}, |
{ |
'mntpoint' => 'swap', |
'size' => 497952, |
'type' => 130 |
}, |
{ |
'mntpoint' => '/', |
'size' => 788785, |
'ratio' => 100, |
'type' => 1155 |
} |
], |
'superuser' => { |
'shell' => '/bin/bash', |
'gid' => '0', |
'realname' => 'root', |
'home' => '/root', |
'password' => 'gotcha', |
'uid' => '0' |
}, |
'lang' => 'en_US', |
'default_packages' => [ |
'numlock', |
'linux_logo', |
'ftp-client-krb5', |
'hexedit', |
'hotplug', |
'imwheel', |
'cpio', |
'nfs-utils-clients', |
'bc', |
'man-pages', |
'sndconfig', |
'mandrake-mime', |
'strace', |
'ldetect', |
'MAKEDEV', |
'gpm', |
'ntp', |
'urpmi', |
'anacron', |
'locales-en', |
'at' |
], |
'partitioning' => { |
'clearall' => 1, |
'eraseBadPartitions' => 0, |
'auto_allocate' => 1 |
}, |
'intf' => { |
'eth0' => { |
'isPtp' => 0, |
'BROADCAST' => '192.168.5.255', |
'isUp' => 1, |
'DEVICE' => 'eth0', |
'NETMASK' => '255.255.255.0', |
'ONBOOT' => 'yes', |
'BOOTPROTO' => 'static', |
'IPADDR' => '192.168.5.202', |
'NETWORK' => '192.168.5.0' |
} |
}, |
'users' => [], |
'useSupermount' => 0, |
'netcnx' => { |
'NET_DEVICE' => undef, |
'NET_INTERFACE' => undef |
}, |
'authentication' => { |
'shadow' => 1, |
'md5' => 1, |
'NIS' => '', |
'LDAP' => '' |
}, |
'isUpgrade' => 0, |
'security' => 2, |
'timezone' => { |
'UTC' => 1, |
'ntp' => 'time-server.eastcott.net', |
'timezone' => 'Canada/Mountain' |
}, |
'mouse' => { |
'MOUSETYPE' => 'imps2', |
'device' => 'psaux', |
'WHEEL' => undef, |
'XEMU3' => undef, |
'FULLNAME' => undef, |
'XMOUSETYPE' => 'IMPS/2', |
'type' => 'PS/2', |
'name' => 'Generic PS2 Wheel Mouse', |
'nbuttons' => 5 |
}, |
'mkbootdisk' => 0, |
'wacom' => [], |
'X' => { |
'resolution_wanted' => '1024x768', |
'default_depth' => '32' |
}, |
'manualFstab' => [ |
{ |
'device' => 'fileserver:/mnt/mass/Mandrake/mandrake/cdrom8.2', |
'mntpoint' => '/mnt/fileserver', |
'options' => 'noauto,ro,nosuid,rsize=8192,wsize=8192', |
'type' => 'nfs' |
} |
], |
'miscellaneous' => { |
'numlock' => 1, |
'CLEAN_TMP' => 1 |
}, |
'keyboard' => 'us', |
'autoExitInstall' => 0, |
'netc' => { |
'NETWORKING' => 'yes', |
'minus_one' => 0, |
'nb_cards' => 1, |
'dnsServer' => '192.168.5.253', |
'FORWARD_IPV4' => 'false', |
'DOMAINNAME' => 'eastcott.net', |
'HOSTNAME' => 'linux2.eastcott.net', |
'GATEWAY' => '192.168.5.253' |
} |
}; |
Example 2: Older Computer
Prev | Home | Next |
Advanced Features | Creating an Updated Installation CD Set |