2001.01.11 The following are a collection of notes regarding the Auto Installation procedure for Linux-Mandrake. Most of the content below is derived from experimaneting with MDK 7.1 and extracted from the Auto Install Document that Mandrake provides in a link under their Drakx topic: url: -> http://www.linux-mandrake.com/drakx/auto_inst.html However, as with all on-going projects, the vendor supplied document seems somewhat confusing and to a certain extent, misleading. The following is a work in-progress which attempts to document those elements of the Auto Installation process that I have found works for me. Auto Install Preparations The MDK document indicates that there are three ways to perform an Auto Install: via CD-ROM, NFS and FTP each of which requires that you create a BOOT floppy, as a minimum,and then adjust the contents of the Floppy to contain the files necessary for the installation. Each of the following will sections will describe the prparations required in more detail CD-ROM Install Mandrake 7.1 is distributed on 2 CDs but the Auto Install does not prompt you the 2nd CD. Consequently, you will not get all your intended applications installed. I DO NOT recomend you use this approach unless you are certain that all the applications that you want to install are present on the first CD. ... NFS Install This installation method requires that the conents of the MDK CD-ROMs be available via an NFS server. This implies that you have a 'second' computer available containing the necessary files. The following assumtions are in place: CD-ROM mount point: /mnt/cdrom Step 1: Setting up the NFS Server 1. On the designated server machine, make sure that NFS file exports are working correctly. You will need the following running: As root: 2. Create a directory -> /nfscd, then change the file permissions to 0755 using -> chmod 755 /nfscd, then change ownership of the directory to a regular user using -> chown user.group /nfscd As a regular user: 3. Insert the MDK Install CD (1 of ...) into your CD-ROM, and mount it. copy the CD-ROMS contents to disk using -> cp -a /mnt/cdrom /nfscd 4. Umount the first disk, then insert and mount the second CD. again, copy the files using -> cp -a /mnt/cdrom /nfscd Unmount and remove the CD. 5. Rename the directory /nfscd/cdrom to /nfscd/cdrom71 using: mv /nfscd/cdrom /nfscd/cdrom71 As root: 6. Modify your /etc/exports files to contain the the line: /nfscd/cdrom71 *.eastcott.net(ro,root_squash) Then restart the NFS daemons using: /etc/rc.d/init.d/nfs restart Test that the NFS volume can be mounted on another computer using: mount -t nfs linux1:/nfscd/cdrom71 /mnt/nfs Note: Linux1 is the name of the computer that exported /nfscd/cdrom71 /mnt/nfs is a mount point on the second computer. adjust either/both for your environment. Step 2: Preparing an Auto Install Disk 1. Create the basic boot disk using: dd if=/nfscd/cdrom71/images/network.img of=/dev/fd0 Then label the diskette something like: Mandrake 7.1 Auto Install - NFS Note: Some diskettes do not always take the image properly due to defects etc.. So varify that the image was transferred properly by using the following: Linux caches the last operations to the FD so, install a different one, do a listing of it, remove and install the Auto Install one again. dd if=/dev/fd0 of=./n.img diff ./n.img /nfscd/cdrom71/images/network.img 2. Add/Create the Kickstart Configuration file This file is used select the auto install method and provide the required information locating the server. Mount the Auto Install diskette, create/edit the file: ks.cfg delete all existing lines, For STATIC IP environments, Enter the following: nfs --server 192.168.5.1 --dir /nfscd/cdrom71 network --ip 192.168.5.210 --netmask 255.255.255.0 --gateway 192.168.5.254 --nameserver 192.168.5.254 VERY important: the line 'network' and all its parameters MUST be on a single line, it can not be on multiple lines using a line continuation symbol ' \'. Note: --server 192.168.5.1 can be replaced by --server linux1.eastcott.net if your name server works --nameserver can have upto 3 ip's specified (space seperated). 3. Modify/Edit the file syslinux.cfg from: label linux kernel vmlinuz append ramdisk_size=32000 initrd=network.rdz network vga=788 to: label linux kernel vmlinuz append ramdisk_size=32000 initrd=network.rdz network vga=788 kickstart=floppy This adds the parameter kickstart so that the autoinstall programs know how they were started. 4. Add/Replace the file: auto_inst.cfg Copy you custom auto install file to the floppy: cp ./auto_inst.cfg /mnt/floppy/auto_inst.cfg Now unmount and remove the diskette. PUT a label on it Note: The file may also be called: auto_inst.cfg.pl, either forms work Step 3: Performing the Installation 1. Begin the Auto Install Insert the diskette just created into the floppy disk of the target computer. Power it on or press the reset button After a few seconds, the system will present a Welcome type screen, a few seconds later the system will begin booting the kernel and if all goes well, you will start to see messages like: Entering step ... 2. Go have a coffee or three. On a fast computer (K6-500), the install time is in the order of 20 minutes, a slow one (200Mhz) could be an hour plus. However, the times are highly dependant on what you are installing. 3. If you set your auto install configuration file to NOT auto restart, then at the end of the install, the computer will be prompting you to press ENTER to reboot. Remove the diskette first, then press enter. Step 4: Post Install Clean up. For the most part, the install should have left you with a working system, and with all the features that you had configured. However, there are a number of anomolies that you really ought to clean up before adding users and activating the system for general use. All the following steps are performed as ROOT. 1. Clean up default user PATH variable: It seems that the Mandrake Init Scripts cause the /etc/profile script to be executed 3 times from a login, and from each xterm you start. As a result, the PATH variable has redundant entries in it. To fix, edit the file: /etc/profile and change from # Mandrake-Security : if you remove this comment, remove the next line too. PATH=$PATH:/usr/X11R6/bin:/usr/games to # Mandrake-Security : if you remove this comment, remove the next line too. echo $PATH | grep -q "/usr/X11R6/bin:/usr/games" if [ $? -ne 0 ]; then PATH=$PATH:/usr/X11R6/bin:/usr/games fi 2. Clean up User template files /etc/skel/.bashrc and change from export XAUTHORITY=$HOME/.Xauthority to [ -z $XAUTHORITY ] && export XAUTHORITY=$HOME/.Xauthority /etc/skel/.bash_profile add the following to the end of the file: # clean up old chache files, since Netscape doesn't [ -d ~/.netscape ] && rm -rf ~/.netscape/cache/* 3. Fix conf.modules complaint As root, # due to new modutils [ -f /etc/conf.modules ] && mv -f /etc/conf.modules /etc/modules.conf && depmod -a 4. On a computer which is NOT acting as a local NTP Time Server If you have installed the ntp server package (ntp-4.0.99k), then As root, cp -f /etc/ntp/sample.conf.client /etc/ntp.conf echo "time-server.eastcott.net" > /etc/ntp/step-tickers 5. Stop/Start Services As root, use linuxconf or any other method to review the Start Up services and enable/disable them so that you have only those that you want started when then system reboots. 6. NO Sound card If you have no sound card, and you are going to use KDE, then edit the file: /usr/bin/startkde and change: from sleep 1 ; kaudioserver (sleep 1 && exec kwmsound) & to #sleep 1 ; kaudioserver #(sleep 1 && exec kwmsound) & 7. Switch to LILO As root, lilo 8. Fix locate/slocate Problem As root, add the slocate froup (21) to /etc/group (groupadd -g 21 slocate) add SUID bit to /usr/bin/locate (chmod 2755 /usr/bin/locate) run updatedb Other Miscellaneous FIXS: 1. KDE Network Neighborhood User MOUNT Problem /usr/bin/smbmnt needs to be set to SUID for users to be able to mount Windows boxes chmod 4755 /usr/bin/smbmnt NOT smbmount, but smbmnt FTP Install ... url --url ftp://user:password@192.168.5.1//nfscd/cdrom71 ...