Frugal Install Tiny Core Linux

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 better
starting 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.

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:

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.tcz
extension 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.