Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am just getting started with bootable removable media (DVD, USB, etc) but I have no idea how to make my own. I've reading up on how to make bootable ISOs and this post describes a process by which you extract the boot sector from an already-bootable DVD and inject it into another. However, at no point do you specify what to load once the DVD has booted.

As an initial trial, for example, I wish to run a simple bash shell from a bootable DVD or USB. How can I go about doing this? My initial thought would be to copy a bash binary to the media and then follow the above post's instructions for making it bootable. Is this all that is necessary? Surely the boot sector needs to know what to boot AND what format the executable is too? (ELF, Mach-O, PE, etc). Has anyone (reading this) done this kind of thing before?

share|improve this question
The second-stage boot loader loads the OS, which in turn executes something at startup. – Karan Feb 9 '13 at 1:16
@Karan What if there is no OS on the internal disk though? – Ephemera Feb 9 '13 at 2:58
For optical discs, there is a floppy emulation thing that you can put a bootable floppy image, which can contain a bootloader that can load a Linux kernel and initrd from the optical disc, which will in turn load init, and then start the default shell. – Alvin Wong Feb 9 '13 at 3:46
For USB flash drives, you need to write the MBR of a bootloader to it, so when booting it will load the bootloader, which also load a Linux kernel and blah blah blah. – Alvin Wong Feb 9 '13 at 3:49
The boot sector is essentially a tiny program that the CPU runs that points to a bigger boot system of some sort. Of course that doesn't help with the larger question you're trying to ask. – killermist Mar 4 '13 at 3:01
up vote 0 down vote accepted

The El Torito standard is a gross hack to make CDs bootable. Perhaps you should look at isolinux (for Linux).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .