Linux: Howto download ISO files directly to a CD/DVD/BLU-RAY

It is possible to download .iso files directly onto a cd\dvd\blu-ray disk.

/dev/shm is a directory found on Debian & RedHat based distributions. (Please let me know if you find it on dists as well)
/dev/shm is a dynamic RAM disk, meaning it’s size will grow and shrink with the size of the files placed there.

The following process is especially ideal for users running Linux from RAM or small USB sticks.
No drive space will be used during the process & only a very small amount of RAM is used.

First create a FIFO (first in first out) on /dev/shm
Next we command the burner to write any data written to the FIFO onto the preferred medium (dvd, cd, blu-ray, etc.)
Then we download the file ‘directly’ onto the preferred medium through the FIFO.
And finally we remove the FIFO.

I’ll demonstrate this by downloading the “Fedora Core 13 LIVECD” ISO to a CD.

petur@laptop:~$ mkfifo /dev/shm/fedora-fifo
petur@laptop:~$ cdrecord /dev/shm/fedora-fifo &
petur@laptop:~$ wget http://ftp.crc.dk/fedora/linux/releases/13/Live/i686/Fedora-13-i686-Live.iso -O /dev/shm/fedora-fifo
petur@laptop:~$ rm /dev/shm/fedora-fifo

Attention! The -O parameter used with wget is case sensitive!

  • Share/Bookmark
This entry was posted in linux and tagged , , , , , , , , , , , , , , . Bookmark the permalink.

16 Responses to Linux: Howto download ISO files directly to a CD/DVD/BLU-RAY

  1. Awesome information!!! Thanks!

  2. emk says:

    great!

    thanks. /dev/shm is present on Arch Linux.

    emk

  3. Bertbeau says:

    OpenSUSE 11.3 has a /dev/shm also
    Your tip is very informative, Merci!
    Bert

  4. wejick says:

    hm , i’ll try it bert.
    smart trick

  5. Stcm says:

    /dev/shm is in Slackware 13.1

    I will try this later.

  6. KPB says:

    This could be tricky with flaky internet connections, like in India. I would have to be extremely lucky to get an entire ISO in one go.
    Oh yes, and the power not failing during that download.

    • Pétur says:

      If your internet connection fails then wget will fail and stop writing to the fifo.
      cdrecord should not stop, so it might be possible to launch wget again and ask it to resume the previous download…

      if anyone tries this let me know :)

    • tom pittman says:

      On flakey internet connections the “-c” switch allows wget to continue an interrupted download. Very useful to me in Alaska.

  7. Pingback: Linux: Howto download ISO files directly to a CD/DVD/BLU-RAY | Pétur Ingi Egilsson

  8. Le Hoang Long says:

    that means we can burn a new cd without k3b
    am i wrong or right

  9. Niki says:

    Is it useful to put the FIFO on a RAM disk?

    IIRC, a named pipe (FIFO) won’t write data on the disk anyway, it will handle all in memory. It is a “special file” which redirects its content in memory until it is consumed (read) — note that it will indeed only keep in memory the part that is not already read.

    (if you don’t have a /dev/shm directory, you can create your own easily, just look at “mount -t tmpfs NONE /tmp/shm” for instance)

  10. Pingback: Quickies: download ISOs direct to media « 0ddn1x: tricks with *nix

  11. mousegun says:

    PCLinuxOS has it!

  12. Pingback: Recover-lost-files.net – Data Recovery Software–Deleted or Lost Files | Internet News

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>