| 1 | Generate the mini Linux distribution file
|
|---|
| 2 | -----------------------------------------
|
|---|
| 3 |
|
|---|
| 4 | First step is to generate the ext3fs.img file that contains the mini Linux
|
|---|
| 5 | distribution to boot the system and run the SSSTK capture/deploy scripts.
|
|---|
| 6 | YUM will download the required packages from the repositories configured on the
|
|---|
| 7 | host.
|
|---|
| 8 | Repositories providing RHEL 6.1 and HP packages have to be configured on the
|
|---|
| 9 | host.
|
|---|
| 10 | The ext3fs.img generation process requires 900MB of free disk space.
|
|---|
| 11 |
|
|---|
| 12 | The script is located in '/opt/setupkey':
|
|---|
| 13 |
|
|---|
| 14 | $ ./rpmbootstrap.sh
|
|---|
| 15 |
|
|---|
| 16 | Will generate:
|
|---|
| 17 | - ext3fs.img: 900MB file containing the mini Linux distribution.
|
|---|
| 18 | - vmlinuz: the kernel that will be used by the syslinux boot process
|
|---|
| 19 | - initramfs.img: bootstrap image created by dracut.
|
|---|
| 20 |
|
|---|
| 21 | Once the 3 above files have been generated, USB keys can be created.
|
|---|
| 22 |
|
|---|
| 23 | Generate the bootable USB key
|
|---|
| 24 | -----------------------------
|
|---|
| 25 |
|
|---|
| 26 | To generate the USB key using this script, the following tools have to be
|
|---|
| 27 | installed on your system and in your PATH:
|
|---|
| 28 | - dd, cat, which, sync, grep, sleep, mkdir, rm, mount, umount
|
|---|
| 29 | - sfdisk
|
|---|
| 30 | - mkfs.vfat
|
|---|
| 31 | - mktemp
|
|---|
| 32 | - syslinux
|
|---|
| 33 | - mksquashfs
|
|---|
| 34 |
|
|---|
| 35 | The script requires one single argument. The path to the USB key device.
|
|---|
| 36 |
|
|---|
| 37 | ./mkusbkey.sh <usbdev>
|
|---|
| 38 |
|
|---|
| 39 | The script can also be used with loopback devices (i.e. /dev/loop0) if the
|
|---|
| 40 | loopback device is associated with a raw file.
|
|---|
| 41 |
|
|---|
| 42 | For example:
|
|---|
| 43 |
|
|---|
| 44 | $ dd if=/dev/zero of=/tmp/usbdev.img bs=1M count=400
|
|---|
| 45 | $ losetup -fv /tmp/usbdev.img
|
|---|
| 46 | $ ./mkusbkey.sh /dev/loop0
|
|---|
| 47 |
|
|---|
| 48 | It can be used for test purposes with virtual machines but it will not work
|
|---|
| 49 | with iLO virtual media as it requires the USB key to be mounted RW to save
|
|---|
| 50 | config files and logs and the iLO Virtual Media only allows it mounted RO.
|
|---|
| 51 |
|
|---|
| 52 | Using the USB key
|
|---|
| 53 | -----------------
|
|---|
| 54 |
|
|---|
| 55 | The USB key proposes 5 different menu entries:
|
|---|
| 56 | - capture: to capture the BIOS (data_files/conrep.dat), Smart Array RAID
|
|---|
| 57 | (data_files/cpqacuxe.dat) and iLO configurations (data_files/hponcfg.dat)
|
|---|
| 58 | - deploy: to deploy previously captured BIOS, Smart Array RAID and iLO
|
|---|
| 59 | configurations
|
|---|
| 60 | - interactive: gives you access to an interactive shell from which individual
|
|---|
| 61 | script can be run.
|
|---|
| 62 | - ilo: to deploy a very basic and well known iLO configuration. This configura-
|
|---|
| 63 | tion can be found in data_files/ilo.dat
|
|---|
| 64 | - fw: to install the firmware in the fw folder
|
|---|
| 65 |
|
|---|
| 66 | !!!!CAUTION!!!! The deploy script is the one that is loaded by default.
|
|---|
| 67 | Be sure you have access to a console with a keyboard is you want to do anything
|
|---|
| 68 | else than deploy operation.
|
|---|
| 69 |
|
|---|
| 70 | capture:
|
|---|
| 71 | --------
|
|---|
| 72 | The captured configuration files are stored on the USB key in data_files
|
|---|
| 73 | folder:
|
|---|
| 74 | - BIOS -> data_files/conrep.dat
|
|---|
| 75 | - Smart Array RAID -> data_files/cpqacuxe.dat
|
|---|
| 76 | - iLO configurations -> data_files/hponcfg.dat
|
|---|
| 77 | and the logs in the log folder (i.e log/capture-20112006-1054.log).
|
|---|
| 78 |
|
|---|
| 79 | deploy:
|
|---|
| 80 | -------
|
|---|
| 81 | The deploy entry takes the configuration files in data_files folder and deploys
|
|---|
| 82 | them on the target server.
|
|---|
| 83 | The BIOS and Smart Array configurations are deploy as they are on the USB key.
|
|---|
| 84 | Some cleanup is performed on the iLO config file before it is deployed.
|
|---|
| 85 | The ADD_USER XML entries are removed.
|
|---|
| 86 | The SSO entry is also removed.
|
|---|
| 87 | Variables substitution is also done by a python script. The variables are
|
|---|
| 88 | defined in the config/ilo file on the USB key.
|
|---|
| 89 | There are currently 5 variable that can be customized:
|
|---|
| 90 | Lines beginning with a "#" will be ignored.
|
|---|
| 91 | - ECF_IP: The IP of the iLO interface
|
|---|
| 92 | - ECF_NETMASK: The IP netmask
|
|---|
| 93 | - ECF_GW: The IP gateway
|
|---|
| 94 | - ECF_LICENCE: The iLO extended licence that should be associated to the iLO
|
|---|
| 95 | interface
|
|---|
| 96 | - ECF_ADMIN_PASSWD: The new iLO Administrator's password.
|
|---|
| 97 |
|
|---|
| 98 | interactive:
|
|---|
| 99 | ------------
|
|---|
| 100 | Will boot the system and give access to a bash console from which all the
|
|---|
| 101 | scripts and files on the USB key can be accessed.
|
|---|
| 102 | Capture and deploy scripts are located in /ssstk.
|
|---|
| 103 |
|
|---|
| 104 | ilo:
|
|---|
| 105 | ----
|
|---|
| 106 | This entry will ONLY deploy the iLO configuration defined in
|
|---|
| 107 | data_files/ilo.dat. The BIOS and RAID configurations will remain untouched.
|
|---|
| 108 | The ilo.dat file is applied as it is. No variable substitution.
|
|---|
| 109 |
|
|---|
| 110 | fw:
|
|---|
| 111 | ---
|
|---|
| 112 | Deploy the firmware files located in the fs/ folder on the USB key.
|
|---|