SourceForge.net Logo

Boot-image creation PDF  | Print |

Description

The "qrm-boot-image" script manages boot-images on the QRM-server. It creates boot-images from either local installed kernels, remote installed kernels, kernel-rpm packages or any other location.

Usage

Usage ./qrm-boot-image <create/clone/remove/validate/list>

./qrm-boot-image create

                   -k/--kernel-version <kernel-version-to-create-from>
                   -b/--boot-image <boot-image-name> mandatory unless flag -o used
                   -y/--physical-name <physical-name>
                   [-u/--username <username>] mandatory unless flag -o used
                   [-p/--password <password>] mandatory unless flag -o used
                   [-l/--location <path-to-/boot-and-/lib> or <local-path-to-kernel-rpm-package> or<url-to-kernel-rpm-package>]
                   [-i/--ip <ip-address-of-a-remote-system>]
                   [-f/--flags <Linux|Numa>]
                   [-t/--tmpdir <tmpdir>]
                   [-m/--with-module <kernel-module-to-include>]
                   [-a/--arch <Opteron|Any|Xeon|i686>]
                   [-s/--special_support <ISCSI>]
                   [-h/--hugemem]
                   [--smp]
                   [-c/--comments <comments>]
                   [-o/--only-physical]
                   [--initrd <path-to-initrd-template>]
                   [--help]  

Create

  • required parameters
    • -k/--kernel-version <kernel-version-to-create-from>
      The exact kernel version from which the boot-image should be created from. Tip: run "uname -r" to find out the exact kernel version.
    • -b/--boot-image <boot-image-name>
      The logical name of the boot-image on the QRM-server (can be any name contains alpha-numeric characters + "_" only)
    • -y/--physical-name <physical-name>
      The physical (file-) name of the boot-image on the QRM-server (can be any name contains alpha-numeric characters + "_" only)
  • * optional parameters

    • -l/--location <path-to-/boot-and-/lib> or <path-to-kernel-rpm-package>
      Can be either a path to a location containing [$path]/boot and [$path]/lib/modules for the kernel version to create the boot image from or it can be the full path to a valid kernel-rpm package file. In case the path to a kernel-rpm package is given the rpm-package is being unpacked in a temporary directory, then the boot-image is being created and the temporary directory is being removed again.

    • -i/--ip <ip-address-of-a-remote-system>
      This parameter can be used to capture and create a boot-image from a kernel which is installed on a remote system. The kernel files and module directory is then being transferred to a temporary directory by "rsync", then the boot-image is being created and the temporary directory is being removed. Please notice that this mechansim requires the remote sytems root password and to have the sshd daemon running on the remote system.

    • -f/--flags <Linux|Numa>
      Tags the boot-images with the given flag

    • -t/--tmpdir <tmpdir>
      The -t/--tmpdir parameter can be used to specify a temporary directory which should be
      used instead of the default tmp-dir (/tmp/)

    • -m/--with-module <kernel-module-to-include>
      This parameter allows to add user-defined kernel-modules to the intird.

    • -a/--arch <Opteron|Unknown|Xeon|i686>
      Tags the arch flag of the boot-image in the QRM-server

    • -s/--special_support <ISCSI>
      Tags the special support flag of the boot-image in the OpenQRM
    • -h/--hugemem
      Tags the boot-image with the hugemem flag
    • --smp
      Tags the boot-image with the SMP flag for multi-cpu systems
    • -o/--only-physical
      Creates the boot-image only physical
    • --initrd <path-to-initrd-template>
      Allows to use a special initrd-template for the boot-image creation.
    • -c/--comments <comments>
      Adds a comment to the boot-image

Validate

For validating and  fixing a boot-image the "validate" parameter is being used.
  •  required parameters
    • -b/--boot-image <name-of-the-boot-image>
      Same as explained above

  • optional parameters
    • -p/--physical-name <physical-name>
      Same as explained above
    • -f/--fix
      Fixes a boot-image (e.g. updates the linuxrc)

Example of Boot Image Creation

As root users perform the following tasks to create a boot image:

# /opt/qrm/bin/qrm-boot-image create --kernel-version 2.4.21-32.ELsmp --boot-image <BOOT-IMAGE-NAME> --physical-name <PHYSICAL-NAME>


Technical Details

Boot images are openQRM created packages containing a linux kernel, a System.map file, kernel modules and an initrd. Those boot-iamges are created by running the "qrm-boot-image" script on the QRM-server.

This script creates boot-images from kernels either installed locally on the OpenQRM or it can also capture and create them from kernels installed on a remote system or from a kernel RPM on the local filesystem.

When creating a boot image from a remote system,  the kernel, System.map and modules are temporarily transferred to the tmp-directory on the OpenQRM by "rsync".  For this "transfer" the root password for the remote system is needed and the remote system must run the sshd daemon. Then the boot-image is being created and the tempary files are removed.

The boot-image creation procedure copies the kernel (/boot/vmlinuz-[kernel-version]) to to BASEDIR/qrm/tftpboot/boot/vmlinuz-[boot-image-name] and its System.map (/boot/System.map-[kernel-version]) to BASEDIR/qrm/tftpboot/boot/System.map-[boot-image-name].
Then it creates a to BASEDIR/qrm/tftpboot/boot/modules-[boot-image-name].tgz package out of the kernel-modules.  Then we create the initrd for the kernel at BASEDIR/qrm/tftpboot/boot/initrd-[boot-image-name] from the initrd-template at BASEDIR/qrm/etc/templates/initrd-qrm.tgz. To avoid binary- and libc-incompatibilities between the boot- and fs-images it is recommened to use an initrd-template created on the same linux distribution/version the boot-image should be created from.

After successfully finishing the physically creation phase the qrm-boot-image util adds the new boot-image to the OpenQRM's database.

 

Comments (2)add comment

Marcello Torriani said:

 
you say: "To avoid binary- and libc-incompatibilities between the boot- and fs-images it is recommened to use an initrd-template created on the same linux distribution/version the boot-image should be created from."

how can I create my own initrd template suitable for openqrm?

I'm trying to build a virtual appliance based on ubuntu-server, but I'm stopped on this problem:
when booting it says: "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,3)"

thank you.
May 02, 2007

Matt R. said:

 
Hi Marcello,

the Debian/Ubuntu packages for openQRM still are in beta
phase and have known problems because the Debian kernels
are using cramfs instead of a normal ext2 initrd.
We did not yet solved this issue but working on it.
The current workaround is to create an initrd-template
from a non-Debian linux-system.
-> you can e.g. use one included in the rpm-packages
we provide for other distributions
The location of this initrd-template is
/opt/qrm/etc/templates/initrd-qrm.tgz
When having this template from a non-Debian distribution
you then have to also create a default "qrm" boot-image
from a non-Debian system using the qrm-boot-image util
with the -o parameter. This default boot-image should be
named "qrm" and overwrite the existing Debian-based one.
Then it openQRM will boot your nodes fine.
Again the Debian-support in openQRM is still in beta-phase
and work is in progress. Please understand that this manual
workaround is only a temporary solution.

many thanks all the best,

Matt
May 02, 2007

Write comment

security image
Write the displayed characters


busy