Sunday, May 3, 2009

Make FAT16/32 Thumbdrive Bootable with syslinux

Is it so special?

Mostly people know default Linux file systems are ext2/ext3.
If you'd like to boot it, you have to use one of those file systems.

As a result, if you format your thumbdrive with those Linux file system, the thumbdrive will not be accessible by Windows (unless you install special driver on it).

This may become uncomfortable if you have to bring your thumbdrive to Windows PCs and enquire your colleages/friends to follow your "techy" style when you need to share your files with ext2/3 file system.

FAT16/32 is commonly supported by Windows and Linux.
You may want to make your thumbdrive to be multifunctions: can store/share files easily for Windows, and can boot Linux as well.

So, the answer is syslinux.
You can maintain to keep FAT16/32 on your thumbdrive, and at the same time, make it bootable.

Here are the steps:

1. Download the latest syslinux
2. Extract it to let say C:\utils\syslinux-3.73
3. Mark the thumbdrive bootable by executing syslinux.exe located at win32 folder
(for example: if your thumbdrive is mapped at F: drive, execute "syslinux.exe -ma f:"
4. Create a folder in your thumbdrive to place linux binaries (e.g. F:\puppy412)
5. Copy/extract one of linux distribution (e.g. Puppy Linux) that has USB live booting support into it
(get 7-zip if you need to extract ISO file for it)

6. Create/edit syslinux.cfg (at main directory of the thumbdrive, e.g. F:\syslinux.cfg) and point the boot file to your linux folder

Example syslinux.cfg:
(for Puppy Linux, you just need to copy/rename isolinux.cfg to syslinux.cfg)
default puppy
display /puppy412/boot.msg
prompt 1
label puppy
kernel /puppy412/vmlinuz
append initrd=/puppy412/initrd.gz pmedia=usbflash noapic acpi=off
label linux
kernel /syslinux/chain.c32
append hd1
timeout 50

7. Boot your thumbdrive and see it booting with your favorite Linux























Wanna have more fun with syslinux?
Well, just dig more on its web.