Jonathan Taylor's picture

I am trying to build out a Debian Squeeze based core and would like to document my journey and also try to get some advice/assistance from the community.

My journey started with google where I found a live cd build system called live-build.  Here is a link to the home page:

http://live.debian.net/

Here is a link to the english manual:

http://live.debian.net/manual/en/

Basically to get started you merely start with an existing Debian Squeeze system, install live-build through apt-get(it is in the standard debian repository).  From there you use the following command to build a live cd:

lb config && lb build

If you run that command right out of the box you get a simple live cd with the standard installation packages.  To install custom .deb files you place the .deb files in the config/chroot_local-packages folder.  Next to get the live cd to support installing you pass

--debian-installer live

To the config command.  To make it easier you can create helper files in the auto folder, so I created a config file with the below contents:

lb config noauto \
        --architecture i386 \
        --linux-flavours 686 \
        --packages-lists "standard" \
        --debian-installer live \
        --mirror-bootstrap http://mirror.steadfast.net/debian/ \
        --mirror-chroot http://mirror.steadfast.net/debian/ \
        --mirror-binary http://mirror.steadfast.net/debian/ \
        "${@}"

The result of building with this config is a 201MB ISO that uses the standard debian installer to install.  The installer has all the steps of a normal debian installer except for the package selection, it installs the image from the live cd.

I have attached an archive with a skeleton of my build directory, just extract it and run

lb clean && lb config && lb build

I am not sure how to get the image the rest of the way in order to get it more like the existing Turnkey core.  Like what other packages need to be in there, how do I get it to start up the console menu system the existing core has, etc.

Any assistance/guidance is appreciated.

Forum: 
Liraz Siri's picture

1) I think you should be able to install the Lucid builds of the custom TurnKey packages on Debian Squeeze. Note that binaries can be downloaded directly from archive.turnkeylinux.org

2) See the Core manifest for a full list of packages on Core. You should try leveraging the package manager to install the custom packages from the Lucid TurnKey repository.

Add this to your sources: deb http://archive.turnkeylinux.org/ubuntu lucid main

Good luck and share your results with us!
 

Jonathan Taylor's picture

The method I was trying to use will not work with tklpatch, tklpatch is very tightly coupled with di-live which works differently than live-build.  I think in order for this to work I am going to have to go with the chroot old fashioned way.  I guess I am going to have to try to figure out how di-live works then reverse engineer what the tklpatch-xxxxx scripts are doing to build an iso.  That is going to take some time.

I have learned some interesting things on my way, like how to use live-build and also I have read about Debian Pure Blends, so it hasn't been a total waste.


Liraz Siri's picture

Just spend some time understanding how it works. It's a collection of simple cooperative shell scripts that can be invoked manually. If you turn on debugging it will even print for you what it's doing:
export TKLPATCH_DEBUG=y
tklpatch ...

Also, TKLPatch isn't coupled with di-live, it's coupled with casper, which powers Ubuntu's Live CD functionality. di-live is also tightly coupled with casper. That's probably where the confusion comes from. TKLPatch and di-live are both tightly coupled with the same underlying mechanism.

Jonathan Taylor's picture

That is very helpful, I will focus on getting casper compiled on a chroot build and mess around with getting these two command to generate an ISO.

tklpatch-prepare-cdroot $rootfs $cdroot
tklpatch-geniso $cdroot

Jonathan Taylor's picture

Found out today that the original project I was using "live-build" is targeted to replace casper since Lenny, they have a new package named "live-initramfs".  So I am going to go back to the original image and see if I can modify it to work with tklpatch since it was uber easy to generate.

Look at the following URL for my source:

http://ubuntuforums.org/showpost.php?p=4277073&postcount=1

Look at appendix A.


Add new comment