Network HTTP Installation of SME - HowTo

Author:  John H. Bennett III <bennettj@thebennetthome.com>
Contributor:
  
Release supported:
SME 5.6, 6.x
License: GPL
Last updated: Monday, March 29, 2004 08:55 PM


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


STEP 1:   HTTP server prep

You need to copy the SME or Contribs.org CD to a HTTP server that is accessible. 

STEP 2:  Bootdisk Creation

First you must create a network bootdisk:  This can be done from a Windows or Linux machine.

1. Creation from a Windows machine

Insert Floppy and SME CD into a windows PC
Change to the dosutils directory on the CD -
type: rawrite
Follow prompts

OR

Insert Floppy and SME CD into a windows PC
Change to the dosutils directory on the CD -
type rawrite -f ..\images\bootnet.img -d a: 

OR

Use the GUI located in the dosutils\rawritewin directory on the CD.

Insert Floppy and SME CD into a windows PC
Change to the images directoryon the CD,  and click on rawritewin
highlight write and choose bootnet.img in the images directory

2. Creation from SME server

Mount SME CD-ROM on server (mount /dev/cdrom)
dd if=/mnt/cdrom/images/bootnet.img of=/dev/fd0


Note: You must do this for every new release.


STEP 3: syslinux.cfg Modification   

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

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)
implicit 0          -    Will not load a kernel image unless it is named in a label statement  (This is the default when using bootnet.img)
timeout 600     -     How long to wait, in seconds, for any input before proceeding with the default action
default local     -     The default action to take if the enter key is pressed or if the timeout value expires
display boot.msg     -     This option enables the display of the boot.msg file                       (This is optional)
F1 boot.msg           -     If the user presses the F1 key, it will display the boot.msg file        (This is optional)
F2 options.msg       -     If the user presses the F2 key, it will display the options.msg file     (This is optional)


label local
kernel vmlinuz
# NEW INSTALL VIA LOCAL HTTP - DEFAULT
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 devfs=nomount ramdisk_size=8192

label public
kernel vmlinuz
# NEW INSTALL VIA PUBLIC HTTP
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 devfs=nomount ramdisk_size=8192

label uplocal
kernel vmlinuz
# UPGRADE TO 6.X - VIA LOCAL HTTP
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 devfs=nomount ramdisk_size=8192

label uppublic
kernel vmlinuz
# UPGRADE TO 6.X - VIA PUBLIC HTTP
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 devfs=nomount ramdisk_size=8192

label localks
kernel vmlinuz
# USE KS.CFG ON FLOPPY VIA HTTP - NEW INSTALL
append initrd=initrd.img ks=floppy class=kickstart text devfs=nomount ramdisk_size=8192

label upks
kernel vmlinuz
# USE KS.CFG ON FLOPPY VIA HTTP - UPGRADE TO 6.X NEED TO FIX
append initrd=initrd.img ks=ks_stub.cfg class=kickstart text devfs=nomount ramdisk_size=8192

Note: As you can see I have 6 boot options I can choose from.  The only things that are different will be the IP address of my HTTP server, the location of the CD-ROM image files on the HTTP server, the name of the kickstart configuration file that will be used during the install or upgrade, and the network interface to use for the install. - This is optional.


STEP 4: boot.msg

boot.msg is a file that can be displayed upon initial boot up from the diskette.  On a normal SME installation, this file isn't displayed, but it is on the boot disk.  You can modify this file or create a new one to suit your needs.  It can be made to display by modifying the syslinux.cfg.  Below is the boot.msg file from a SME boot disk.  This is entirely optional.

0f 0e Welcome to the Contribs.org SME Server install program!
Copyright (c) 2003 Contribs.org
www.contribs.org/

0fThis program can install or upgrade your Contribs.org SME Server.
Once operational, your computer will be running an alpha test version of
the SME Server software.

0c This Alpha release is only for developer testing.

0fOnly install this release on a test server. Do not proceed unless you
really know what you are doing, and have read the documentation.

0c If you do not wish to proceed, remove the Contribs.org SME Server CDROM
(and floppy disk if required) immediately and restart your computer.

0fPlease note anything at all which you consider out of the ordinary
or unexpected, and report in detail to bugs@contribs.org (and only there).

0c THIS IS AN ALPHA TEST VERSION. IT COMES WITH NO WARRANTY, AND DOES HAVE
KNOWN FAULTS. INSTALL ON A TEST SERVER AND DO NOT USE WITH PRODUCTION DATA.

09Please press F2 to read further instructions.
 

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


 STEP 5: options.msg Creation

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 syslinux.cfg and changing the display line to read display options.msg.  This is entirely optional. Below is an example of what my options.msg looks like:


09SME Installer Boot Options 07



- For a new install via HTTP to the local site,
type: 0flocal <ENTER> 07.

- For a new install via HTTP to the public site,
type: 0fpublic <ENTER> 07.

- To upgrade to SME 6.x via HTTP to the local site,
type: 0fuplocal <ENTER> 07.

- To upgrade to SME 6.x via HTTP to the public site,
type: 0fuppublic <ENTER> 07.

The default install uses the top option!





03[F1-Main] [F2-Options] 07

Note: The control characters in front of some of the words change the color of the text.  Also notice that I am only displaying 4 of the 6 install options.

In my testing, I found that you could name this file anything you wanted as long as you referenced it correctly in the syslinux.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 and from some information contained in the ks_stub.cfg file, then slightly modified to suit my needs for new installs.

 

install
url --url http://IP_Address_or_Doman_name_of_Server/location_of_CD-ROM_image_files - Added for my install
lang en_US   - added for my install
langsupport --default en_US  - added for my install

keyboard us  - added for my install
mouse none
skipx
network --bootproto dhcp  - added for my install to use use DHCP for address assignment
#network --bootproto static --ip 10.10.10.25 --netmask 255.255.0.0 --gateway 10.10.10.20 --nameserver 10.10.10.20
rootpw --iscrypted $1$GÅûÓøÔèê$jWK/s8WgbjQJRyQUS3B0d1
firewall --disabled
auth --enableshadow --enablemd5
timezone --utc America/Chicago  - added the specific timezone I am in.
bootloader --useLilo --linear --location=mbr
# 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
zerombr yes
clearpart --all --initlabel
part /boot --fstype ext3 --size=100 --ondisk 0 (Change this to 250 for SME 6.5)
part swap --size=256 --ondisk 0 (Change this to 1024 for SME 6.5)
part / --fstype ext3 --size=200 --grow --ondisk 0 (Change this to 750 for SME6.5)

%packages
@ Base

%post

# set up initial configuration
/sbin/e-smith/signal-event post-install

# add comment to /etc/motd
echo "Welcome SME Server" > /etc/motd


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. 

Note: There are some posts on the forums that suggest you upgrade to 5.6 first, then upgrade to 6.x.

#------------------------------------------------------------
# kickstart file for Mitel Networks SME Server
# Copyright (c) 2002 Mitel Networks Corporation
#------------------------------------------------------------

# install method
#cdrom
url --url http://IP_Address_or_Doman_name_of_Server/location_of_CD-ROM_image_files - Added for my install
lang en_US - added for my install
#langsupport --default en_US - added for my install
mouse none
keyboard us
# networking
network --bootproto dhcp - added for my install to use use DHCP for address assignment
#network --bootproto static --ip 192.168.1.1 --netmask 255.255.255.0 --gateway 192.168.1.2 --nameserver 127.0.0.1
# boot loader
lilo --location mbr

%packages

%post
 


STEP 5:  Final Words of Wisdon

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 6.x. environment

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

Press Enter to accept End User License Agreement
Choose which Ethernet interface to use for the install - You will get this prompt only if you have more than 1 NIC in your server and did not use the ksdevice paramenter noted above.
Type reinstall, then enter
Select Yes or No to create a boot diskette
Click OK to reboot

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

Press Enter to accept End User License Agreement
Choose which Ethernet interface to use for the install - You will get this prompt only if you have more than 1 NIC in your server and did not use the ksdevice paramenter noted above.
Type upgrade, then enter
Select Yes or No to create a boot diskette
Click 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.