:: krowemoh

Thursday | 26 DEC 2024
Posts Links Other About Now

previous
next

Installing TinyCore Linux using QEMU

2023-08-09
sysadmin

Tiny Core Linux is a tiny distribution of Linux that clocks in at about 17mb. These are my instructions to get it working with qemu and it's relatively straightforward. The biggest thing was that I had to use the curses option when loading the iso as nographic seems to lose things.

There are somethings to be aware of when using Tiny Core as it is quite different from other linux distros. I don't read good so it'd be worth reading the the Tiny Core book to understand what the goals of the project are.

The key thing! Tiny Core Linux doesn't persist things by default and it has it's own packaging system.

The first step is to download the current[as of the post date] release:

wget http://tinycorelinux.net/14.x/x86/release/Core-current.iso

Next create a hard drive to install to.

qemu-img create -f raw core.img 1G

Now we can start it up, make sure to use the curses flag here.

qemu-system-x86_64 -m 512 -nic user -boot d -cdrom Core-current.iso -drive file=core.img,format=raw -curses

Once we are at the tinycore terminal, we now need to install the install script. This was a bit strange.

tce-load -wil tc-install
sudo tc-install
sudo poweroff

Packages are installed with the tce-load command and the flags have specific meanings as flags do. The w flag is to download the extension, the i flag is to install it and the l flag is to not link it to onboot. I don't want tc-install available after this inital step so I used this flag.

You can also install a fresh copy of tinycore or use the version you are currently in when installing to the disk.

Once tinycore is installed, you can start it up from the disk:

qemu-system-x86_64 -m 512 -nic user -hda core.img -curses

Inside tinycore, now I installed the following tools. wget is already available but for some reason it's a version without ssl support. From a minimalist standpoint it makes perfect sense.

tce-load -wi wget
tce-load -wi make
tce-load -wi glibc_base-dev
tce-load -wi compiletc

I left off the l flag because I want these available even after shutting down and bringing it back up.

By default anything done to the filesystem is not persisted. To have things persist you can use the backup command to save things in the home directory. This however doesn't save anything that you might install or set up elsewhere. There are instructions to set up true persistance but this was enough for me.

backup

A very interesting little distribution. I need to find a reason to use it.