Automated Install Redhat Linux 9.0+

CDROM Boot

For Redhat Linux installs, we use the kickstart procedure provided by RedHat. The kickstart "autoinstall disc" is a CD-R disc created by Tim Fredrick and also includes Partition Magic and a Linux rescue, and a few other images.

PXE Boot

We also provide PXE boot installs -- our PXE boot server is dns1.acd.ucar.edu and the directory it serves is /tftpboot. Images are in /tftpboot/*.img and the basic menu you get when doing a PXE Boot is defined at /tftpboot/pxelinux.cfg/default.

PXE must be enabled on the workstation side -- on Dell Optiplex and Precision workstations, I have found that you have to go into the BIOS setup, find the on-board ethernet, and then hit right arrow to enable not only that ethernet, but also PXE on that ethernet.

DHCP settings

Both the kickstart from CD-ROM and the kickstart from PXE depend on defining the machine in DHCP first. Here is an example from the workstation known as "acd-lupine":

host acd-lupine {
   hardware ethernet 00:08:74:D5:A0:27;
   fixed-address 128.117.32.157;
  allow bootp;
  allow booting;
  filename "pxelinux.0";
}

This entry in /etc/dhcpd.conf provides a static IP to Mac address mapping served by DHCP and enables the machine to be booted via PXE. (remove the last 3 lines for the regular CD-ROM kickstart).

The beginning of our dhcpd.conf file contains these lines which tell kickstart where to find the download server (next-server) and what the filename is which contains the kickstart runtime script:

next-server 128.117.32.2;
filename "/dns1/kickstart/kickstart90-manualpartition";

Our Kickstart script runs a post install script in the directory acd.ucar.edu:/redhat/90. The directory /redhat/redhat90 is a copy of the RPMs and other files found on the 3 CD-ROM set for Redhat Linux. The post install script is called "kickstart-postinstall.sh" and installs additional RPMs, and scripts other configurations necessary for our environment. It also installs logins and customizations found in /redhat/machines/machine_name where machine_name is the FQDN of the machine -- for example "/redhat/machines/acd-lupine.acd.ucar.edu". User accounts are shellscripts which go into the subdirectory "users" -- for example "/redhat/machines/acd-lupine.acd.ucar.edu/users/acd-doe".

Assumptions and Notes

Preparing for an install

  1. Make sure a static DHCP entry exists for the machine as described in "DHCP settings" above.
  2. On acd.ucar.edu, create a directory for the machine under /redhat/machines. For example /redhat/machines/acd-lupine.acd.ucar.edu. Use the FQDN for the directory name. If there are user accounts to be added, place them in /redhat/machine/machinename/users as shellscripts to create the account. If unusual RPMs are to be added, put them in /redhat/machine/machinename/rpms. The file /redhat/machines/machinename/HOSTNAME should contain the string "/home". If there is an IDL license to move over, put it in /redhat/machines/machinename/rsi/license.dat.

Installing from the kickstart CD-R disc

  1. Make sure the boot order is configured to boot from CD first. Or on some Dell systems you can press F12 at boot time to specify a specific boot device.
  2. Insert the CD-R disc and boot the computer. The CD is designed for unattended reboots -- so you must press a key within 30 seconds in order to actually boot from the CD and run its scripts. [screen shot]
  3. You may need to run Partition Magic to either:
  4. Reboot after using Partition magic (if you use partition magic)
  5. Select option 1 -- kickstart for Redhat Linux 9.
  6. Choose the option to manually configure the partition tables. [screen shot]
    [screen shot]
  7. If the system has a floppy disk, go ahead and place an unformatted Windows floppy disk in the drive. The kickstart postinstall will create a bootable image on that floppy at the end.
  8. Click on the button "Next". At this point, the Redhat kickstart should truly be unattended. [screen shot]. First the base level RPMs will be installed, and then control will be passed to the postinstall script. At the end, the floppy disk will be formatted and made into a bootable image. (but if you don't have a floppy disk, don't worry. You can still use the e2fs program in Windows to find the bootsect.lnx -- a boot sectore which is also written by the postinstall script.
  9. At the end of the install you will want to configure the dual-boot option for the Windows 2000 or XP boot loader. First you have to get the bootsect.lnx file from the Linux side and then you have to edit the c:\boot.ini file to include the Linux boot option.
    1. To get the bootsect.lnx file first boot into Windows XP or 2000. Look in C:\Program Files for the program e2fs.exe found in C:\Program Files\E2FS of any machine on which we do a Windows 2000 or XP autoinstall. [screen shot] Run the program. You will need to figure out which partition contains the /root directory (it would be the root or "/" partition). For example, it might be on hda5. Expand hda5 in the e2fs program and look for the file "bootsect.lnx". [screen shot]. Right click on the file and select "export file". Store bootsect.lnx as "C:\bootsect.lnx". [screen shot].
    2. Now edit the C:\boot.ini file with notepad. Add a line that reads c:\bootsect.lnx="redhat linux 9.0". [screen shot] If you want the default boot to be Redhat Linux instead of windows, you must also change the default= line to read something like "default=c:\bootsect.lnx".
      [screen shot].
    If you ever need to create bootsect.lnx, log into Linux. Run "grub-install /dev/hda2". Then enter "dd if=/dev/hda2 of=bootsect.lnx bs=512 count=1". Choose the location of the the boot sector instead of /dev/hda2 -- you can usually figure that out from /boot/grub/grub.conf. Copy the bootsect.lnx file to acd.ucar.edu or another Unix machine. Then from Windows ftp the bootsect.lnx file to c:\bootsect.lnx.
  10. Finally, log in and set the Linux environment up for the end user:

Installing from PXE Boot

  1. Configure the BIOS of the machine so that the ethernet PXE boot option is turned on. This varies among platforms, but on Dell systems, I have found that for the onboard ethernet, you find where it is enabled, press right arrow and then a "PXE" option is added.
  2. Configure the boot order to boot from the Network NIC (PXE) first. Or on some Dell systems you can press F12 at boot time to specify a specific boot device.
  3. Once you boot from PXE, the procedure is the same as above -- the menus are more or less the same, except that we password protect Partition magic as of 5/27/2003 with the CIT ACDAdmin account password in use at that time.