Candela Technologies Logo
Network Testing and Emulation Solutions

Install Script

Goal: Install and reconfigure your LANforge server with the script.

The script can configure a majority of Linux OS features that LANforge requires changes to. This includes:
  • Disabling SELinux
  • Disableing firewall
  • Downloading dnf and LANforce updates
  • Adding VNC and RDP access
  • Adding firmware
  • Disabling or reconfiguring NetworkManager
  • Enabling serial console
  • Modifying kernel options for iommu, pci-aer and kernel memory
  • ...and more...

Usage --lfver {lanforge version} --kver {kernel version} {command}
Note: the parameters --do_kern and --do_grub requires the --kver option to specify the kernel version. Candelatech Linux kernels end with "+" to denote extra patches. Use --debug|--verbose|-d to enable debugging.
 Example: ./ --kver 3.5.7+ --lfver 5.2.7 --do_lanforge
Please refer to the Install Guide and the options reference:
• Install guide:
• Reference:

Common Options

This message.
Specify LANforge version (i.e., 5.2.6)
Specify kernel version, use a + at the end of kernel versions for Candelatech kernels
Use a proxy for curl, e.g. http://%user:%password@%proxy-ip:%port
Enables all options except: --xrandr, --runlevel
Also --do_update. Upgrades LANforge software, kernel, firmware, packages and OS packages. No system settings altered. Skips cpu-burn.
Installs LANforge software ONLY, i.e. no kernel installed. No system settings altered.
Download and install ath10k 802.11AC NIC firmware.
Install the kernel via download or --source_dir. Enables 'do_grub' option.
Show advanced options
Avoid doing pip upgrades; might be necessary if you have proxies
Don't yum update packages, or install new ones.

Please refer to the Install Guide and the options reference:
• Install guide:
• Reference:

Advanced Options

Also -g. Acknowledge that your licenses are out of date to continue updates
creates a series of files in /var/www/html accessable using the url /slug_list.html
configures an /etc/hosts entry lanforge-srv that matches the ip address of the mgt_dev in /home/lanforge/config.values. Updates the /etc/httpd or /etc/apache2 files to bind to that address. Use this option each time you change the mgt_dev.
Clone and build scrcpy tool (should not be needed for latest 5.4.6 builds)
Also: --build_path. This path is appended directly after the --download_from hostname. The default download path will not be used. The string $lfver will not be inserted. Build paths will not adhere to a directory pattern, use the full path.
Also: --bundle_dir. Specify a directory that the bundle archive should be created in. Use this is to keep bundles from being written to the tmp_dir or src_dir
Also: --install_bundle, --create_bundle, --create_tarball Create a tarball in tmp_dir for copying to another LANforge system, will infer --osver, --osveri for current system unless you specify --force_osver, --force_osveri
adds user lanforge and directory /home/lanforge create:pypirc: create pypirc file
Also --make_raid, --create_lvm, --make_lvm [drive1,drive2...] Turn two or more blank drives into a mirrored LVM filesystem If there have been filesystems installed on these drives before, use --wipe_raid to remove the filesystems.
 Example: ./ --make_raid nvme0n1p1,nvme1n1p1
Also --com_speed. Specify serial com speed (defaults to 115200)
Specify the serial com port (defaults to ttyS0)
turn this help into HTML text for publication
Also -d, --verbose. Enable extra output.
Affects kernel audit messages. Use with --do_grub and reboot to have this setting take effect.
  0: enable kernel audit logs (auditd.service not enabled)
  1: disable kernel audit logs
change NetworkManager dns=systemd-resolved to dns=default and disable systemd-resolved.service
Enables all options except: --xrandr, --biosdevname, --runlevel, and --serial Skips the CPU burn-in test.
create cronjob that erases systemd slices from logged out sessions every hour (might have occurred between F24-F27)
Enable biosdevname for interface names (uses terms like enp0s1 instead of eth0). Only takes affect when --do_grub is enabled.
  0: Disabled
  1: Enabled
  -1: Use current settings (default)
Configure cma buffer for extra VRF buffer space. Use with --do_grub, applies on reboot. Use these choices:
  -1: do not change
  0: disable
  1: apply 64 megabyte value
  >1: apply this value in megabytes
 Example: --do_grub --do_cma 48
Attemps the CPU burn task. NOTE: The --skip_cpu_burn flag below has precedence.
  0: Do not attempt it.
  1: Do it if we have not already run it on this system previously.
  2: Always run it.
  >10: Run CPU burn test for specified seconds.
Download and install LANforge software and kernel only. Enables 'do_lanforge do_kern do_grub do_http do_selinux=0 do_iommu=0 do_firmware' No yum update. No system settings altered, except for selinux and iommu.
Download and install LANforge software but only update grub to point to an already installed kernel. Enables 'do_lanforge do_grub do_http do_selinux=0 do_iommu=0 do_firmware' No system settings altered, except for selinux and iommu.
install cups-pdf package
Also: --disk_test. Fill and re-read disk to prove read errors?
  0: Do not attempt it
  1: Do it if /home/lanforge/did_disktest not found unless --skip_disk_test specified
  >1: Always run it, ignoring --skip_disk_test
Add kernel option elevator=noop (i.e. not deadline) for single SSD CFQ optimisation.
  0: Disabled
  1: Enabled
  -1: Use current settings (default) Only takes affect when do_grub is enabled.
Select this option if your URLs are unable to provide your repository because the content has been moved to This option is pretty much opposite of --do_restore_metalinks.
write /etc/sysctl.d/70-lanforge.conf and apply agressive zram configuration (Fedora >= 30) To undo, remove file and reboot.
Select this option to use the fedrepos default command if your yum.repos.d repository URLs have become misconfigured. If fedrepos is not available, consider --do_restore_metalinks option.
updates Firefox Homepage
Tweak gnome settings (enble desktop icons, etc)
Modify the grub config files to boot the specified kernel.
Start GUI in VNC server session which starts on boot. Requires LANforgeGUI of specified version to already be installed.
  0: disable GUI autostart
  1: enable GUI autostart
Build keys, configure apache ssl and other actions to enable this system to act as an HS20-R2 server. Requires specific LANforge configuration as well before this will actually work. This option must be explicitly enabled: It is not enable as part of any of the other option groupings.
Serve LANforge related files at http://localhost
Erase the network settings and dnf cache in preparation for making a disk image for a clone. Expects /root/
installs LANforge server, GUI, firmware and required packages on system to sufficient to allow it to be a resource in a LANforge cluster. Right now, this focuses on Ubuntu based systems. This also will configure Networkmanager to ignore ports except the management interface. We cannot necessarily disable NM on interop equipment.
Configure system to enable/disable intel_iommu. This kernel feature decreases performance, so LANforge typically wants this disabled for optimal Ethernet performance. This can also be disabled in the BIOS by disabling the VT-d option and IOMMU options.
  0: Disabled (default for do_all_ct, do_all, do_ct_swak, do_ct_st)
  1: Enabled
  -1: Use current settings (default) Only takes affect when do_grub is enabled. IOMMU is useful in these conditions: * virtual machine hosting * MediaTek radios * Ath10k radios
Configure kernel option for kmemleak. Requires kernel to be compiled with appropriate options to actually enable this.
  0: Disabled
  1: Enabled
  -1: Use current settings (default) Only takes affect when do_grub is enabled.
Configure kernel console logging level. Requires --do_grub.
  0: Disabled (removes grub bootline parameter)
  >0: Adds loglevel=[value] bootline parameter)
  -1: Use current settings (DEFAULT) NOTE: This may be overriden by /etc/sysrq.d/lanforge.conf kernel.printk sysctl
Also --md. Specify the device to dedicate with management network. Use this with --do_sys_reconfig.
Configure system to enable/disable pci error reporting. Requires --do_grub.
  0: Disabled (removes grub bootline parameter)
  1: Enabled (adds pci=noaer bootline parameter, DEFAULT)
  -1: Use current settings
Configure system to enable/disable spectre and related mitigations. We try to compile out most of these security features since LANforge is not designed to be secure and performance is more important to us. To help make sure all of these mitigations are disabled, we will also pass command-line args to the kernel on bootup to request disabling mitigations. Default is '1'.
  0: Do not add the mitigations=off option
  1: Do add the mitigations=off (default)
  -1: Use current settings Only takes affect when do_grub is enabled.
Only install packages (and groups) and exit. Use when creating VMs or if you want to install all distro packages and reboot before proceeding. If you want to download everything needed, install yum packages for development imaging:
  1) touch /home/lanforge/did_cpuburn /home/lanforge/did_disktest
  2) ./ --lfver ___ --kver ___ --do_selinux=0 --skip_yum_all
  3) ./ --lfver ___ --kver ___ --skip_yum_all --do_all_ct --force_web \
--tmp_dir /home/lanforge/Downloads --download_from http://ctdownloads/ --download_only
  4) reboot
  5) ./ --lfver ___ --kver ___ --do_only_pkgs
  6) poweroff and make your snapshot
Install packages from Internet needed by LANforge.
Use the following two options to print a label with model and mac address information
  1) print_host: hostname owning printer
  2) print_queue: name of print queue, often 'QL-800' or 'LaserWriter-450'
  3) serialno: provide the serial number for chassis, or use 'HOSTNAME'
 Example: --do_print_label --print_host --print_queue QL-800 --serialno HOSTNAME
Install and configure radius server (with default values).
for downloading install files necessary to host new releases on the system. These files are placed in /var/www/html/downloads and /var/www/html/private/downloads. In the GUI Release Mgr tab, Download From can list or whatever the mananagement port IP is.
Select this option if you see errors like below:
  1) Repository updates-debuginfo has no mirror or baseurl set.
  2) Repository updates-source has no mirror or baseurl set.
  3) Repository fedora-debuginfo has no mirror or baseurl set.
  4) Repository fedora-source has no mirror or baseurl set.
  5) Error: Failed to synchronize cache for repo 'updates'
  6) Your /etc/yum.repos.d repo files have had changes and are unable to reach
removed in 5.4.8, udev rules are now created automatically
Configure system to run-level 3 or 5
  0: Use current settings (do nothing)
  3: Set to use runlevel 3 (non graphical login)
  5: Set to use runlevel 5 (graphical login, needed for cinnamon)
  1: Yum update then save cache.
  20: Delete local cache first then update and save.
Configure selinux (it conflicts with LANforge.) do_grub should also be enabled to modify the kernel boot commands.
  0: Disabled (default, if do_all and related options are selected)
  1: Enabled
  -1: Use current settings
Enable serial console configuration in grub.
  0: Disabled
  1: Enabled
  -1: Use current settings (default) Only takes affect when do_grub is enabled.
Enable/Disable services to work well with LANforge.
Enable/Disable SLUB memory debugging (at least on debugging kernels) Use with --do_grub, applies on reboot. Use these choices:
  -1: do not change
  0: disable
  1: enable slub debugging
 Example: --do_grub --do_slub_debug 1
Modify rw behaviour for SSDs in /etc/fstab.
Attempt to re-configure system config files. Only works on certain platforms (APU2, Jetway, Noah2, Axiomtek)
Create /etc/udev/rules.d/70-persistent-net.rules file if it does not already exist. It may still need hand-editing.
Erase the network settings and dnf cache in preparation for making a OVA image. Expects /root/
forces --do_sys_reconfig to run, looking for enpX interfaces and no radios
Configure VNC for user lanforge.
installs and configures LANforge WebUI components. Fedora-34 and higher.
Add work-around to disable LVDS1 using xrandr. This works around Gnome issues on the Lanner WiFi appliances, and perhaps other systems.
should we adjust the xrdp.ini and sesman.ini files:
  0: ignore files
  1: adjust files
Update OS packages from Internet. Does yum --upgrade or dnf --upgrade or apt-get upgrade.
Also: --from, --download_host. Specify web url to download LANforge packages from. Implies --force_web.
Download files to tmp-dir, but do not install them or make other changes.
shortcut for downloading Candelatech videos into /var/www/html/videos so that they might be served for video testing. See /usr/local/lanforge/nginx/ for stanza when enabling directory listings when using nginx.
Enable do_http and reset the /etc/httpd/httpd.conf DocumentRoot and Directory from /home/lanforge/candela_cdrom to /var/www/html
Re-generate the HotSpot 2.0 R2 (HS20-R2) and/or RADIUS certs, even if we have previously created them.
Force creating lfnotes.html
Override the detected osver string with this value.
Override the detected osversion integer with this value.
Force script to use webserver. Do not use with --source_dir.
IP Address to advertise as HS20 servers. This could be IP address of management port in simple configurations, and for more realistic configurations, perhaps the IP address of something in same network as the HS20 OSEN and .1x APs.
Specify the hardware string: CT521, CT52x-PR, CT521, CT520, LF0202, CT523, CT523c, CT314, LF0312, LF0313, CT522 Can help with html info page configuration. Leave blank if unsure.
Ignore any (otherwise fatal) errors. May be useful for offline installs where some functionality is better than none.
Creates a crontab entry that runs /home/lanforge/scripts/check_large_files.bash on a daily basis. If you want to run that check more frequently, you will have to modify the crontab rules yourself.
this does a pip3 install of lanforge-scripts. This is not necessary if you just need to use /home/lanforge/scripts/py-scripts casually.
install the selenium package using pip3 (implemented in 5.4.8)
VLC video player requires RPMFusion repository. This adds the repository and then installs VLC.
Specify adapter board used is the 8x internal splitter/combiner board, for do_sys_reconfig
Specify adapter board used is the 8x gen-3 internal splitter/combiner board, for do_sys_reconfig
Creates /etc/sysconfig/network-scripts/ifcfg-eth0 from the eth0 entry found in /etc/udev/rules.d/70-persistent-net.rules. Fedora only. Edit 70-persistent first.
indicate what interface should be configured as the management interface. LANforge works best in cases where there is a dedicated management interface and management network (out of band management). In the case there is only one interface and it has to serve as a traffic port and a management port, that is possible (in band management). Currently this option is only used by the --regen_nm_conf option. If this option is not specified Specify one of these options:
  1) {interface_name}: name of the interface to set
  2) "existing": force the use of the mgt_dev in /home/lanforge/config.values
specify IP address to add to [ipv4]mgt_dev.dns value in mgt_dev.nmconnection
specify either "dhcp" or a "ip/cird/gateway" combination for mgt_dev.nmconnection:
  1) mgt_ip=dhcp
  2) mgt_ip=
Uninstall yum-fastest mirror.
Add fake URL argument to disable any HTTP caching.
Enable NetworkManager. It is disabled by default.
Specify that the system is on an isolated network. Turns off --do_only_pkgs --do_pkgs Enables --skip_fmirror --skip_installer_check --skip_pip --skip_yum_all --skip_yum_update
Use with --print_label
Implies --show_urls without website check Turns off --do_only_pkgs --do_pkgs Enables --skip_fmirror --skip_installer_check --skip_pip --skip_yum_all --skip_yum_update
print out .bat file contents to help with downloading LANforge updates
this will uninstall the python pip user environments and build a new one from scripts/requirements.txt; if you see errors, you probably are missing newly required library packages provided by the distro. To make sure your packages are up to date, use:
 Example: ./ --do_pkgs
regenerate the /etc/pki/tls/$hostname.crt and .key files so that they have F33+ 4096 bit keys, not smaller keys.
Also --regen_nm_config. Backs up /etc/NetworkManager/NetworkManager.conf and recreates one that specifies that no interfaces except the one with the default route be managed. Enabled by default during do_interop. NM settings you do not want modified should live in separate conf files in /etc/NetworkManager/conf.d. When this option is used without the --mgt_dev option, a new management device will be determined. Default value is 1.
  0: do not modify NetworkManager.conf
  1: update NetworkManager.conf and mgt_dev.nmconnection
  2: update NetworkManager.conf, mgt_dev.nmconnection, but do not restart NetworkManager
Uninstall a LANforge kernel from /boot and /etc/grub.d. It will update the /boot/grub2/grub.cfg.
removes the cronjob created by --install_large_file_cron
removes the passwords from accounts root and lanforge and reconfigures sshd to accept empty passwords. Yes...really, it IS crazy, right?
Removes pulseaudio-pipewire packages.
  0: do not remove pipewire (default)
  1: remove pipewire
Use when pip3 updates were installed as root and you have system pip3 package conflicts. This will reinstall the python-pip3 package and 'pip3 remove -r requirements.txt' to remove pip3 libraries from system folder. Follow this with --update_pip to get pip3 libraries into user lanforge folder.
Use this to restore GUI settings on reboot. Running this a second time copies a changed LANforgeGUI/lfcfg.txt file to $home to save new changes.
  1) backup: copies the LANforgeGUI/lfcfg.txt file to $home. Disables lfcustom_gui.bash if it exists.
  2) static: implies backup, creates lfcustom_gui.bash that replaces lfcfg.txt into LANforgeGUI directory every time LANforgeServer is started.
use with --do_print_label, specifies serial number on label
Also: --swiotlb, --do_swiotlb. Configure IOMMU buffer size. Requires you use IOMMU setting, so use with --do_grub --do_iommu=1
 Example: --do_grub --do_iommu=1 --set_swiotlb=65536
Also: --show_larges_pkgs, --largest_pkgs, --large_pkgs. Show top 20 largest packages. Useful during do_image_prep if you want to reduce install footprint.
Show URLS for all files that should be downloaded, and exit.
Don't burn-in CPU.
avoid do_disk_test if /home/lanforge/did_disktest is missing
Don't alter systems existing use of yum-plugin-fastestmirror.
Don't do kernel install, even if other options would have selected it.
Don't install LANforge-GUI, even if other options would have selected it.
avoids checking MD5 sum of
avoids renaming interfaces and rewriting 70-persistent-net. If OUIs of VMs are detected, the file /home/lanforge/LF_NO_IFRENAME is created. If /home/lanforge/LF_NO_IFRENAME is found, this option is automatically enabled.
turn off checking md5sum of ./
Do not install a kernel package, suppresses do_grub, do_kern
Do not attempt to reconfigure radius. Useful when attempting to speed up do_sys_reconfig on slow systems.
Don't try to use HTTP resume when downloading packages.
Don't install Xorp virtual-router package, even if other options would have selected it.
Don't execute dnf/yum --update
Specify location of installation files (must be absolute path). Implied by --use_bundle. Useful when downloading install packages on an isolated system (typically to /home/lanforge/Downloads). Example: ./ --lfver 5.4.7 --kver 6.7.5+ --do_upgrade --source_dir /home/lanforge/Downloads --offline
Specify the script temporary working directory and backups of system files. Typically defaults to /var/tmp.
Upgrades pip userland
Also --use_bundle, --bundle [bundle file] Upgrade LANforge using an install bundle file. Bundle files Sets $source_dir, $tmp_dir to directory containing bundle.tar file. See Bundle installations require the system OS matches compiled OS version in the bundle. Confirm your OS version using: "grep Y /etc/os-release". Not intended for --do_interop. This sets flags: disable_audit_logs = 1 do_cma = cma_recommendation() if (do_cma == 1) do_firmware = 1 do_grub = 1 do_http = 1 do_kern = 1 do_lanforge = 1 do_pkgs = 0 do_upgrade = 1 do_xrandr = 0 do_yum_update = 0 is_offline = 1 skip_cpu_burn = 1 skip_fmirror = 1 skip_pip = 1 skip_xorp = 0 skip_yum_all = 1 skip_yum_all = 1 skip_yum_update = 1 skip_yum_update = 1 source_dir = tmp_dir You can specify --force_osver and --force_osveri to install a bundle onto a non-matching OS. For example: --bundle Bundle_lfver-5.4.7_kern-6.7.9+_osver-F36 --force_osver 36 --force_osveri 36 will install the F36 bundle correctly on F37, F38
do not erase and rebuild yum cache
Also --remove_raid --remove_lvm [drive1,drive2...] Remove LVM volumes and signatures from specified disks. Use this before doing --create_raid the first time on any disk that already has a filesystem.
 Example: ./ --wipe_raid nvme0n1p1,nvme1n1p1


If you use commands "yum update" or "dnf update", and you need to use a kernel provided by the repository, use grub2-mkconfig to create the boot entry, or consider using --do_interop
 Example: grub2-mkconfig -o /boot/grub2/grub.cfg

Candela  Technologies, 2417 Main Street, Suite 201, Ferndale, WA 98248, USA | | +1.360.380.1618
Facebook | LinkedIn | Blog