Create a Linux virtual machine that can run on a Windows, Linux, or Mac OSX host. The VM can be moved around on a USB drive or even synced via DropBox between machines.
The downside is that it's a bit slow under Windows - it needs a suitable driver to use hardware virtualisation, and there doesn't seem to be one for Windows hosts - still, it is fast enough to be useful. This document was tested with the 25-May-2016 (v7.0?) release of dCore TinyCoreLinux, running under Qemu v2.5.0 on Windows 7 (64-bit). Tiny Core Linux and the swap partition. In my previous posts related either to the Microcore installation or on the USB drive, I used the default option related to the swap file. Every Linux system can use either a dedicated swap partition or only a swap file on any existing partition in the system, in the same way as Windows uses pagefile.sys.
Tiny Core Linux is small and simple. Its size makes it the perfect guest OS for this project.
Create a directory called tc
to store all the files for this project.
Let's grab the latest Tiny Core Linux iso.
Once it is downloaded extract the vmlinuz
and core.gz
files from the iso
to our tc
folder. You can do this by mounting the iso
or opening it in some sort of archive manager like 7-zip and copying the files out.
You should now have these files in the tc
directory.
- Install Tiny (Micro) Core Linux on Local Disc: 3.1 Boot the machine from the bootable media containing the downloaded ISO Image. Once the boot process gets completed, you can check the version of Core Linux using “ version ” command. I am using Core 8.0 for this article.
- Gem install tinytds windows; docker usb device windows, (1) Select your USB Device from the drop down, (2) Choose the. The Raspberry Pi is a tiny and affordable computer that you can use to learn. In this post I will show you how to install docker on windows 7. CorePlus installation options. Tiny Core installation options.
Those files are our kernel and initramfs, respectively.
There are no official QEMU builds for Windows, but there are a number of unofficial builds.
I found that the builds by Eric Lassauge seemed the best for what I want to accomplish with this project. Download the latest Qemu Windows build zip
file (2.2.0 at the time this was written) from his website.
The most important reason I am going to suggest using the 'lassauge builds' for this project is that the files are entirely portable. No installation of any sort is required on Windows. Download and copy the QEMU files to our tc
directory and you will have a simple, portable, working VM platform for Windows.
Your tc
directory should look like this now.
There are a number of qemu-system-*.exe
files in Qemu-2.2.0-windows
that you do not need. You can safely delete all of them except for qemu-system-i386.exe
. That is the only binary we need to run our VM. Deleting the other system binaries will save us a lot of space.
On Linux, QEMU should be installable through your preferred package manager. On OSX, you should be able to use something like brew to install QEMU as easily as you could on Linux.
Let's create a hard disk for our VM. You may use the qemu-img
command that QEMU provides. This binary will either be in the Qemu-2.2.0-windows
directory we extracted if you're on Windows, or it should be installed system-wide if you're using QEMU on a Mac or Linux host.
That command should generate a 4GB sparse virtual hard disk file. The disk should only be a few KB large initially, but has the ability to grow up to 4GB. You can use whatever size or file format you prefer for the disk image, but I prefer vhd
since Windows can natively handle that format as an added bonus.
Your tc
directory should look like this now.
Now we can start our VM. You may prefer to script this so you don't have to memorize the command.
Windows
OSX or Linux
On Windows only, we need to specify the absolute path to the QEMU VM executable, and the -L
flag is needed to specify the path to our QEMU Bios
files (incuded with QEMU).
Regardless of the OS, we specify which file is our kernel, which is our initramfs, what to use as the primary hard drive, and finally, we pass some additional boot options to Tiny Core specifying where our home
, opt
, and tce
directories live.
Warning: You must run these commands inside the QEMU VM. If you run these commands on your host machine you may damage your system!
After you boot to the VM using the commands above, format the disk.
You can run these steps manually, but I am showing this single command to format the entire virtual hard drive.
Next, create an ext4
filesystem on our newly created partition.
Then reboot so that Tiny Core can use that disk.
At this point, you should be done, and just need to install packages to customize your VM as you see fit.
Here are some neat things you can do with QEMU.
Qemu has an awesome way to let you access just about any virtual hard disk using the 'Network Block Device' protocol. This will work on a *nix system only.
10.0.2.2
is an IP address that can be used to access your host VM from within the QEMU guest.
Frugal Install Tiny Core Linux
0. Introduction |
1. Obtaining cfdisk and GRUB via Appbrowser |
2. Open a root shell |
3. Partitioning |
4. Formatting |
5. Copy over TC system files |
6. Installing GRUB |
7. Testing |
0. Introduction
Before making the commitment to perform a frugal install you should consider our Quick and Easy Overview. It covers the basics of running Tiny Core from CDROM and/or USB pendrive. Most will find learning Tiny Core the quick and easy way a betterstarting point.
But for those who are ready to take the plunge to frugal, this guide shows step by step information on how to partition a blank IDE hard drive using cfdisk, copy over the TC operating system files, and install the GRUB bootloader on that drive.
It assumes that TC was booted from a liveCD and is already running on the target system with Internet access.
Keep in mind that this guide is basic and that the user may choose to adapt, remove and/or add parts as desired.
The result: a standard TC PPR installation.
Note: If you already have a Linux System booting via Grub, then you do not need to make a partition for Tiny Core! Tiny Core can run in a couple of directories in your existing Linux Grub installation. Skip to Step 5. You will only need to do Step 5 and add a Grub menu item (title, kernel, and initrd lines) as shown in Step 6.
1. Obtaining cfdisk and GRUB via Appbrowser
Click on the wbar icon Apps (or access the right-click menu on the desktop and selecting SystemTools/Appbrowser)
Click on Connect
The list on the left side should now be populated. Select cfdisk.tcz from the list.
Then click the Go button located in the bottom left corner. It should report that it was installed successfully.
Note: For microcore users, the command-line version of Appbrowser is ab, so you could use ab cfdisk, or to directly download and install, use tce-load -wi cfdisk.tcz
Now repeat this process, by selecting and installing grub-0.97-splash.tcz.
Note: For microcore users, the commnand line version of Appbrowser is ab, so you could use ab grub and select grub-0.97-splash.tcz, or to directly download and install, use tce-load -wi grub-0.97-splash.tcz
2. Open a root shell
Start a terminal, and type sudo su to make it a root shell:
3. Partitioning
Find a disk you want to install on. The following command will list your disks and their current partitions.
Install Tiny Core Linux From Windows 10
fdisk -l
Remember which disk will be used for installation. For the purposes of this guide, /dev/hda will be used.
The cfdisk command will be used to partition the hard drives.
cfdisk /dev/hda
Use the left and right arrow keys to navigate the bottom menu, and press Enter to select an option.
Navigate and select [ New ]
Select [ Primary ]
Input the size by entering the numbers you want, or accept the default. Press enter to accept. This demonstration will use 100 MB.
If prompted, choose where to put the new partition.
Set the boot flag on the new partition by selecting [ Bootable ]. Remember this partition as it will be used for installation. This guide will use hda1.
Setup the rest of the disk if preferred, when completed. Adding a swap partition is recommended.
Select [ Write ]
Confirm the write by entering 'yes':
Select [ Quit ]
4. Formatting
Format the new partition. This demonstration will use ext3. You may format other partitions here as preferred.
mkfs.ext3 /dev/hda1
After formatting rebuild the fstab file
rebuildfstab
Note that if you wish to migrate to ext4, or use grub 2, enable 256-byte inodes by adding -I 256 to the mkfs command above. (capital i)
5. Copy over TC system files and prepare for PPR mode.
Mount the new install partition:
mount /mnt/hda1
Create directories for TC files and GRUB:
mkdir -p /mnt/hda1/boot/grub
Mount the original boot media. For this guide, TC was booted from an IDE cd-rom drive on the second channel:
mount /mnt/hdc
Copy over the file:
cp -p /mnt/hdc/boot/* /mnt/hda1/boot/
This will copy over bzImage and tinycore.gz. Ignore any 'omitting directory' warnings.
Next setup the tce directory to store application extensions:
Micro Core Linux
mkdir -p /mnt/hda1/tce
Prepare file for backup & restore
touch /mnt/hda1/tce/mydata.tgz
6. Installing GRUB
Copy over GRUB files (please note that the grub-0.97-splash.tczextension will need to be installed as mentioned in step 1):
cp -p /usr/lib/grub/i386-pc/* /mnt/hda1/boot/grub/
The following assumes vi, a console text editor. You can use any other editor instead, for example the 'editor' in TC.
Create menu.lst: (note that 'lst' contains a lower case 'L')
vi /mnt/hda1/boot/grub/menu.lst
Presss i (enters insert mode)
Enter the following:
default 0
timeout 10
title tinycore
kernel /boot/bzImage quiet
initrd /boot/tinycore.gz
If unsure, copy and paste the above. Note there's a capital i in bzImage.
Optionally, add other bootcodes now on the kernel line separated by spaces.
Note: If you are using a pendrive or other Flash device, be sure to add the boot code of waitusb=5
Press <esc> when done.Enter :x (saves and quits)
Run GRUB:
grub
Note that grub uses hd numbers in the form of (hdM,n) and (hdM), instead of hdXy and hdX.
M corresponds to a number from '0', which represents 'a' for X.
For every letter after that, add one.
'b' is '1', 'c' is '2', 'd' is '3', etc.
n corresponds to a number from '0', which represents '1' for y.
Subtract 1 from y to get n.
'1' becomes '0', '2' becomes '1', '3' becomes '2', etc.
Since this guide is using hda1 for hdXy, this means that (hdM,n) is (hd0,0)
and that the use of hda for hdX means (hdM) is (hd0)
In the grub prompt,
root (hd0,0)
setup (hd0)
quit
Note: you can use tab to auto-complete.
7. Testing
TC and GRUB are now installed!
Remove the original CD boot media:
umount /mnt/hdc
eject /dev/hdc
To test, reboot the system.
Install Tiny Core Linux From Windows Xp
reboot
Install Tiny Core Linux From Windows 10
Note: the system may need to be configured to boot hdX first in the BIOS.