Do it yourself: Build stage03
In the third stage the final ISO image is assembled. To assemble the ISO you need an overlay with some fixes and the bootloader configuration. Eventually the bootloader configuration can be automatically generated – but not for now. Since assembling stage03 is basically calculating dependencies, copying files from the chroot environment, compressing the squashfs containers and finalizing the ISO image, this stage is usually done in 20 to 40 minutes.
Start with the overlay that has to be unpacked directly in /mnt/archiv/LessLinux:
cd /mnt/archiv/LessLinux wget http://download.lesslinux.org/overlays/lesslinux-search-and-rescue-uluru-20100507-000000-overlays-neutral.tar.bz2 tar xvjf lesslinux-search-and-rescue-uluru-20100507-000000-overlays-neutral.tar.bz2
Now change directory to /mnt/archiv/LessLinux/llbuilder/lesslinux-builder and run builder.rb:
cd /mnt/archiv/LessLinux/llbuilder/lesslinux-builder ruby builder.rb -n -s 1,2,bootconf \ -p config/pkglist_neutral_rescue.txt \ -c config/general_neutral_rescue.xml \ -b config/branding_neutral_rescue.xml \ -k config/kernels_rescue.xml
The parameters are as follows:
- -p use a certain pkg_list, this is a simple text file containing one package per line
- -c use a certain config file, this contains paths and assumptions on the layout of the final system (for example how kernel modules are loaded)
- -b use a certain branding, this would be the first file to customize when building your own version of LessLinux
- -k use a certain kernel configuration, you would modify this file when using different kernels
After the build is done, take a look at the stage03 directory, you will find the finished ISO image here:
# ls -lah /mnt/archiv/LessLinux/llbuild/stage03 total 391M drwxr-xr-x 7 root root 4.0K 2010-05-07 09:33 . drwxr-xr-x 5 root root 4.0K 2010-05-07 08:45 .. drwxr-xr-x 300 root root 12K 2010-05-07 09:13 build drwxr-xr-x 6 root root 4.0K 2010-04-13 12:50 cdmaster drwxr-xr-x 4 root root 4.0K 2010-05-07 09:32 cpio-2633vn -rw-r--r-- 1 root root 18M 2010-05-07 09:32 cpio-2633vn.gz drwxr-xr-x 14 root root 4.0K 2009-10-13 17:25 initramfs -rw-r--r-- 1 root root 7.6M 2010-05-07 09:32 initramfs.gz -rw-r--r-- 1 root root 365M 2010-05-07 09:33 lesslinux-search-and-rescue-uluru-20100507-084527.iso drwxr-xr-x 9 root root 4.0K 2010-05-07 09:32 squash
You might now dd the ISO to an USB stick to create a bootable device without having to burn:
dd if=lesslinux-search-and-rescue-uluru-timestamp.iso of=/dev/sdx
That’s it for today, in the next days we will add some more software and change the branding of your own build.