Tiny Core Linux

Getting Started with Tiny Core Linux - Core Concepts

Tiny Core Linux, not being a turnkey desktop system, requires the internet to access to our repository of applications. Everyone should take the time to read this document and understand the design philosophy behind Tiny Core Linux. This will ensure a more pleasant experience.

Four Modes of Operation


The First Mode: Cloud/Internet

The first mode of operation is the default boot mode of Tiny Core Linux. It is what I call the Cloud Mode, or the Internet Mode. Tiny Core boots entirely into RAM. Then using the internet and the Apps icon, a shortcut to our Appbrowser GUI, one can begin to explore our application extension repository. By the way, there are two ways extensions can be loaded, more on that later. In this mode of operation, extensions downloaded via the appbrowser will be for the current session only. That is, the extension will download and using the Install button the extensions will be installed into RAM. The downloaded extension is not saved. This is to maximize the use of available RAM. This is the most nomadic mode of operation but it also requires the most resources.

The other modes of operation use persistency. Booting with certain options one can persist the downloaded extensions.

The Second Mode of Operation: TCE/Install

The second mode of operation is the use of the boot option tce=hdXY, i.e., specifying a writable persistent storage partition, the system will create a tce directory on this device and name it tce/. With this mode you would continue to use the Install option of Appbrowser. This tce directory will become your personal persistent repository. The next time you boot all extensions will automatically be loaded/installed from this directory. Any further extensions downloaded from the Appbrowser (Apps) will be stored in this tce directory and will therefore persist.

Note the default directory name is tce. However this can be user specified, e.g., tce=hdXY/mystuff. Installing many extensions in this mode may quickly exhaust your systems memory, this can become problematic for users with low RAM.

Once a tce directory has been setup via a one time only boot code of tce=hdXY all subsequent booting will load, install, or mount your extension collection. Even this boot code can be dropped. If no boot option specifying the tce location is used then the system will autoscan for the default tce directory. Recall, I mentioned that you can also specify the directory name. If you have chosen to use a different name via boot option, e.g., tce=hdXY/mystuff then you must continue to specify that boot code. The system will only scan for the default "tce" directory. The auto-scan was designed to have a "hands free" boot from a read-only boot media, i.e., the downloaded tinycore.iso written to cdrom. However this is a benefit to always specifying your tce directory location even when using the default "tce". By specifying the location, the system does not have to autoscan. This saves time during booting.

The Third Mode of Operation: TCE/Mount

When using a tce directory one has the choice of installing or mounting their extensions. The third mode is to mount. You would select Mount from Appbrowser. Using the mount option will optimize memory usage. Extensions are mounted from your tce directory and therefore use significantly less RAM. Using the mount option, extensions (which are squashfs compressed mountable images of an application directory) become symlinked into the root filesystem. You may mix and match either install (second mode) or mount (third mode) within your tce directory. Using mounts will provide the maximum number of extensions for any given RAM size and much faster booting. All other aspects of using a tce directory, i.e, initial setup and boot type options are the same as the above mentioned mode two.

Note: the boot code of base will ignore all extension loading/installing/mounting when using modes two or three. This can be a useful tool for trouble-shooting and extension building.

Using the second or third method of operation, i.e., a tce directory, is preferred as it always results in a known pristine state of your operating environment.

The Fourth Mode of Operation: Local/Install

The fourth mode of operation literally installs extensions into a local Linux partition or a loop back file containing /usr/local/ directory. This persistent /usr/local/ is mounted into the main filesystem. We call this mode personal persistent installation, or PPI. Extensions that support this mode are marked with PPI Compatible in their .info file. Selecting this mode provides a hybrid type of installation, where core is in RAM and the extensions are installed onto a local persistent storage device. The benefits are speed, as no loading/installing/mounting occurs during boot. The same RAM savings offered by mounted extensions is another benefit of persistent /usr/local (PPI). However the drawback of this is losing the "pristine state" offered by using the tce directory. Installing applications, as done in most typical environments, can result in "system rot", i.e., over time, or via user/system error, corruption can occur and might not be readily noticeable. By choosing this method one should only use the install option of extensions. The extensions being squashfs images are actually temporarily mounted and literally installed into /usr/local. To initially setup your persistent /usr/local/ use the boot code of local=hdXY. This will look for a directory named tclocal or a single loop back file of the same name.

Note there is a menu option to create a loop back file for this very purpose. Using a persistent /usr/local you don't need to keep the downloaded extensions. Therefore no need to specify tce=hdXY as used in the tce directory modes.

Note: To use a persistent /usr/local/ you must always use the boot code, as was used in the initial setup, local=hdXY.

USB Devices Special Requirements:

With either the tce directory modes or persistent /usr/local/ mode users can maintain their collection of extensions on a pendrive, compact flash, or other removable media for maximum portability. Using such media it will be probably be necessary to use the boot code waitusb=5 where 5 in this example means 5 seconds to wait for slow usb devices to fully register.

New Download Capabilities of Tiny Core:

Many improvements were made to enhance the installation of extensions to Tiny Core be it the tce directory modes or a persistent /usr/local/ mode of operation. Extension codes of "l" or "m" will automatically load and configure libraries and modules respectively. These functions occur without any user intervention or configuration. Additionally Tiny Core supports installation scripts. These run upon loading/mounting extensions. The ".dep" extension brings simple download dependency resolution to Tiny Core. This greatly simplifies a successful download installation, loading, or mounting of any application extension. The user does not need to read the ".info" file for the purpose of trying to manually satisfy the application extension run-time dependency requirements. Simply choose the typical application name and all other run-time requirements will also be downloaded and prepared for successful application launch. Note also that when the extension ".dep" files are present in the /tce directory, on booting the extensions in /tce will load in the order specified in the ".dep" file, which might be required for the processing of extension start-up scripts.

Note: One should always read the .info file to see if special instructions apply.

Backup/Restore and Other Persistency Options:


Backup/Restore

After setting up your new system, you will want to save your settings. There is a file called /opt/.filetool.lst. It is a simple text file of files and directories listed one per line using a full path that the user wants to save/restore (note that the leading "/" should be omitted as it is the full path relative to "/"). Use any of the GUI tools provided on the Tools menu or any editors available via extensions or vi to change/update (e.g., select Beaver, then open /opt/.filetool.lst).

The default is to backup the entire home/tc directory. However, one can choose to selectively backup only certain files. However it is important to note that the entry /opt/.filetool.lst must NOT be removed from the .filetool.lst as this provides for persistence for the .filetool.lst itself.

Also note that the capability exists to exclude files from the backup with the file /opt/.xfiletool.lst. Adding entries to this file will exclude them from the backup. Cache and other files are in the default /opt/.xfiletool.lst.

The backup will be written to a file called "mydata.tgz". You can initially select the storage device by using the boot option of: restore=hdXY or after boot, by selecting "Backup/Restore" from the "Panel". Your backup will be automatically searched for and restored during subsequent booting. Once a mydata.tgz has been successfully created, the boot option may be omitted. Autoscan once again is there to support "hands free" booting. And as before, always specifying the boot option speeds your boot time.

Additionally you may add a directory to the location of the backup, e.g., restore=hdXY/a_directory This will allow the backup file "mydata.tgz" to be placed in a directory. Using a directory also means that you must always specify it via its boot code. You can skip using your backup with the boot option of norestore. This can be a useful tool from trouble-shooting and when upgrading to a newer version of microcore/tinycore to avoid over-writing updated files with files from your backup.

These options together with a local .xsession provide the user with much more control of their preferred environment. For example, by editing the .xsession you can start up your favorite X-Windows programs. You can start non-Window programs by editing the .profile and then adding it to your /opt/.filetool.lst. You can even load additional modules and system-specific required files by editing the /opt/bootlocal.sh file and then adding it to your filetool.lst.

Persistent Home

Just as Tiny Core offers persistency options for downloaded application extensions, so does it for your home directory. Use the boot option of home=hdXY. The very first use of this code will automatically setup /home/tc to "bind" to /mnt/hdXY/tchome By using this option, you are not having to wait for a backup/restore for those items in your /home/tc directory. Backup and restore should, as with any system, still be done. The boot option must always be used, as there is no autoscaning available for persistent home.

Note again, the initial use of this option will automatically setup your tc home account so care should be taken in its use.