The Linux distribution I chose for my purpose is TinyCore. This distribution has many features that make it awesome for installation on a flash drive:

  • It is really small: the base system is only 8 MB, and you add whatever you want on top of this. Just 4 MB more and you get a X11 desktop!
  • Its root filesystem is entirely contained in the “initrd” file (named in this instance “core.gz”).
  • Each additional package comes in two read-only files (one for the software, the other listing the dependences), one of which gets mounted at run-time. Thus the system never degrades over time.
  • All the system files are contained in “archive files” (“core.gz”, and application-packages), thus making the underlying filesystem (FAT32 in my case) almost irrelevant (more on that in a future post about NTFS).
  • It provides an easy-to-use catalog of applications for all tastes, from the tiny (Ted word processor, Dillo browser…) to the “standard” (LibreOffice, Firefox…), from system rescue tools to games.

In the second part of this series, I prepared a flash drive with Grub2, with a single FAT32 partition named “FLASH”, on which a .boot/ directory exists, that is hidden by default in Linux.

I will now install TinyCore Linux entirely inside the .boot/ directory. Like before, I will assume the flash drive partition is mounted on /media/FLASH:

cd /media/FLASH/.boot
mkdir tmpiso
mount -o loop,ro TinyCore-current.iso tmpiso
mkdir -p corelnx/tce/ondemand
cp -r tmpiso/cde/optional corelnx/tce/
cp tmpiso/cde/onboot.lst corelnx/tce/
umount tmpiso
rm -rf TinyCore-current.iso tmpiso
for f in modules.gz modules64.gz rootfs.gz vmlinuz vmlinuz64; do wget -P corelnx$f; done

If for some reason, you need to install version 4.x of TinyCore Linux, just replace 5.x with 4.x in the second line above, and replace the last line with:

for f in core.gz core64.gz vmlinuz vmlinuz64; do wget -P corelnx$f; done

That’s all. Really ;-)

However, I now wish to enable the French keyboard in TinyCore Linux:

wget -P corelnx/tce/optional
wget -P corelnx/tce/optional
echo kmaps.tcz >>corelnx/tce/onboot.lst

Once again, replace 5.x with 4.x if you are interested in TinyCore Linux 4.x.

There only remains to add TinyCore Linux to the Grub2 menu. In this file, I previously wrote the following comment line:

# … here will come Linux, later …

This line should now be replaced with the following contents:

set tc_bits=
menuentry "Start CoreLinux: a tiny Linux on USB" {
linux /.boot/corelnx/vmlinuz$tc_bits waitusb=5 tce=LABEL=FLASH/.boot/corelnx/tce restore=LABEL=FLASH/.boot/corelnx kmap=azerty/fr-latin1
initrd /.boot/corelnx/rootfs.gz /.boot/corelnx/modules$tc_bits.gz
menuentry "- 64 bits" {
set tc_bits=64

For the above to work, it is very important that you use a recent version of Grub2!

For version 4.x of TinyCore Linux, the initrd line above should be instead:

	initrd /.boot/corelnx/core$tc_bits.gz

TinyCore Linux is ready. It does need a bit of time to configure and get used to, though. Just start it, and use the TinyCore Wiki. Next blog post will deal with the portable applications for Windows. I’ll come back to TinyCore later.


  • 2013-09-21: Fix mistake: corelnx/optional should be corelnx/tce/optional.
  • 2013-09-22: Update for for the release of TinyCore v5.0.
  • 2014-05-10: Some information about TinyCore 4.x, as some software is not yet available for TinyCore 5.x.