While looking for a super small Linux distro for an upcoming project, I came across Tiny Core Linux(TCL). After setting it up in a Proxmox vm, I now have a system that books in just arround ~10 seconds - pretty awesome! Here are the quirks I found while setting it up:
Setup
-
Assuming you are also using Proxmox, you need to make sure that the disk type you are trying to install to is
ide
not the defaultscsi
. For whatever reason TCL doesn’t recognizescsi
disk. -
You need to install the install script. It doesn’t come pre-loaded on the system like many distros. Install by using the
tce
command to search for “install” -
Before running the install script you need to use
fdisk
to make partitions- If you plan on having persistant files/folders you need atleast 2 paritions
Persistance
Now that you have a bootable system (from disk, not iso), you may want to persist some data after shutdown. By default nothing is saved (Besides installed packages?).
If you look in the /opt/
directory there is a file called .filetool.lst
this contains two entries by default:
# .filetool.lst
home
opt
These are the folders that will be backed up when using the backup
command.
By default these will be restored on boot, so you may want to add config files to the /opt/.filetool.lst
to persist configs.
Cool! But where does it backup to?
Backups are stored in /mnt/sda1/tce/
or the equivilent drive name, it just so happns that my system has sda1
as the drive/partition name.
The config settings for this are stored in /mnt/sda1/tce/boot/extlinux/extlinux.conf
.
If you were to cat
this file you would see the last line starts with “APPEND”.
Inside this line you should see tce=UUID="<disk-uuid>"
.
This means that the disk with that UUID has the “tce” directory and it should restore from there.
You can view all the possible options for “APPEND” here.
Login
Lets say that you are getting closer to production of your system that’s running TCL.
You will probably want to set a password and would like to stop the system from auto logging-in on boot.
Looking at the link above we see that we can add noautologin
to prevent the second issue, of, autologin.
But how to we set a password and have it persist thru the next book?
Well, we just need to:
-
Set a password using
passwd
-
Make sure that
/etc/shadow
is persisted. To do this add “etc/shadow/” to your/opt/.filetool.lst
, then run thebackup
command to save. Now when you powercycle the machine it will no longer drop you into a shell on boot, it will ask for a username/password combo.