[ Home ] [ GeoIP ] [ Tools ] [ Tips ]

Running LEAF from a cdrom

Originally LEAF is supposed to be run from a single floppy disk which may be too much of a limit. When I first started out with the former Linux Router Project I found that my hardware simply refused to boot from any floppy disk larger than 1.44M and that posed to be a real challenge. Switching to LEAFs Bering distribution was a breath. Bering includes an initrd that allows you to boot from a cdrom which in essence means unlimited space. Unfortunately you cannot write back configuration changes to a cdrom but I found you can still use the floppy disk in concurrence to the cdrom. This allows you to store changes and update packages without the immediate need to burn an updated cdrom.

So here's how you do it:
Start by following the standard guidelines for creating a bootable LEAF cdrom but change ISOLINUX.CFG to read as follows:
display syslinux.dpy
timeout 0
default linux initrd=initrd.lrp init=/linuxrc root=/dev/ram0 boot=/dev/cdrom:iso9660 PKGPATH=/dev/fd0u1440:msdos,/dev/cdrom:iso9660,/dev/fd0u1440:msdos EDITMOTD=no

Next create your DOS formatted floppy and copy LEAF.CFG onto it. Change the PKGPATH parameter like in the example below. Note that the floppy device is mentioned twice - this is because I found that in some cases it would still load a duplicate package from the cdrom where I obviously intended it to load the newer version from the floppy disk. Using the path as stated here has worked for me since I started out with Bering 1.2
# This file is parsed as a shell script
# Kernel command line parameters are available as KCMD_
# ie: KCMD_LRP contains the LRP= portion of the kernel command line
# NOTE: For kernel command line settings that do not include an equals
# sign (ie: rw or similar), the variable is set to itself, allowing
# for easy testing (ie: KCMD_rw=rw).

# LRP and PKGPATH variables now support whitespace (space, tab, newline)
# as well as commas for seperators.

# Uncomment for more verbose execution.
#VERBOSE=1

# Other variables you might want to set in this file include:
# LRP		Packages to load
# PKGPATH	Device(s) to load packages from
# CONFIGDB	Configuration database
# MODDB		Modules database
# syst_size	Size of root ramdisk
# tmp_size	Size of /tmp ramdisk
# log_size	Size of /var/log ramdisk

# Example:
#LRP="$KCMD_LRP rsync"
LRP="root config etc modules"
LRP="$LRP ppp pptp iptables geoip firewall lrpstat geoipdb ppp0mon"

# The first entry is the backup device.
# If equal packages exist on multiple devices, the ones on the left most device have precedence.
PKGPATH="/dev/fd0u1440:msdos,/dev/cdrom:iso9660,/dev/fd0u1440:msdos"

# Experts only: the name of the config and modules databases can be changed, choose an unique name.
#CONFIFGDB=configdb
#MODDB=moddb
syst_size=6M
tmp_size=1M
log_size=1M

Last modified: August 31, 2007