My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
UsingLACK  
How to use LACK
Phase-Implementation
Updated Jan 24, 2012 by elspicyj...@gmail.com

Back to the MainPage...

LACK Workflow

  1. Install donor system
  2. Create recipe files using LACK tools (lackpkgtool.pl, needs to be written)
  3. Optional, but could be needed for specific projects; Create metapackages, which consist of groups of recipes (metapkgtool.pl)
  4. Use the package tools to build packages and/or metapackages (lackpkgtool.pl)
  5. Build a kernel and package an initramfs (make_initramfs.sh)
    1. Update support packages (loop-aes, ndiswrapper) as needed
    2. Update package info automatically with debchange/dch
  6. Test via flash disk or PXEboot
  7. Repeat from 2, or from 1 if a new distro comes out or you upgrade your host machine

Quick Introduction to Using LACK

  1. Install a base system using some sort of Debian-based distribution. Debian-based is required for now because the scripts are written to query dpkg. Patches welcome if you want to support your favorite distro :)
  2. Build an install a kernel; the kernel modules will then become available for packacing in /lib/modules, and gen_init_cpio will become available in /usr/src/linux for creating the initramfs file.
  3. Use generate_recipe.sh to generate a filelist for a 'package'. A LACK distribution will contain one or more of these filelists that will be used to build the initramfs image. You can concatenate filelists together to make management a little bit easier.
  4. Use make_initramfs.sh to create an Linux initramfs image.
  5. Once you have a new initramfs image, you can use something like [sys|iso]linux to boot from a USB stick or CD-ROM, or pxelinux to boot your new image over the network. pxelinux is recommended because it vastly shortens development time, you don't have to re-upload the initramfs to your media, you just reboot the machine with the new initramfs image in place.
  1. install base system
  2. build a new kernel, or use an existing kernel
    1. building a new kernel will let you customize kernel modules and get you a copy of gen_init_cpio
    2. using a vendor's kernel will work for the lazy, but you will have to find some way to build gen_init_cpio, as it's usually not included in distro kernel packages
  3. clone lack source for scripts and recipies
  4. set up the initramfs.cfg file
    1. KERNEL_VER (kernel version, points to the correct directory in /lib/modules, and also names the initramfs file)
    2. PROJECT_NAME (used for the initramfs filename, and at the top/bottom of the /init script)
    3. RELEASE_DATE (used on banners,issue files, and the syslinux.cfg file)
    4. RELEASE_VER (used on banners,issue files, and the syslinux.cfg file)
    5. LACK_PASS (used in the issue file, so users know what password to log in with)
    6. PACKAGES='list of packages' (list must be surrounded by single quotes, but can contain newlines, which the shell will strip out when it goes to include those filelist files in the initramfs filelist)
    7. Call any other setup scripts, like find_first_free_filename and make_release_files.sh
  5. generate common and/or project recipies using generate_recipe.sh
    1. use the sections_to_remove.txt files to exclude kernel modules from the kernel modules filelist/recipe;
    2. for the Linux kernel and kernel modules, use the sections_to_remove.txt/files_to_remove.txt filelist files to exclude kernel modules from the kernel modules filelist/recipe
      1. generate_recipe.sh -p linux-image-X.XX.XX-lack | grep -nf sections_to_remove.txt > linux-image-X.XX.XX-lack.txt
      2. generate_recipe.sh -p linux-image-X.XX.XX-lack | grep -nf sections_to_remove.txt | tee linux-image-X.XX.XX-lack.txt
      3. generate_recipe.sh -p linux-image-X.XX.XX-lack | grep -nf sections_to_remove.txt | grep -nf files_to_remove.txt | tee linux-image-X.XX.XX-lack.txt
      4. cat linux-image-X.XX.XX-lack.txt | grep -nf sections_to_remove.txt > linux-image-X.XX.XX-lack.txt
  6. run make_initramfs.sh to generate the initramfs file. The following variables are exported:
    1. BUILD_BASE - base directory for lack project
    2. PROJECT_DIR - directory containing the project to build the initramfs file for; this could be the same as or different from BUILD_BASE
    3. TEMP_DIR - temporary directory that's created to store filelists and temporary files needed to build the initramfs file
    4. FILELIST - the name of the filelist that's created for the initramfs image (project files + recipe files), and also the name of the project's filelist (project files) '''TODO''' change the name of the project filelist to something else, so that there's no possibility for filename conflicts

Generating a kernel filelist:

sh ~/src/lack-hg/scripts/generate_recipe.sh -p linux-image-2.6.34-lack \
  | grep -vf sections_to_remove.txt \
  | grep -vf files_to_remove.txt \
  | tee linux-image-2.6.34-lack.txt

Powered by Google Project Hosting