Skip to content
Olivier LAHAYE edited this page Nov 21, 2018 · 66 revisions

Quick start guide for SystemImager v5 pre

Requirements

Configurations

  • /etc/systemimager/systemimager.conf => Check if all default values suit your needs and filesystem hierarchy is correct.

  • DHCP

    • /usr/sbin/si_mkdhcpserver => This will produce a /etc/dhcp/dhcpd.conf file. Check it and tweak it for your needs, then restart the dhcpd service on systemd: systemctl restart dhcpd.service on init.d: service dhcpd restart
  • PXE

    • /usr/sbin/si_mkbootserver
  • Rsync

    • si_mkrsyncd_conf (you should have /etc/systemimager/rsync_stubs/40<yourimagename> created, /etc/systemimager/rsyncd.conf updated and rsync daemon running the systemimager rsync configuration.)
  • Systemimager parameters: => Systemimager supports multiple ways to specify parameters.

    • DHCP options traditional way, but it only supports few parameters: image-server, log-server-port, ssh-download-url, flamethrower-directory-port-base and tmpfs-staging

    • PXE cmdline just like any dracut based initramfs, systemimager supports cmdline parameters all starting with the "si." prefix. => see SystemImager imager parameters.

    • configs directory: /var/lib/systemimager/scripts/configs/ it contains files with systemimager variables similar to local.cfg except that it's not local ;-) The file is retreived once network is established. it is either specified using the si.config= PXE cmdline parameter or if a ${IMAGENAME}.conf exists in this directory, then it is read. example: see template

    • disks-layouts directory: /var/lib/systemimager/scripts/disks-layouts it contains files with disks layout in xml format. man autoinstallscript.conf for description of format. example (complex one)

    • local.cfg (deprecated but still supported) Same as above except it is read from old hard drive or from a floppy (USB stick will be supported later). example: /usr/share/doc/systemimager-server/local.cfg

Creating the image

  • Using golden client and si_getimage
  • Using mksiimage from systeminstaller-oscar package

Deploying the image

  • Prerequisites:
    • dhcp server is up and running
    • rsyncd is up and running
    • an image exists in /var/lib/systemimager/images/<imagename>
    • a disk layout exists in /var/lib/systemimager/scripts/disks-layouts/<name>.xml
    • at least si.config= is set in pxe cmdline and a /var/lib/systemimager/scripts/configs/<name>.conf exists and has $IMAGENAME set or si.image-name= is set in pxe cmdline
    • no firewall blocks rsync and other systemimager ports
  • boot the client using PXE (usually, if PXE boot is not default, pressing F12 at bios boot enables PXE boot). In PXE menu, choose the appropriate entry you've defined. It should load systemimager imager initramfs.
    • steps performed by the imager:
      • parse cmdline parameters (defined in PXE kernel cmdline)
      • runs pre-install scripts if any
      • format disk (and mount partitions to /sysroot)
      • runs main-install if one is defined or if a scrit name matches hostname
      • download image to disk
      • install any mdraid or/and lvm configs in imaged system
      • installs bootloader
      • runs post-install scripts
      • Unmount /sysroot and its dependancies
      • execute post imaging action (either wait, reboot, shutdown of finish booting if modules installed on client matche imager kenrel).

Monitoring the deployment

  • si_monitor_tk Runs this command from server to see imaging progress and see remotely what the console prints on the client being imaged (requires an X11 display).

More

  • recreating a new systemimager boot initrd can be done using si_mkbootpackage (can be useful when a new kernel or new firmwares are made available by bistro).

Clone this wiki locally