Network HTTP Installation of SME Server 7.x - HowTo - Draft

Author:  John H. Bennett III <bennettj@johnbennettservices.com>
Contributor:
  
Release supported:
SME 7.x
License: GPL
Last updated: Wednesday, September 06, 2006 08:18 AM


Problem:  You would like a way to install or upgrade your SME server via HTTP. 
Solution:
  Follow this HowTo.


Assumptions:
        You have two hard drives already installed in the server.

To do's:
        Further testing of upgrades - Seems to work fine on my test servers for software RAID 1
        Test with only 1 hard drive
        Test with 3 hardrives (raid 5)

        Test with 4 or more harddrives (raid 6)


STEP 1:   HTTP server preperation

You need to copy the SME Server 7.x CD to a HTTP server that is accessible.  I created an Ibay called sme7.

After you copy the files, m
ake sure to:
chown -R admin.www *
chmod -R 750 *

STEP 2:  Files Preparation

For this network install to work with SME Server 7.x, you will need to make and use a bootable CD.
First you need to extract the directory isolinux from the /images/boot.iso file.  This can be in a few ways. 
I tested with winimage, isobuster, and by creating a cd  from the boot.iso.

Next, you need to copy the extracted directory to your SME or other RHEL server.


STEP 3: isolinux.cfg Modification   

ioslinux.cfg is the file that determines what to do once the system is booted from cd.  Below is an example of what mine looks like with IP's removed and with comments added.

default linux     -     The default action to take if the enter key is pressed or if the timeout value expires
prompt 1         -     Provides the option to use an alternate install method based on the values of the labels.  (If you provide a value of 0, then the default action is automatically selected)
timeout 600     -     How long to wait, in seconds, for any input before proceeding with the default action
display boot.msg     -     This option enables the display of the boot.msg file                      
F1 boot.msg           -     If the user presses the F1 key, it will display the boot.msg file      
F2 options.msg       -     If the user presses the F2 key, it will display the options.msg file     (This appears to be optional)
F3 general.msg       -     If the user presses the F3 key, it will display the general.msg file     (This appears to be optional)
F4 param.msg        -     If the user presses the F4 key, it will display the param.msg file       (This appears to be optional)
F5 rescue.msg        -     If the user presses the F5 key, it will display the rescue.msg file      (This appears to be optional)
F7 snake.msg         -     If the user presses the F7 key, it will display the snake.msg file       (This appears to be optional)

label linux
kernel vmlinuz
append initrd=initrd.img ks=http://IP_Address_or_Doman_name_of_Server/location_of_CD-ROM_image_files/Kickstart_file.cfg ksdevice=eth0 class=kickstart ramdisk_size=8192
label i586
kernel vmlzi586
append initrd=initi586.img ramdisk_size=8192
label text
kernel vmlinuz
append initrd=initrd.img ks=http://IP_Address_or_Doman_name_of_Server/location_of_CD-ROM_image_files/Kickstart_file.cfg ksdevice=eth0 class=kickstart text ramdisk_size=8192
label expert
kernel vmlinuz
append expert initrd=initrd.img ramdisk_size=8192
label ks
kernel vmlinuz
append ks initrd=initrd.img ramdisk_size=8192
label lowres
kernel vmlinuz
append initrd=initrd.img lowres ramdisk_size=8192
label local
localboot 1
label memtest86
kernel memtest
append -
label upgrade
kernel vmlinuz
append initrd=initrd.img ks=http://IP_Address_or_Doman_name_of_Server/location_of_CD-ROM_image_files/Kickstart_file.cfg ksdevice=eth0 class=kickstart ramdisk_size=8192
label uptext
kernel vmlinuz
append initrd=initrd.img ks=http://IP_Address_or_Doman_name_of_Server/location_of_CD-ROM_image_files/Kickstart_file.cfg ksdevice=eth0 class=kickstart text ramdisk_size=8192
 

Legend:
Location of the CD-ROM image files on the HTTP server
Name of the kickstart configuration file that will be used during the install or upgrade
Network interface to use for the install. - This is optional.
Use text based install method.  Remove text for gui install (SME 7.x only)

Note: As you can see I have 10 boot options I can choose from.  The major differences are the name of the kickstart configuration file that will be used during the install or upgrade, and whether to install via the GUI or text method.


STEP 4: boot.msg

boot.msg is the file that is displayed upon initial boot up from CD.  You can modify this file or create a new one to suit your needs.  Below is the boot.msg file from the SME  Server Boot.iso file.


splash.lss

- To install or upgrade in graphical mode, press the 0f<ENTER> 07 key.

- To install or upgrade in graphical mode on an i586 machine,
type 0fi586 <ENTER> 07.

- To install or upgrade in text mode, type: 0flinux text <ENTER> 07.
(or for i586 machines in text mode type: 0fi586 text <ENTER> 07.)

- Use the function keys listed below for more information.

02[F1-Main] [F2-Options] [F3-General] [F4-Kernel] [F5-Rescue] 07
 

Note: The control characters in front of some of the words change the color of the text.


 STEP 5: options.msg example

You can create a file called options.msg that can be displayed and used as a menu.  You can also make this file the default when displayed at boot time by modifying isolinux.cfg and changing the display line to read display options.msg.  This is entirely optional.  Below is the options.msg file from the SME  Server Boot.iso file.

00


09Installer Boot Options 07

If installing on an i586 machine, substitute 0fi586 07 for 0flinux 07
for all the options listed on this page.

- To disable hardware probing, type: 0flinux noprobe <ENTER> 07.

- To test the install media you are using, type: 0flinux mediacheck <ENTER> 07.

- To enable rescue mode, type: 0flinux rescue <ENTER> 07.
Press 0f<F5> 07 for more information about rescue mode.

- If you have a driver disk, type: 0flinux dd <ENTER> 07.

- To prompt for the install method being used on a CD-ROM install,
type 0flinux askmethod <ENTER> 07.

- If you have an installer update disk, type: 0flinux updates <ENTER> 07.

- To test the memory in your system type: 0fmemtest86 <ENTER> 07.
(This option is only available when booting from CD.)

02[F1-Main] [F2-Options] [F3-General] [F4-Kernel] [F5-Rescue] 07
 

Note: The control characters in front of some of the words change the color of the text. 

In my testing, I found that you could name this file anything you wanted as long as you referenced it correctly in the isolinux.cfg file.  The options.msg file seemed to be the default standard used based on some research I did and also from creating boot disks from standard Red Hat 7, 8, and 9 CD's.


STEP 6: Kickstart Configuration file - New install

The configuration file for the kickstart process is what tells the system what to do during the install or upgrade process.  Below is an example of my kickstart configuration file for a new SME installation with comments added.  If you look in the root directory on a normal install, you will find a file called anaconda-ks.cfg.  The below configuration file was taken directly from that file.

install
url --url http://IP_Address_or_Doman_name_of_Server/location_of_CD-ROM_image_files - specific for my install
lang en_US.UTF-8 - specific for my install
langsupport --default=en_US.UTF-8 en_US.UTF-8 - specific for my install
keyboard us - specific for my install
network --device eth0 --bootproto dhcp - specific for my install
rootpw --iscrypted $1$REQdf/dO$hb9FaftRxtvhXCshbwM261
firewall --enabled
selinux --enforcing
authconfig --enableshadow --enablemd5
timezone --utc America/Chicago - specific for my install
bootloader --location=mbr --driveorder=sda,sdb
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
clearpart --all --initlabel
part raid.100 --size=100 --ondisk=sda --asprimary
part raid.101 --size=100 --ondisk=sdb --asprimary
part raid.111 --size=2140 --grow --ondisk=sdb
part raid.110 --size=2140 --grow --ondisk=sda
raid /boot --fstype ext3 --level=RAID1 raid.100 raid.101
raid pv.200 --fstype "physical volume (LVM)" --level=RAID1 raid.110 raid.111
volgroup main --pesize=32768 pv.200
logvol swap --fstype swap --name=swap --vgname=main --size=640 --grow --maxsize=1280
logvol / --fstype ext3 --name=root --vgname=main --size=1300 --grow

%packages
kernel
e2fsprogs
grub
mdadm
lvm2

%post

Note: I have not yet fully understood how the LVM really works, but the above settings for the partitions and volume groups seem to work fine on my test systems using either IDE or SCSI drives.  SATA drives not tested as I don't have any.
 


STEP 6a: Kickstart Configuration file - upgrade

I had some initial issues trying to get an upgrade to work.  Basically, what I did was modify the standard ks_stub.cfg file to suit my needs.  Below is an example of my kickstart configuration file for SME upgrades with comments added.  I have tested this by upgrading from SME 5.5 and 5.6. 

upgrade
url --url http://IP_Address_or_Doman_name_of_Server/location_of_CD-ROM_image_files - specific for my install
lang en_US.UTF-8 - specific for my install
langsupport --default=en_US.UTF-8 en_US.UTF-8 - specific for my install
keyboard us - specific for my install
network --device eth0 --bootproto dhcp - specific for my install
#
rootpw --iscrypted $1$REQdf/dO$hb9FaftRxtvhXCshbwM261
firewall --enabled
selinux --enforcing
authconfig --enableshadow --enablemd5
timezone --utc America/Chicago - specific for my install
bootloader --location=mbr --driveorder=sda,sdb
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
#clearpart --all --initlabel
#part raid.100 --size=100 --ondisk=sda --asprimary
#part raid.101 --size=100 --ondisk=sdb --asprimary
#part raid.111 --size=2140 --grow --ondisk=sdb
#part raid.110 --size=2140 --grow --ondisk=sda
#raid /boot --fstype ext3 --level=RAID1 raid.100 raid.101
#raid pv.200 --fstype "physical volume (LVM)" --level=RAID1 raid.110 raid.111
#volgroup main --pesize=32768 pv.200
#logvol swap --fstype swap --name=swap --vgname=main --size=640 --grow --maxsize=1280
#logvol / --fstype ext3 --name=root --vgname=main --size=1300 --grow

%packages
kernel
e2fsprogs
grub
mdadm
lvm2

%post

Note: I have not yet fully understood how the LVM really works, but the above remarks for the settings for the partitions and volume groups seem to work fine on my test systems using either IDE or SCSI drives.  SATA drives not tested as I don't have any.
 


STEP 7:  ISO Creation

Once you have your files the way you want, you need to create an ISO.  The ISO needs to be created on the Linux server referenced in step 2.

The files you should have on your linux server are:

BOOT.CAT
BOOT.MSG
CVS  <-- This is a directory, not really sure it is needed.
ENERAL.MSG
INITI586.IMG
INITRD.IMG
ISOLINUX.BIN
ISOLINUX.CFG
MEMTEST
OPTIONS.MSG
PARAM.MSG
RESCUE.MSG
SNAKE.MSG
SPLASH.LSS
TRANS.TBL
VMLINUZ
VMLZI586
 

The command to create the ISO from SME is:

mkisofs -o name_of_your.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table The_directory_where_your_files_are

Example - (mkisofs -o test.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /root/isoimage)
 


STEP 8:  Burn ISO and test

Use your favorite CD/DVD ROM burning software and burn your ISO to CD and test.

It should work, if you have followed all of the steps above.


STEP 8:  Final Words of Wisdom

That should be it.  If you follow the above examples, you should be able to create your own HTTP install or upgrade to suit your SME 7.x. environment

During an install or upgrade, you should only have to do the following:

Choose OK to reboot

Lastly, when editing the various unix-style files, it's best to either do it on a unix-type machine or use a unix editor that runs under windows. 
I used Crimson Editor, located at http://www.crimsoneditor.com/


Note: The steps listed above may not be the best way to create an HTTP installation or upgrade environment, but this is what is working for me.  There have been several inquiries on how to get this setup, so I have shared what I did to make it work for me.

References:

http://www.tldp.org/HOWTO/LVM-HOWTO/index.html
http://syslinux.zytor.com/iso.php#how