<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Linux Blog &#187; Cd</title>
	<atom:link href="http://linuxblog.ro/tag/cd/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxblog.ro</link>
	<description>UNIX, LINUX, BSD, OSX</description>
	<lastBuildDate>Thu, 19 Aug 2010 14:32:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Burning Cd using Linux command Line</title>
		<link>http://linuxblog.ro/burning-cd-using-linux-command-line/</link>
		<comments>http://linuxblog.ro/burning-cd-using-linux-command-line/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 23:38:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Burning]]></category>
		<category><![CDATA[Cd]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[dvd]]></category>
		<category><![CDATA[using]]></category>

		<guid isPermaLink="false">http://linuxblog.ro/?p=193</guid>
		<description><![CDATA[This is a fully unix compliant tutorial of how to burn a cd/dvd by using linux command line.]]></description>
			<content:encoded><![CDATA[<h3 class="spip">Introduction</h3>
<p>I suppose here you got mkisofs, cdrecord and cdrdao What you need ?<br />
<img style="height: 11px; width: 8px;" src="http://www.math-linux.com/local/cache-vignettes/L8xH11/puce-32883.gif" alt="-" width="8" height="11" /> CD-Drive<br />
<img style="height: 11px; width: 8px;" src="http://www.math-linux.com/local/cache-vignettes/L8xH11/puce-32883.gif" alt="-" width="8" height="11" /> a CD-RW</p>
<p>We have to check the device of our drive(dev) to burn Cd using  command Line,</p>
<p>For Linux Kernels 2.6.x, we got:</p>
<p><span style="color: #003366;"># cdrecord -scanbus dev=ATA<br />
Cdrecord-Clone 2.01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling<br />
cdrecord: Warning: Running on Linux-2.6.10<br />
cdrecord: There are unsettled issues with Linux-2.5 and newer.<br />
cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.<br />
scsidev: &#8216;ATA&#8217;<br />
devname: &#8216;ATA&#8217;<br />
scsibus: -2 target: -2 lun: -2<br />
Warning: Using badly designed ATAPI via /dev/hd* interface.<br />
Linux sg driver version: 3.5.27<br />
Using libscg version &#8216;schily-0.8&#8242;.<br />
scsibus1:<br />
1,0,0   100) &#8216;MATSHITA&#8217; &#8216;UJDA730 DVD/CDRW&#8217; &#8217;1.00&#8242; Removable CD-ROM<br />
1,1,0   101) *<br />
1,2,0   102) *<br />
1,3,0   103) *<br />
1,4,0   104) *<br />
1,5,0   105) *<br />
1,6,0   106) *<br />
1,7,0   107) *</span></p>
<p>My drive is a Matshita UJDA730, it can read DVD. dev=1,0,0. If your kernel is 2.4.X, you have two ways to check your device, first:</p>
<p><span style="color: #003366;"># cdrecord -scanbus</span></p>
<p>second,</p>
<p><span style="color: #003366;"># cdrdao scanbus</span></p>
<h3 class="spip">How to make an image iso</h3>
<p>Command mkisofs will allow us to make an image iso of a directory. The following image iso will be named image.iso, you can call it foo.iso or save.iso, and path_of_your_directory is the absolute path of your directory, for example /home/user/project</p>
<p><span style="color: #003366;"># mkisofs -v -r -J -o image.iso path_of_your_directory</span></p>
<p>you can also do it for a file</p>
<p><span style="color: #003366;"># mkisofs -v -r -J -o image.iso path_of_your_file</span></p>
<p>Some explanations about the options used:<br />
<img style="height: 11px; width: 8px;" src="http://www.math-linux.com/local/cache-vignettes/L8xH11/puce-32883.gif" alt="-" width="8" height="11" /> -v is the verbose mode<br />
<img style="height: 11px; width: 8px;" src="http://www.math-linux.com/local/cache-vignettes/L8xH11/puce-32883.gif" alt="-" width="8" height="11" /> -r to reset the rights<br />
<img style="height: 11px; width: 8px;" src="http://www.math-linux.com/local/cache-vignettes/L8xH11/puce-32883.gif" alt="-" width="8" height="11" /> -J is the Joliet extension, it allows to support Long names of files<br />
<img style="height: 11px; width: 8px;" src="http://www.math-linux.com/local/cache-vignettes/L8xH11/puce-32883.gif" alt="-" width="8" height="11" /> -o is the output, here it is image.iso</p>
<h3 class="spip">Burning</h3>
<p>The idea is to make an image iso with mkisofs and next to burn this image in our CD. Once iso have been created, we use cdrecord:</p>
<p><span style="color: #003366;"># cdrecord -v -speed=10 dev=ATA:1,0,0 -data image.iso</span></p>
<h3 class="spip">Fast Burning</h3>
<p>Burn a CD could be faster without making ISO. We can do it through /dev/null. First, we have to find the size of ISO like follows:</p>
<p><span style="color: #003366;"># mkisofs -r -print-size path_of_your_directory</span></p>
<p>If you want to burn a file:</p>
<p><span style="color: #003366;"># mkisofs -r -print-size path_of_your_file</span></p>
<p>We obtain an integer, it is the image size, look at this example</p>
<p><span style="color: #003366;">Total extents scheduled to be written = 30147<br />
30147</span></p>
<p>Now, the idea is to use a pipe on cdrecrord with the device. We are going to burn cd without making an image iso, just by using the image size (here 30147):</p>
<p><span style="color: #003366;"># mkisofs -r -print-size chemin_du_repertoire 2&gt;/dev/null | cdrecord -v  -speed=10 -dev=ATA:1,0,0 tsize=30147s -</span></p>
<p>for a file, if the size is 65432:</p>
<p><span style="color: #003366;"># mkisofs -r -print-size chemin_du_repertoire 2&gt;/dev/null | cdrecord -v  -speed=10 -dev=ATA:1,0,0 tsize=65432s -</span></p>
<h3 class="spip">Erase a  CD-RW</h3>
<p>You can find here the fast method:</p>
<p><span style="color: #003366;">cdrecord -v  -speed=10 -dev=ATA:1,0,0 -blank=fast</span></p>
<p>and the complete on:</p>
<p><span style="color: #003366;">cdrecord -v  -speed=10 -dev=ATA:1,0,0 -blank=all</span></p>
<p>Thanks to <a class="wp-caption" title="Math-Linux" href="http://www.math-linux.com" target="_blank">math-linux.com</a> for this great tutorial!</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxblog.ro/burning-cd-using-linux-command-line/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
