iso

How to format a disk image

Usually, you won’t create a disk image; in fact most of the times you would download it and then mount it somewhere or burn it to a CD/DVD.
However, there are cases in which you could need to create a disk image of a given size, format it and then mount it as a normal device. This happens for example when you want/need to set up a swap file instead of a swap partition or if you want to get a fake floppy disk drive when you don’t even have the driver.

So, let’s see how can you create, format and mount a floppy disk1 fake image:

  1. Create the file that will contain the image with

Building custom Debian live CDs with live-helper / live-magic


If you want to generate a custom Debian live CD, including only the tools you want (and maybe additional tools you don't find in other live CDs) there's a really simple solution: live-helper.

Creating a basic bootable Debian live CD ISO image in the current directory is as simple as:

$ lh_config
$ lh_build

That's it. The result will be a file called binary.iso, which you can either burn on a CD-ROM via

$ wodim binary.iso

or test in QEMU using a command line like this: