Building a Debian Live OS fom a GLF configuration set            21 Jul 2020
-----------------------------------------------------------------------------

GLF has prepared examples of Debian "live build" configuration sets which serve to specify all the needed elements to be installed from the Debian repositories, plus supplemental data, to make a bootable live OS ISO image.

It is assumed the user will run the build from a preexisting configuration (ex. glfpe624_amd64.tar.gz) using a compatible Linux OS (which may be, SHOULD be a Debian live boot instance) from a work drive, an external USB hard drive or USB flash drive partition formatted to Linux Ext4.  Using an external drive allows a user to build the OS without making any permanent changes to an underlying computer. DO NOT try to use NTFS, FAT32 or other non-Linux partition type.  It won't work.  GLF configurations are specific for PC CPU type (amd64 or 686).  A typical configuration will be stored as a .tar.gz archive which will be unpacked to a folder on the work drive.

The unpacked configuration should be edited to change any needed filenames, dates, and other pertinent configuration-specific variables prior to using it to build another copy of the OS image.  Each build brings in the latest versions of applications and libraries from the Debian repositories, so repeated builds may function identically, but are not strictly replicable.

After such edits, it is assumed the user will save the state of the new configuration by compressing the folder into a (newly named) .tar.gz archive.  The *.tar.gz format is important to preserve the permission status of all contained files (ZIP won't work).

Once the configuration is ready to use, copy the script below to the user's $HOME folder (it should already be executable), and bring up a terminal based at the home folder.


remountforlb.sh -- Necessary script prior to building a Debian Live Build
                   configuration from external USB EXT4 formatted drive.
                   This script is assumed to be copied to the user's $HOME
                   folder.  It is assumd the user has unpacked a live build
                   configuration set (ex. glfpe624_amd64.tar.gz) to the
                   root of an external USB drive formatted to Linux Ext4
                   format (ex. folder "glfpe624_amd64"). That configuration
                   must meet the current specs for the Debian "live-build"
                   and "live-config" packages installed into the OS being
                   used. It is also assumed that the CPU type of the OS
                   being used matches the type built into the configuration.
                   DO NOT try to build a 64-bit OS using a 32-bit OS host,
                   nor the reverse. Provided the minimal dependencies are
                   satisfied, one should be able to build an ISO image from
                   the configuration set from even a base-level official
                   build of Debian (currently 10, or "buster").

REQUIRES a single parameter, mounted drive name, assumed of form: /dev/sdd1

In order to find that device name precisely, prior to executing this
script, perform the following from a terminal (from home folder):

    sudo fdisk -l
    ls

  The first command will list all drive names -- examine the list to
  identify the correct drive for the purpose (ex. /dev/sdd1).  Look for
  drive partitions marked Linux Ext4.

  The ls command will bring up contents of the home folder, which should
  include this script, "remountforlb.sh".  That will allow easy cut-paste
  operations to the command line to set up the following command to
  execute next:

    ./remountforlb.sh /dev/sdd1  

  Following the execution of this script, the selected drive should be
  remounted as ~/livebuild.  Examine the home folder to verify this,
  then bring up a GUI file explorer window for ~/livebuild.  Select the
  build configuration folder (prepared ahead of time) and bring up a
  terminal based on that folder.

  Begin the build process (about an hour or so) by executing:

    sudo lb build

  Avoid typing into the keyboard during the build to avoid accidentally
  breaking the build with say, a CTRL-C.


