Tiny Core Linux with Qemu — Part 01

RVLad
3 min readNov 27, 2023

--

Introduction

Logo of Tiny Core Linux
Logo of Tiny Core Linux

Welcome to this multiple part series for making use of Tiny Core Linux on Windows using Qemu.

I needed one tool to help with game development, which converts the tilesets to source code files — it is called tiled code generator. Since the tool itself is open-source, I first tried to compile it with gcc on windows. But it didn’t compile because dependency on some modules which are only available in Linux and porting it to windows compatible code may require a significant amount of work.

Hence, first I created a bootable Debian USB drive and compiled this code on the same for Linux. The resulting executable will only run on 64-bit Linux distribution. Hence, whenever I needed to use this executable, I needed to shutdown windows and boot into Linux — Not so convenient.

Possible Solutions

So, there are few possible solutions to make this little more convenient for a Windows user :

  • Use Windows Subsystem for Linux (WSL) to execute this binary — My first choice but not possible because I have bit older windows 10 machine with Ubuntu 14.04 LTS in WSL which has glibc-v2.19. But this program requires glibc-2.27. Updating the glibc will require updating the linux version of WSL, which may not be possible with my windows machine configuration(i5–6th gen) and storage (HDD, not SSD).
  • Build a Linux VM locally on Windows machine using VMware, VirtualBox or any other virtualization platform. Run this executable in same VM — This is not practical for me because the processor of my machine is not enough capable handle latest Linux OS, it will slow down the system to an extent which it is unusable. Also, boot time of virtual guest OS would be much longer.
  • Make use of Cloud platforms like AWS or Azure to host the Linux VM— Another viable option, but a little additional cost is associated with this option, I didn’t want to try this way.
  • The Final way I thought of was using Qemu to build and run VM of a very lightweight Linux distribution (which has just the required dependencies to run the program I wish). If I succeed, then this would result in cheapest (no additional cost, all the tools are opensource), lightweight (use the most lightweight linux distro.) method.

So, I started search for lightweight 64-bit Linux distros with glibc-v2.27 or higher. I came to know about the TinyCore Linux being one of the lightest linux distros ever with latest version of linux kernel. As of writing this post, the most recent version v14.0 of 64-bit TinyCore Linux (called TinyCorePure64) comes with Linux kernel 6.1.2, glibc v2.36 and gcc 12.2.0 — all these cool things at just 34 MB iso image. It matches exactly with my requirements and hence an ideal choice for me.

In next post “Part-02”, I will walk you through how to install the TinyCore Linux to a virtual hard disk image using qemu.

--

--