Defcon-1-Logo

           [Home]    [FBSD Articles]    [Scripts Corner]    [Contribute]    [Search]    [FBSD Links]    [Files]

About Us

FreeBSD Articles
  *Hardware
  *Networking
  *Security
  *Software
  *X Windows


Files / Scripts
Newbies Corner
Tech. Talk
Tips and Tricks


FreeBSD Links

Articles in other
Languages :
  *French Articles
  *Spanish Articles

Want to Help ?
 
   Click Here

Email Users5

Search:
 

 


FreeBSD Search:


 

 

Powered-By-Apache-Logo

How To use a ATAPI CD Burner with FreeBSD 4.0

(Updated)

Overview

--------

Since my last article about writing CD's in FreeBSD, I experimented more with the concept, and therefore I devised a better, and more stable way of writing them with the burncd command.

By following my own set of instructions, I encountered problems with burncd. Sometimes, writing large images (say, around 600mb) the IDE bus would timeout, and reset, thus interuppting any burning in progress.

My other problem was the lack of buffering burncd used when reading the image for burning - any amount of hard drive activity would easily interupt the read process, and cause a buffer underrun. For instance, opening a manpage would suffice to create a buffer underrun in the current situation.

Solution

--------

As this document is an extension to my previous one, which explains how to set up your cd writer to be supported by freebsd, I will assume you have read that, and have your burner set up, as well as knowing how to dump/create an iso image.

To be able to create a sufficient buffer, you need to install the team utility from the ports collection.

# cd /usr/ports/misc/team/

# make && make install

Once completed, type my revised burncd command:

# cat /usr/misc/image.iso | team 100k 8 | burncd -f /dev/acd1c -s 2 data /dev/stdin fixate

Don't forget to exchange the settings for drive, where -s is the speed, and -f is the device.

What this command does is concatenates the contents of image.iso to the standard output, team then arranges it into 8 guy processes, each caching 100k buffers, which stream this to standard output. Burncd then reads this continuous dump from the standard in.

Some of the output from burncd might be concerning, such as the wild percentage complete estimate, and the 0KB file input (as it is reading from a character device).

You should see something along the lines of:

next writeable LBA 0

writing from file /dev/stdin size 0 KB

641474 kilobytes, 2141 seconds64079600%) total 640796 KB

written this track 641474 KB (64147400%) total 641474 KB

fixating CD, please wait..

Of course, the numbers vary on the size of your image.

This should now be a more practical way of burning and creating your CDs in freeBSD.

Final Notes

-----------

o I managed to test out the buffering, by allowing cron to execute its daily tasks halfway through my cd burning procedure. This **definitely** wouldn't have survived with the normal burncd command.

o This only applies to freeBSD 4.0 or later.

o Please give me some feedback on how you progress with burncd.

o I hope to write another doc soon on how to do disc to disc copies.

Good luck!

Andy Smith

Email Us

ghostrdr@defcon1.org

This site cannot be duplicated without permission

© 1998 - 2010 Defcon1, www.defcon1.org. Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission of www.defcon1.org and the content's original author.