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
- The Linux environment will use the CUPS print server dns1.acd.ucar.edu as
a print server.
- Users may use their CIT password due to Kerberos authentication against
the CIT domain (set up by the kickstart scripts).
- It is a good idea to log in as the end-user and set up their Mozilla
and email preferences.
- Gnome is the default environment, and the only environment for which
our kickstart provides configurations.
- Default Gnome configurations set an end-user up with a few basic icons
the first time he/she logs in. One icon is an xterm to acd.ucar.edu.
- The kickstart will create a minimal floppy disk based boot image at
the end. The best way to accomodate that is to boot from the CD, launch the
install, and while the install is progressing, put a blank formatted floppy
disk in the drive. If the PC has no floppy, the postinstall will just end
when making the attempt to create the floppy (at the end of the script).
- GRUB is used as the boot loader, and on the partition on which Linux
is installed (as opposed to the boot sector of the disk itself).
Preparing for an install
- Make sure a static DHCP entry exists for the machine as described in
"DHCP settings" above.
- 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
- 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.
- 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]
- You may need to run Partition Magic to either:
- Create a /boot partition at the beginning of the drive (256MB in size)
- Resize an existing Windows partition to make room for Linux.
- Reboot after using Partition magic (if you use partition magic)
- Select option 1 -- kickstart for Redhat Linux 9.
- Choose the option to manually configure the partition tables.
[screen shot]
- Create a 256MB primary partition at the beginning of the disk (or a disk)
for /boot
- The Windows partition can be the active partition.
- Create a 7.5GB (primary if possible) partition for /.
- Create a 2040MB partition for Swap. You can increase performance
by creating additional such swap partitions on separate drives.
- Create a /home partition that uses the remainder of the drive.
[screen shot]
- 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.
- 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.
- 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.
- 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].
- 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.
- Finally, log in and set the Linux environment up for the end user:
- Add them to /etc/sudoers
- Give them an account if it isn't already set up. Log in as them and
configure their Gnome and Mozilla environment as you wish. Usually we want
to set up Mozilla Mail for them so that they are reading mail from our
IMAP server.
Installing from PXE Boot
- 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.
- 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.
- 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.