- Tiny Core Linux and Variants
- Installing from CorePlus
- Installing from TinyCore
- Installing Applications
- Keyboard Layout
- VirtualBox Guest Additions
- A Final Word: Save on Reboot
I should start by talking about why I'm so interested in tiny Linux installations. While I use Debian or Ubuntu for day-to-day work, I do a fair bit of work inside virtual machines. And what I often want is a virtual machine I can clone, do some real but stupid work in (a common example being visiting a website I don't trust) and then disposing of the machine. Cloning a full Debian machine takes time and disk space (I could use linked clones, but I prefer full clones - I may eventually be forced to reconsider this strategy). Cloning even a fully outfitted TinyCore instance takes 2-3 seconds - on an old machine. Tiny Core is also inherently more secure because of its read-only packages and bizarre layout, and it boots incredibly fast. And because it's so small, it can also make sense to keep multiple versions around, each for a specific purpose: in my case, I don't trust the Firefox Flash extension, but I have a TinyCore machine outfitted to play Flash games and nothing but, while my main machine has the Flash extension disabled. Another use might be to have an instance used for nothing except banking.
Tiny Core Linux and Variants
TinyCore Linux is a live boot image that comes in three main flavours: "Core" (10 MB, command line only), "TinyCore" (15 MB, full graphical interface), and CorePlus (gigantic at 86 MB). Their documentation claims that the latter is "not the distribution" but an installation image. It appears to be both to me, as it includes a bootable version of TinyCore. In fact, CorePlus has a more drivers, including Wifi, that aren't available in plain TinyCore and may be needed for some machines without ethernet ports. If you want to install to an HD, CorePlus is a superior and easier experience - although it's also possible to install from a regular TinyCore image.
I'm not working with real hardware: everything discussed below was done in a VirtualBox installation on a Linux host. It's been a long time since I've installed TC on a real computer.
In the past I've had problems booting from the images, I think both on real hardware and definitely with VirtualBox: try adding "waitusb=5" (without the quotes) as a parameter to GRUB. Usually not needed though.
One of the most important things you need to understand about TinyCore is that its default mode is as a bootable media intended for temporary use. Temporary, ie. everything in memory and nothing installed to the HD, nothing remembered. This can be useful at times, but is actually a bit of a hindrance if you intend to Install TinyCore, which is what I prefer to do. I'd highly recommend you read their Core Concepts and their Install Guide, although you can probably get by just using this page if all you want is a bootable installation. You just won't understand why it does what it does. Trust me: this is not like other Linuxes you're familiar with and understanding its behaviour will make it much more likely you'll use it successfully.
The next most important thing is the App installer. TinyCore's default behaviour is to have no applications at all: just functioning X (not even standard X, but a cut-down version) and a command line. If you want to use Firefox, or git, or Python ... none of it's there. You'll need to click on "Apps" and install some stuff. I'll talk about that after the installation process.
Installing from CorePlus
CorePlus has an extensive boot menu. I haven't experimented with it much, going directly to "Boot Core Plus with Openbox Window Manager." That's not the default WM, but my preferred one. Other options include "FLWM topside" (the default), Joe's WM, IceWM, Fluxbox, Hackedbox, and FLWM classic. There are also options for command line only, Wifi extensions, plain TC with the installer, etc.
After TC boots (always so refreshingly fast), you see their standard launch bar. But there are a couple extra utilities above and beyond TinyCore's standard: "Wifi," "TC_Install," and "ezremaster." The latter is interesting, but will have to wait for another day. Given that I'm working with virtual hardware, "Wifi" is of no interest. But having "TC_Install" on the launch bar means I don't have to download and install the installer, which is what you have to do if all you have to work from is the TinyCore image.
The installer isn't particularly intuitive. The default check mark "Frugal" applies for my application, but it's necessary to select "Whole Disk" or "Existing Partition" before you can proceed. Again: virtual hardware, I chose "Whole Disk." Choose your disk or partition from the provided list, and leave "Install boot loader" checked (unless you're using a partition). The next screen asks about formatting, with options being ext2, ext3, ext4, and vfat. I chose ext4 (the default). Then comes "Boot Options," which is by far the most opaque screen. I continue to use an invocation I worked out several years ago that still applies:
tce=sda1 restore=sda1 home=sda1 opt=sda1
This means to store tce applications ("Tiny Core Extensions") on sda1, save configuration information (restore) on sda1, and have persistent home and opt directories on sda1. It's important to understand that TinyCore thinks you should store nothing (not your own information, not applications - NOTHING), so it requires a bit of persuasion to make it do anything else. We now come to a variant screen: the regular TC install wouldn't ask you about wireless support or non-US keyboards, but CorePlus does. I selected Non-US keyboards hoping for Dvorak (no joy - it's been a huge problem on virtual hardware). The next screen is the final one, a confirmation screen where we press the "Proceed" button. The installation takes about 60 seconds (and only because I'm using an old machine for this test, normally faster).
A reboot without the boot media brings us to a nearly identical screen, the only difference being the lack of the Wifi icon on the launch bar (because I didn't ask for it to be installed). running "mount" in a terminal shows 66 loop mounts of packages.
UPDATE 2015-12-15: I'm beginning to think "restore" and "home" are redundant: "restore" does a tar.gzipped backup of /home/(?) on shutdown (that can be very slow if you have a large /home/), but should be unnecessary given that you have a persistent /home/ . No promises, I haven't tested this at all.
Installing from TinyCore
- boot "Tiny Core Linux" from the GRUB menu
- run "Apps" from the launch bar
- you'll be asked if you want to pick the fastest mirror: it's probably best to let it do its thing, and then it shouldn't bother you again
- we're looking at the "Apps" installer because TC is so small it doesn't include a way to install itself to the hard drive
- click "Apps" -> "Cloud (Remote)" -> Browse (TC will download and display a package list)
- scroll down to "tc-install.tcz", click on it, then select "Go" in the bottom centre of the current window
- this will install a variety of packages, showing you what's going on in a small terminal window
- when you're done, there will be a new icon called "TC_Install" on the launch bar
- proceed as with CorePlus above
- the primary differences from CorePlus are that you'll get the default FLWM window manager, and a lot less loop mount packages - only 26
As mentioned above ("Installing from TinyCore"), to install applications, you launch "Apps" from the launch bar, choose the "Apps" button, then select "Cloud (Remote)" and "Browse." This will get you a list of available applications.
The first application most people would want is usually a web browser. Chromium is available, although I've never tested it because I usually prefer Firefox. Which comes with a strange caveat: there are three versions available, and you really don't want two of them. "firefox-official" is version 33, "firefox_getLatest" ... doesn't (it installs a script you have to use at the command line and specify the version number you want: even with tracing the script to the Firefox FTP site and getting a number that should have worked, it failed - with several different version numbers). This brings us to "firefox-ESR", which has a note in its description saying that it replaces "getLatest" - better the latter had been removed from the repo then ... This gets you version 38.4.0, which is four major revs back - but it's the "Extended Support Release."
Other applications like git, bash (TCL uses busybox by default), and python3 are installed in the same way. The "Apps" application does dependency resolution - including downloading "Tcl" (that's "Tool Command Language," not TinyCore) and "tk" along with python3, and 20-30 packages required by Firefox. One of my great frustrations with TC is that they still don't package tmux. "screen" is available so I can't whinge too much, but I do prefer tmux and I think it's a better product.
My basic list:
- firefox ESR
I use the Dvorak Keyboard Layout. Behaviour within TinyCore in VirtualBox seems to be system-dependent, and I have no idea what the trigger is. On Windows host systems, the keyboard layout of the host is always enforced on the guest. On Mac systems it usually isn't: that is, the host is Dvorak and yet the guest sees Qwerty. But not always. This also occurs on Linux. So with Debian guests or similar, I use the guest's standard keyboard-switching mechanism and everything is fine. Not so with TC.
From TinyCore's FAQ, the method is
sudo loadkmap < /usr/share/kmap/dvorak/dvorak.kmap # also ANSI-dvorak.kmap, tried both
This runs without comment with or without sudo. It also runs without comment for dvorak.kmap and ANSI-dvorak.kmap. In every instance, the keymap remains unchanged.
The FAQ also includes a method for making a permanent change with a boot code - it presents these as equivalent, but the bootcode worked. I couldn't figure out how to do this with an already installed system, so I booted from CorePlus. Hit tab at the boot menu and you can edit the kernel command line. Add this:
And wonder of wonders, the booted system has the Dvorak keyboard layout (silly me, for a months I thought that if "kmap=us" was the default, then "kmap=dvorak" would work ... but it's tied to the directory structure within the kmap package). So I repeated the CorePlus install process above, this time adding the above "kmap" bootcode to the long string I'm already using. And ... the install balked, saying it couldn't mount a USB device. I rebooted and repeated the process and ... it installed fine. Somewhat lacking in consistency. Still, I now have the Dvorak keyboard layout.
UPDATE 2015-12-13: This is extremely flaky. On some boots it doesn't load at all.
UPDATE 2015-12-18: Installing the xorg packages makes the
setxkbmap command available, which makes changing the keyboard on the fly easy. It's a lot of packages, but its more reliable than TinyCore's own method.
VirtualBox Guest Additions
Another of TinyCore's several flaws, there's no VirtualBox "Guest Additions" package. This means that you can't have "Full Screen," Shared Folders, Shared Clipboard, or use the mouse without having it be "captured." And compiling it yourself is very difficult (this is Linux: it's not "impossible," I just haven't managed it yet). The primary problem is that TinyCore uses a significantly stripped variant on X Windows, and your first step is then to install actual X Windows. Your second step is to install all the dev packages for it, as well as a C compiler, lexxers, whatever else you need. I started down this path but haven't succeeded yet.
Mouse integration is sort of possible if you go to Machine -> Settings -> System -> Pointing Device and change to "USB Tablet" instead of "PS/2 Mouse," but then you have to suffer with the mouse constantly getting out of alignment. That means it exits in the wrong place or doesn't track fully across the OS-window. Not sure which is worse.
A Final Word: Save on Reboot
If you're new to TinyCore, don't even read this: just use the latest version and don't worry about it.
Those familiar with older versions of TinyCore (including myself) will be interested to know that saving no longer happens exclusively on shutdown. A power outage with an older version of TinyCore used to mean you lost any changes you'd made since last boot, because TC did EVERYTHING in memory and saving for the next session was essentially a hack that only happened on a clean shutdown. This was the worst feature of the OS, and they seem to have learned the error of their ways: the /home/ directory of an HD installation of TinyCore is an actual mounted (part of) a partition, and as such, changes are stored on write - not on shutdown. I don't know when this change occurred, and there may still be some quirks from their memory-only behaviour, but your /home/ files appear to be safe.