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
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 Appbrowser)
Click on File > Connect
The list on the left side should now be populated. Select cfdisk.tcz from the list.
Then click Install Selected button located in the bottom left corner. It should report that it was installed successfully.
Now repeat this process, by selecting and installing grub-0.97-splash.tcz.
2. Open a root shell
In JWM, you can right-click the desktop to access the menu, and then navigate to XShells > Root Access > Dark. (Choose one)
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.
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
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:
cp -p /usr/lib/grub/i386-pc/* /mnt/hda1/boot/grub/
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.
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 for 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.
reboot
Note: the system may need to be configured to boot hdX first in the BIOS.