===== #General Notes =====
* Obtain a TC .iso image - [[http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/ | download the latest release]]
* The target system can boot from USB devices (or can chainload to do so)
* Popular bootloaders include: syslinux, extlinux, GRUB
* Some parts of this page was based on [[http://forum.tinycorelinux.net/index.php?topic=111.0 | USB forum thread]]
* In the case of a microcore installation, inclusion of core elements makes it impossible to unmount the usb drive. In this case just add a file called core2ram.flg in tce directory.
* Note:
* *Some USB storage devices can take a while before the system recognizes it
* *If errors are encountered during boot, it is likely that this is the cause of the problem
* *Try the boot option **waitusb=10** by appending it to the **kernel** line in your bootloader configuration
* *See [[Boot Options]] for more info
* Choose one of the guides below
* --
===== #usbinstall script: Installing within TC =====
This provides USB-HDD (ext2 or FAT) and USB-ZIP support.
As of TC 2.1, the usbinstall script is included in the base. MicroCore (MC) support can be found in 2.2rc2 or later.
The tool is found in the menu (Tools -> USB_Installation), or the control panel GUI as "USB Install"
If using MC, the usbinstall script must be executed with root privileges:^sudo usbinstall^
The installer will ask you what kind of boot method you wish, and will give you dmesg output to help you discover where your USB stick is located.
==== Upgrade ====
There is an prompt to upgrade instead of Install. If anyone knows what this does, please edit.
==== Install from Running OS ====
If you choose to install from the running OS, and you are booted from the ISO, then you have no /boot directory, whose contents are required to complete installation. For this reason you must mount the cdrom.
mkdir /mnt/cdrom
mount /dev/hdc /mnt/cdrom
When prompted by the installer for path to bzImage and tinycore.gz, enter
/mnt/cdrom/boot/
==== Install from ISO ====
The installer must have access to the ISO file, NOT a mount of the ISO file. I am unsure where this is located in a running TC session being run from the CDROM.
* --
===== #Installing to USB with GRUB under a Linux distro =====
''This part was originally written from dentonlt''
What follows is a brief howto (about four steps) for installing to a USB stick from within Linux. You need:
* The current TC iso
* GRUB (if it's not on the stick already)
* a working Linux installation
* to know how to use a terminal & text editor
* to know your USB stick device path (something like sda1, sdb2, etc.)
==== # Mount the TC iso file locally ====
Use sudo if needed:
^ mount isofile isomountdirectory -o loop
^where isofile is the current TC iso file, and isomountdirectory is the directory you'll mount it to.
==== # Mount your USB stick and copy the contents of the iso file to your USB stick ====
Do something like:
^ mount /dev/sda1
cp -vR /isomountdirectory/* /usbmountpoint/
^where isomountdirectory is from step 1, sda1 is your drive, and usbmountpoint is ... yep. Your usb mount point.
==== # Install GRUB to your USB stick ====
(if it's not there already). See the details in the Installing GRUB section of [[Installing TC]] if you need a primer. BE CAREFUL - don't overwrite your hard drive bootloader. Enough said.
==== # Edit your GRUB menu.lst file ====
(probably in usbstick/boot/grub) to include a standard TC item:
^ title tinycore
kernel /boot/bzImage
initrd /boot/tinycore.gz
^
All done - go at it.
==== #Notes ====
Optionally, include your extension/app directory on the kernel line (read about extensions at the [[http://www.tinycorelinux.com/concepts.html|TC Core Concepts page]]). Specify the device as the information **after** /dev/. Something like:
^ kernel /boot/bzImage tce=device/tcedirectoryname
^
* --
===== #UNetbootin =====
If the target is a bootable pendrive, then one might try UNetbootin from another OS (Windows or Linux).
You can get UNetbootin from: http://unetbootin.sourceforge.net
- Format pendrive fat32 from the other OS
- Obtain the TC iso
- Run unetbootin
Just choose iso image and specify full path then specify the pendrive to use.
After successful installation you can edit syslinux.cfg file to add/change boot options.
* --
===== #Installing under Debian =====
''This part was originally written from dmoerner''
''This is a shameless modification of the old DSL instructions (written by SaidinUnleashed, to give full credit).''
Please report findings on this page or via the forum thread: http://forum.tinycorelinux.net/index.php?topic=111.0
This was performed from a Debian Sid x86 system. The USB stick is /dev/sdc1.
==== # Install necessary tools ====
On Debian this is syslinux, mtools, and dosfstools:
^aptitude install syslinux mtools dosfstools^
==== # Partition the thumb drive ====
I used fdisk to partition the thumb drive into one large FAT32 partition. The following directions are from memory but should be correct.
^umount /dev/sdc1 # Never use fdisk on a mounted partition
fdisk /dev/sdc1
d
1
d
2
d
3
d # These commands delete all partitions currently on the device
n
p
1 # This makes a new primary partition
a
1 # This makes it bootable
t
1
b # This makes it FAT 32
w^
Now, I always overwrite the drive's mbr in case it was used for booting from grub sometime in the past. This is not normally necessary.
^dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdc^
Now, make a FAT 32 partition:
^mkfs.vfat -F 32 /dev/sdc1^
==== # Copy over the files ====
You will need to mount the iso image using loopback and then copy over the files.
^mkdir /mnt/iso
mount -o loop tinycore_1.0rc1.iso /mnt/iso
mkdir /mnt/usb
mount /dev/sdc1 /mnt/usb
cp /mnt/iso/* /mnt/usb^
==== # Set up syslinux ====
Since the ISO uses isolinux, we will need to make some changes
^mv /mnt/usb/boot/isolinux /mnt/usb/boot/syslinux
mv /mnt/usb/boot/syslinux/isolinux.cfg /mnt/usb/boot/syslinux/syslinux.cfg
rm -f /mnt/usb/boot/syslinux/isolinux.bin
syslinux /dev/sdc1^
==== # Cross your fingers, unmount the flash drive, and reboot. ====
If you get an error like "image linux not found" when booting, you forgot to correctly rename the isolinux files to syslinux.
==== #Appendix ====
==== !#APPENDIX A: Using Grub ====
You can also use grub to manage booting the pendrive, as described at [[http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/tce/grub-0.97-splash.tce.info|grub-0.97-splash.tce.info]]. However, the process is a bit more involved than that. After installing grub, you need to do the following:
^mkdir -p /mnt/usb/boot/grub
rm -rf /mnt/usb/boot/isolinux
cp /usr/lib/grub/i386-pc/*stage* /mnt/usb/boot/grub
grub # now follow the instructions in the .info document
cat > /mnt/usb/boot/grub/menu.lst << EOF
default 0
timeout 5
title tinycorelinux
root (hdX,Y)
kernel /boot/bzImage quiet
initrd /boot/tinycore.gz
EOF
^
==== !#APPENDIX B: Persistent /home ====
I have not tested this yet, but if you want a persistent, encrypted /home on the thumb drive, the easy method would probably be to use fdisk to make one tiny FAT32 partition on the thumb drive and one larger ext2 partition. Then specify the ext2 partition using the directions in the "help" file to use an encrypted home.
* --
===== #Booting from ISO with Grub4dos =====
Using [[http://grub4dos.sourceforge.net/wiki/index.php/Grub4dos_tutorial|Grub4dos]] it's possible to boot directly from an iso image. [[http://sourceforge.net/projects/grub4dos/|Grub4dos]] extends the functionality of regular Grub.
==== #Possible options ====
==== !#From a USB stick ====
Grub4dos can be installed directly into the MBR on a USB stick or it can be chainloaded from other bootloaders such as syslinux, lilo or grub thereby eliminating the need to install it onto the MBR. See [[http://grub4dos.sourceforge.net/wiki/index.php/Grub4dos_tutorial#Loading_GRUB_for_DOS_using_other_boot_loader|here]].
==== !#From Windows ====
It is also possible to have Grub4dos (grldr) loaded directly by NTLDR and also Vista's boot manager. See [[http://grub4dos.sourceforge.net/wiki/index.php/Grub4dos_tutorial#Booting_GRUB_for_DOS_via_the_Windows_NT.2F2000.2FXP.2F2003_boot_manager|here]].
==== #Menu entry ====
The next step is to create a suitable entry in menu.lst for the tinycore/microcore linux iso
^title Tinycore Linux
find --set-root /images/tinycore_2.5.iso
map --mem /images/tinycore_2.5.iso (0xff)
map --hook
chainloader (0xff)^
That will then boot the iso as if it were on a CD and load ISOLINUX.
Note that an emulated CD cannot be accessed once the Tiny Core kernel starts executing [[http://diddy.boot-land.net/grub4dos/files/map.htm#hd32]]:
"The "map" process is implemented using INT 13 - any disk emulation will remain accessible from an OS that uses compatible mode disk access, e.g. DOS and Windows 9x. The emulation can't however, be accessed from an OS which uses protected mode drivers (Windows NT/2000/XP/Vista, Linux, FreeBSD) once the protected mode kernel file(s) take control."
In particular, Tiny Core extensions in a top-level /tce directory of an ISO cannot be loaded from an emulated CD. The boot process does work with extensions that are contained within the /opt/tce directory of the initrd file /boot/tinycore.gz (or /boot/microcore.gz) on an ISO on an emulated CD.
* --
===== #"Universal USB Installer" (Windows only) =====
To install your ISO image from Windows, download the installer from here: http://www.pendrivelinux.com/downloads/Universal-USB-Installer/Universal-USB-Installer-v1.7.4.exe . This method has been tested under Windows XP with tinycore_3.0.iso.
Place the installer in the same folder as the ISO image. Start the installer. It will invite you to choose a distro ISO from the drop-down menu. Go to the end of the list and choose "Try Some Other Live Linux ISO". Browse to your ISO and select it.
Next you will select the drive that is your USB key from a drop down menu. Click "Create". When you have the "done" indication you may dismount your USB key. It should be ready to boot.
Reference: http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/
* --
===== #isohybrid: convert CD image to hybrid CD/HDD image =====
http://syslinux.zytor.com/wiki/index.php/Doc/isolinux#HYBRID_CD-ROM.2FHARD_DISK_MODE
wget 'http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/release/tinycore-current.iso' # download iso
md5sum tinycore-current.iso # (optional)
isohybrid tinycore-current.iso # add USB boot capability to ISO
The following assumes that **sdX** is your USB drive. **All data will be lost!**
With root privileges:
umount /dev/sdX* # if mounted...
dd if=tinycore-current.iso of=/dev/sdX
cfdisk /dev/sdX # (optional) free space left on device for additional partitions
partprobe