Sunday, 18 November 2012 17:27

Creating a new SliTaz distro

I have just discovered SliTaz, a tiny but very complete linux distro. It seems to be just the ticket for embedded or consumer electronics type applications, can run entirely in RAM, boots to a desktop in the blink of an eye and the current ISO is about 35M for a full desktop. This is amazing stuff. It also has a brilliant lightweight and package management system: tagpkg

Even better then that, a bit more investigation shows you can fairly easily roll your distros called: 'flavors'. It easiest to base these on other flavors. These are my notes on how to do it.

(NB: It's also possible to really simply create new packages for tazpkg from source using the 'cook' command. This whole thing really makes me start to wonder if mainstream distros are not massively bloated.)

  tazlito list-flavors

Shows a list of downloadable flavors. For this working example I'm going to base my flavor on the  'justx' (16M) flavor.

cd /home/slitaz
mkdir flavors
tazlito get-flavor justx

This happily trots off to the slitaz servers and grabs the flavor file, which is small binary file (don't know the format) which is a compressed description of what is needed to build the flavor. It also creates a distro-packages.list file and a tazlito.conf in the directory. The lazlito.conf file can be used to customise the build of the final distro. The distro-packages.list  file contains the packages that will be used in when the distrois built.

The two commands

tazlito extract-flavor
tazlito pack-flavor

Pack and unpack the flavor file to /home/slitaz/$version/flavor/flavorname where you can add to the tree and modify the packages, although it seems easier for my purposes to mostly ignore this flavors aspect and just work with the /home/slitaz/4.0/distro/addfiles  directory once a flavor is in the tree. (Otherwise you need to keep packing and unpacking the files. Files can be in here will be in the built distro tree in anycase).

Now edit the tazlito.conf file to add the desired name for the new ISO etc:-

# Name of the ISO image to generate.
ISO_NAME="st14xx-digitizer"
#ISO_NAME="slitaz-justx"
# ISO image volume name.
VOLUM_NAME="st14xxdig"
#VOLUM_NAME="SliTaz LiveCD"
# Name of the preparer.
PREPARED="Matt Smith"

 Test and build the initial distro with 

tazlito gen-distro

At this point if the packages are not present in /home/slitaz/4.0/packages tazlito will kindly offer to go and get them for you.

You will now have a folder: /home/slitaz/4.0/distro/addfiles directory to which you can add files to the rootcd folder and the rootfs folder.You can also edit the isolinux bootloader in the rootcd folder. Some useful kernel options I found were:-

autologin (automatically login the tux user)
lang=en kmap=uk (set language and keymaps and therefore not prompt for them)
nomodeset (prevents KMS graphics switching which can be a PITA on some older graphics cards, you might lose X though)
screen=text (don't start X)

You can edit the /home/slitaz/flavors/distro-packages.list file to add/remove packages.

tazlito gen-distro

Again builds a new ISO distro, adding your files. It's a nice idea to have PXE server setup to test these quickly in a VM.

 

Nice job SliTaz guys!

 

Last modified on Sunday, 18 November 2012 20:36

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.