I've had some success extending the OP method (thanks
SvOlli).
The Main Goals:1. Supply bootcodes via the bootloader in the usual TC manner
2. Reduce time GRUB4DOS takes to access the TC ISO
3. Produce a simple to maintain USB flash drive, able to boot multiple OSs via ISO
I managed to achieve 1 and 3, and hope progress might be possible on 2 with help from the Core team.
The following method illustrates how to create a USB device that directly boots ISOs and images via different GRUB4DOS methods.
[1]What is needed:Tools
* dosfstools.tcz
* grub4dos.tcz
* mke2fs (provided by default in standard TC)
ISOs and Images
* Tinycore ISO (tested with v3.7.1 - 10MB - uses mapping to memory)
[2]* UBCD ISO (tested with v5.1 - 352MB - uses direct mapping)
[3]* Balder10 IMG (FreeDOS floppy disk from Finnix - 1.4MB uses direct mapping)
[4]Storage
* USB flash drive (suggest size=1GB for demo)
Prepare the USB Flash Drive [5]* Blank the start (or all) of the device
* Create 2 partitons
sdx1=FAT16 size=500MB (for ISO/IMG storage)
[6] sdx2=ext2 size=all remaining space (for TC data storage)
Prepare the ISOs and Images* Ensure the files are named:
tinycore.iso
ubcd51.iso
balder10.img
Store the ISOs and Images* Mount /mnt/sdx1
* Copy the files to /mnt/sdx1
Make the USB Device Bootable* Copy /usr/local/share/grub4dos/grldr to /mnt/sdx1
* Create the following text file /mnt/sdx1/menu.lst
[8]# menu.lst displays a menu when booting via GRUB4DOS
# http://diddy.boot-land.net/grub4dos/Grub4dos.htm
timeout 5
default 0
color cyan/black black/light-gray green/black yellow/black
# 0
title Tinycore Desktop (Mount Mode, Persistent Extensions, /home, /opt)
root ()
map --mem /tinycore.iso (hd32)
map --hook
root (hd32)
kernel /boot/bzImage quiet waitusb=5 norestore tce=UUID=uuid-of-sdx2 home=UUID=uuid-of-sdx2 opt=UUID=uuid-of-sdx2
initrd /boot/tinycore.gz
# 1
title UBCD Toolkit (inc Clonezilla, MHDD, Parted Magic)
root ()
map /ubcd51.iso (hd32)
map --hook
chainloader (hd32)
# 2
title Balder10 FreeDOS (Defrag FAT16 Partition)
root ()
map /balder10.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
map --floppies=1
* Unmount /mnt/sdx1
* Create a Master Boot Record on the USB Device
/usr/local/share/grub4dos/bootlace.com --time-out=0 /dev/sdx
Notes:[1] GRUB4DOS has two methods of accessing an ISO or image file. Mapping to memory is the slowest and is best suited to small files. Direct mapping is almost instantaneous and suited to both small and large files.
[2]
http://distro.ibiblio.org/tinycorelinux/downloads.html[3]
http://www.ultimatebootcd.com/download.html[4]
http://www.finnix.org/Balder[5] The method assumes the USB device to be /dev/sdx, change this to the actual value.
[6] Direct mapping requires that the file occupies contiguous disk space. The developer of GRUB4DOS has indicated that ext2/3 may not be the best choice for this. Balder10 includes a defragmenter for FAT16.
[7] Defragmenting sdx1 might also be done by copy out of files from sdx1, reformat sdx1, return files to sdx1.
[8] Replace uuid-of-sdx2 with the actual UUID value
OutcomeI have other ISOs and images that might have been illustrated but felt that too many examples might not be helpful. Adding another ISO or image is a simple matter of dropping it into the root of sdx1 and adding an entry in menu.lst. Updating is just a matter of replacing the old ISO or image file with a newer one.
TC can be started with the preferred bootcodes automatically provided by the boot loader. Its usual persistent directories are maintained on a separate ext2 file system - transparently from the user viewpoint.
Tinycore can only be made to operate using the map --mem method. This prolongs the overall loading time as the ISO must first be read into memory before TC starts to load. UBCD and Balder are much larger and smaller respectively than TC. Both begin loading faster than TC as a result of using the direct mapping mode. This is where the Core team might be able to help obtain a TC ISO that can be booted via direct mapping.
Edit
Incorrectly stated achieved goals 1 &2. Corrected to achieved goals 1 & 3.
Corrected some typos.
Minor amendments to improve clarity.