[sysadm - this is from a more nicely formatted odt document if you would like a copy. I realize there is a USB_Install tool - as far as I can tell it doesn't allow an ext2 install.]
7. USB Pen Drive Installation of Tiny Core Linux on an Ext2 File SystemThis is modified from original material written by dmoerner et.al.
Author: Ian Reid, 20100117
Here is how to create a pen drive with an ext2 filesystem, that boots into Tiny Core Linux 2.7. The installation allows persistent personal file storage, as well as both automatic and on-demand extension loading.
The procedure is fast, and uses both the command-line and easily installable Tinycore extensions. The most time-consuming part is typing in all the long pathnames.
Caution: you MUST be able to ascertain the correct mount point for your USB pen drive partition. Writing the bootloader to the wrong partition can render your host computer unbootable. Incorrect partitioning can erase all data on the host machine.
The USB device mount point in this example is /dev/sda1, yours could well differ.
You need:
- A Tinycore boot CD.
A host computer with CD, USB and ability to boot from either device. This example was performed on an old Fujitsu notebook with 512MB RAM.
A wired internet connection.
A USB pen drive – I recommend 128MB or larger.
7.1. PreparationBoot from CD.
insert USB pen drive
Download iso:
$ cd /tmp
$wget
ftp://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/tinycore_2.7.isoHere is another address if you need to get the iso some other way: ftp.nluug.nl/pub/os/Linux/distr/tinycorelinux/2.x/release/tinycore_2.7.iso
Using Appbrowser, install:
- beaver2.tcz
gparted.tcz
syslinux.tcz
7.2. Partition the thumb driveStart gparted from the tinycore menu.
Use extreme caution, close gparted without writing changes if you are not sure what you are doing.
Make sure you are viewing the USB pen drive. You can usually tell by the drive and partition sizes displayed adjacent to the device name in the partition selector in the upper right-hand corner.
Note the device name for future reference, e.g. /dev/sda1
If the device auto-mounted, you will have to unmount it before proceeding. See Partition menu in gparted.
Remove all partitions on the pen drive.
Create a new primary ext2 partition:
- Make size at least 128 MB .
Set the Label as “tinycore” (no quotes).
Apply the changes.
After creation, go to “Manage boot flags” and tick the Boot flag.
Close gparted.
Mount the new partition. Panel/Mount Tool is an easy way to this. If /dev/sda1 is not visible immediately after the partitioning, then remove the pen drive, wait 10 seconds, replace and wait a few seconds.
7.3. Mount the Pen Drive and Copy Over the Tinycore filesMount the downloaded Tinycore iso file:
- $ sudo mkdir /mnt/iso
$ sudo mount /tmp/tinycore_2.7.iso /mnt/iso -o loop
Copy the Tinycore files:
- $ cd /mnt/iso
$ sudo cp -R * /mnt/sda1
7.4. Use Extlinux to Make the Pen Drive Bootable$ sudo mkdir -p /mnt/sda1/boot/extlinux
Carefully double-check disk partition entry in next step:
$ sudo extlinux -i /mnt/sda1/boot/extlinux
Copy and rename config from tinycore iso:
$ sudo cp /mnt/iso/boot/isolinux/isolinux.cfg /mnt/sda1/boot/extlinux/extlinux.conf
7.5 Check Disk Volume Label and Add Boot CodesCheck partition label:
$ blkid -s LABEL /dev/sda1 - this should return, in part: LABEL=”tinycore”
If partition label is wrong or missing:
$ sudo tune2fs -L tinycore /dev/sda1
Check your results:
blkid -s LABEL /dev/sda1 - this should return, in part: LABEL=”tinycore”
Edit /mnt/sda1/boot/extinux/extlinux.conf
Example:
$ cd /mnt/sda1/boot/extlinux
$ sudo beaver extlinux.conf
find the line that starts with “append”
Append this string to the end, do NOT add any carriage returns:
waitusb=5 tce=LABEL=tinycore home=LABEL=tinycore opt=LABEL=tinycore restore=LABEL=tinycore
Your final append statement will look something like:
append initrd=/boot/tinycore.gz quiet max_loop=255 waitusb=5 tce=LABEL=tinycore home=LABEL=tinycore opt=LABEL=tinycore restore=LABEL=tinycore
7.6 Reboot and Add ExtensionsUse the Mount Tool to unmount sda1 (or whatever partition your pen drive is)
Reboot the computer, making sure to remove the CD, and that your BIOS is set to allow booting from a USB HDD device.
- My base install size was ~35MB on pen drive.
Use Appbrower to add desired extensions.
Adding Firefox, getFlash10, pcmanfm, flit, OSS, wireless-tools, wireless-2.6.29-1-tinycore, wpa_supplicant, Broadcom firmware and all the dependencies increased the total install size on disk to about 74MB.
RAM usage is about 220MB with Firefox/Flash and pcmanfm running.