Page 1 of 1

Modding an ISO for easy installation on an USB pen drive

Posted: Sat Jun 11, 2011 2:25 pm
by Neolander
Hello everyone !

Lately, I've discovered that you can make a liveUSB out of certain CD images simply by DDing the image onto a USB pen drive. As an example, it works with most of Fedora's ISOs.

http://fedoraproject.org/wiki/FedoraLiv ... Linux_only

I'm amazed by the beautiful simplicity and geekiness of this, and since I've recently switched to CD images for my OS, I certainly would like to get this trick working with my own ISOs too. However, the page linked above seems to imply that this only works with some Fedora images, which I assume have been tweaked specifically for this purpose. So my question is, how should I tweak my ISO images so that this trick works ?

Re: Modding an ISO for easy installation on an USB pen drive

Posted: Sun Jun 12, 2011 4:07 am
by Combuster
I can't be bothered to download a Fedora image to inspect it, but an ISO 9660 filesystem starts off with several reserved sectors which are intended for booting mechanisms, and several non-x86 architectures indeed use it for that purpose. It means that you can use that same space to insert a typical MBR bootsector and other bootloader stages so when you copy the image to USB it will boot the image as a harddisk, reading the MBR in the first 512 bytes of the image, while if you boot it as a CD it will start from an El-torito configuration. Both bootstraps can then start a common bootloader. You just have to make sure it can read the ISO filesystem independent of the device's sector size.

Of course, that's just one possible use of the reserved area.

Re: Modding an ISO for easy installation on an USB pen drive

Posted: Sun Jun 12, 2011 4:28 am
by Neolander
Hmmm... Indeed, this looks significantly more complicated than I thought. Finding a bootloader which may boot on an ISO 9660 file system out of USB does not sound like a fun task, and the other methods use weird tricks like putting the system on a disk image file which is itself put on the CD.

Will just stick with regular ISOs right now, I think. Thanks.