Archive

Archive for February 11th, 2007

Howto burning an audio CD under Linux using just the command line

February 11th, 2007

The following command set allows you to take a selection of MP3 files, convert them into WAV file format and burn them to disc.

(run the following commands as root)

Convert the MP3 files to the WAV file format
for i in `ls *.mp3`; do lame --decode $i ; done

Before you can burn the WAV files to disc you should know the bus address it is connected to (as far as the operating system is concerned). To find this out, just run the following command:
cdrecord --scanbus

Look for the comma separated address of your cd-writer in the output and substitute the comma separated address e.g. 1,0,0 with the one shown in the dev parameter in the command line below:

Burn the WAV files to disc
cdrecord -dao -pad -audio -speed=4 -v dev=ATAPI:1,0,0 *.wav

After a short while you should end up with an audio CD you can play in a standard CD player.

phil Linux

Create an ISO image from an existing CDROM

February 11th, 2007

Here is a single line shell command to convert an existing CDROM data disc into a distributable ISO image.

In this example, I’m converting one of the Fedora Core 4 installation discs which I’ve already burnt to disc, back into an ISO image called fc4_disc1.iso.

(Run as root)
dd if=/dev/cdrom of=fc4_disc1.iso bs=2048 count=`isosize -d 2048 /dev/cdrom`

Note: The single quotes used on the count parameter are not those typically found on the same key as the @ symbol. The quote in use here can be found to the left of the number 1 button on your keyboard.

phil Linux