SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2011-11-18 19:05:30

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

How To: burn an iso to cd/dvd (CLI)

i don't like a GUI option when something like this can be done in a single command line. so this is a guide to burn an iso-file to CD/DVD using the command line (and using a DVD in this case).

first of all, when you go Googling for this stuff, you'll find most people posting methods for the app 'cdrecord'. however, cdrecord seems to be deprecated and replaced by an app called 'wodim' (what is that an abbreviation for?)
the nice thing is wodim takes a lot of the same command line options as cdrecord, so the existing tutorials can still be useful.

you need to tell wodim where your burner is (assuming you do not know which /dev/blah it is).

[19:56:34]$ wodim --devices
wodim: Overview of accessible drives (1 found) :
-------------------------------------------------------------------------
 0  dev='/dev/scd0'    rwrw-- : 'Optiarc' 'DVD RW AD-5540A'
-------------------------------------------------------------------------

(be aware: this does not work when your player is in use. i checked this with 'mount', which showed '/dev/sr0 on /media/cdrom0 type udf (ro,noexec,nosuid,nodev,user=rhowaldt)'. i freed it by doing 'umount /media/cdrom0')

now, to burn the iso:

[19:59:08]$ wodim -eject -tao speed=1 dev=/dev/scd0 -v -data /PATH/TO/YOUR/FILE.iso

that's it! i hope someone finds a use for this.

edit 28.04.12: in case you are also looking for a way to blank your discs, check out this script by 2manydogs: http://crunchbanglinux.org/forums/post/212648/#p212648

Offline

Help fund CrunchBang, donate to the project!

#2 2011-11-18 19:10:14

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,654

Re: How To: burn an iso to cd/dvd (CLI)

That's actually great. I burn stuff to DVD once a year or so, so it would be pointless to install an entire burning suite like xfburn or k3b (I don't let Brasero near my computers).

Offline

#3 2011-11-19 14:17:12

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 9,249

Re: How To: burn an iso to cd/dvd (CLI)

Cool tutorial!

rhowaldt wrote:

'wodim' (what is that an abbreviation for?)

"Write Optical DIsc Media".  It's also supposed to be evocative of Odin/Wodin, just as Thunar alludes to Thor.


while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.

Offline

#4 2011-11-19 17:05:37

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: How To: burn an iso to cd/dvd (CLI)

thanks to both of you for the kind words, and to pvsage for explaining the abbreviation smile

Offline

#5 2012-04-14 21:06:30

Unia
#! Die Hard
From: The Netherlands
Registered: 2010-07-17
Posts: 3,176

Re: How To: burn an iso to cd/dvd (CLI)

I remembered I saw something like this some time ago here. As I rarely burn something to disk but just some days ago found myself in the need for it, I installed xfburn. Not satisfied with that solution my memory starting working and now I found this.

Perfect! smile


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
      Github || Deviantart

Offline

#6 2012-04-14 22:43:23

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: How To: burn an iso to cd/dvd (CLI)

^ yessssss! good! great! thanks!

Offline

#7 2012-04-28 15:38:09

Unia
#! Die Hard
From: The Netherlands
Registered: 2010-07-17
Posts: 3,176

Re: How To: burn an iso to cd/dvd (CLI)

Do you have a way to blank discs? Using wodim, no matter what blank option I use, I get

Error: this media does not support blanking, ignoring.
This drive or media does not support the 'BLANK media' command
wodim: Cannot blank disk, aborting.
wodim: Some drives do not support all blank types.
wodim: Try again with wodim blank=all.

If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
      Github || Deviantart

Offline

#8 2012-04-28 15:48:51

2ManyDogs
dv#!
From: elsewhere
Registered: 2011-11-22
Posts: 1,346

Re: How To: burn an iso to cd/dvd (CLI)

I use these commands:

# blank cd
sudo wodim dev=/dev/scd0 blank=disc
# write ISO image to disc
sudo wodim dev=/dev/scd0 driveropts=burnfree speed=1 -dao fs=16m <path_to_iso>

From this post from xaos.

Just used them yesterday and this morning to blank and burn a cd-rw.

(edit) -- I had to change /dev/scd0 to /dev/cdrw on my machine

Last edited by 2ManyDogs (2012-04-28 16:32:33)


Be eggsalad to each other.

Offline

#9 2012-04-28 15:51:44

Unia
#! Die Hard
From: The Netherlands
Registered: 2010-07-17
Posts: 3,176

Re: How To: burn an iso to cd/dvd (CLI)

Same result sad


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
      Github || Deviantart

Offline

#10 2012-04-28 15:56:48

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: How To: burn an iso to cd/dvd (CLI)

i'd wish i could help you but i never even felt the need to blank a disc so never tried this out. so, if the commands from Mr Dog aren't working for you, i'd start thinking it might be a problem with your player or the disc. at least that's what the error-code is suggesting.

Offline

#11 2012-04-28 16:38:59

Unia
#! Die Hard
From: The Netherlands
Registered: 2010-07-17
Posts: 3,176

Re: How To: burn an iso to cd/dvd (CLI)

rhowaldt wrote:

i'd wish i could help you but i never even felt the need to blank a disc so never tried this out. so, if the commands from Mr Dog aren't working for you, i'd start thinking it might be a problem with your player or the disc. at least that's what the error-code is suggesting.

Yea, just wanted to be sure before diving into this. Guess I'll have to figure out what other disc burners use to blank discs.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
      Github || Deviantart

Offline

#12 2012-04-28 17:16:29

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 9,883
Website

Re: How To: burn an iso to cd/dvd (CLI)

Nice one rhowaldt...  I had never seen this one.  I have now added it to #! Quick References


VSIDO | LinuxBBQ
If you build it, they will come...
Words That Build Or Destroy

Offline

#13 2012-04-28 17:23:56

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: How To: burn an iso to cd/dvd (CLI)

^ whew, thanks! i figured it was already there but never bothered to check. also never bothered to PM anonymous about this one when he was still in charge of the Quick Reference smile

Offline

#14 2012-04-28 17:32:13

damo
#! Die Hard
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 653

Re: How To: burn an iso to cd/dvd (CLI)

Aint that weird - I just posted a link to this howto this afternoon in the question about xfburn, and now I see activity here!


Artwork at deviantArt; Iceweasel Personas; GDM #! Themes;
SLiM #! Themes

Offline

#15 2012-04-28 17:33:04

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 9,883
Website

Re: How To: burn an iso to cd/dvd (CLI)

^ We move in strange ways...


VSIDO | LinuxBBQ
If you build it, they will come...
Words That Build Or Destroy

Offline

#16 2012-04-28 19:40:43

2ManyDogs
dv#!
From: elsewhere
Registered: 2011-11-22
Posts: 1,346

Re: How To: burn an iso to cd/dvd (CLI)

Here is a little script I wrote to do this. I call it "blnkdsk" but of course you can call it whatever you like. If you call it with no argument, it just blanks a r/w disk. If you call it with the name of an iso file, it writes the iso to the disk.

#!/bin/bash

# use wodim to blank or write a CD R/W

grn="\e[32m"
blu="\e[36m"
rst="\e[0m"
red="\e[31m" 

if [ -z $1 ]; then
# no arg specified, just blank disk
    str="sudo wodim -v -eject dev=/dev/cdrw blank=disc"
    cmd="blank CD R/W"
else
# write specified iso to disk
    if [ -e $1 ]; then  # file exists
        str="sudo wodim -v -eject dev=/dev/cdrw driveropts=burnfree speed=1 -dao fs=16m "$1
        cmd="write "$1" to CD R/W"
    else
        echo -e $red"can't find iso file: "$1$rst
        exit 1
    fi
fi

# 'cmd' is what we're going to do, 'str' is the actual command string

echo -e $grn$cmd
echo -e $blu$str$rst

$str
exit 0

Last edited by 2ManyDogs (2012-04-28 19:42:24)


Be eggsalad to each other.

Offline

#17 2012-04-28 19:48:18

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: How To: burn an iso to cd/dvd (CLI)

^ thanks! edited the 1st post with a link to your post, for quick(er) reference.

Offline

#18 2012-04-28 20:06:11

2ManyDogs
dv#!
From: elsewhere
Registered: 2011-11-22
Posts: 1,346

Re: How To: burn an iso to cd/dvd (CLI)

^ you're welcome. I hope I didn't do anything stupid in the script; I'm no bash-master. It blanks and burns isos reliably for me, though. wodim works nicely for CDs and CD-RWs too -- do you think you should change the how-to title so more people might find this method?

After my latest (failed) attempt to burn an iso to CD with xfburn, I removed it from my machine and will only use wodim from now on. It's a little slower, but always works.

Last edited by 2ManyDogs (2012-04-28 20:07:59)


Be eggsalad to each other.

Offline

#19 2012-04-28 20:08:51

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: How To: burn an iso to cd/dvd (CLI)

^ edited the title and a bit of the first post to reflect this is also possible for CDs.

Offline

#20 2012-06-07 22:04:36

Unia
#! Die Hard
From: The Netherlands
Registered: 2010-07-17
Posts: 3,176

Re: How To: burn an iso to cd/dvd (CLI)

I have finally found a solution for not being able to blank my discs. I assume this is because wodim is essentially a CD burning application - not DVD.

Find the solution here:
https://wiki.archlinux.org/index.php/DV … table_DVDs


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
      Github || Deviantart

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo