SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

Copyright (c) 1999 W. Michael Petullo <burn_baby_burn@flyn.org> All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

=============================== OVERVIEW =======================================

Burn_baby_burn contains a set of utilities for burning to CD-R and CD-RW media. The package allows one to easily perform tasks such as burning a directory, burning an audio CD, burning a CD image, and copying CD media from the command line. It also includes programs to build MPEG Layer III audio files from a CDDA CD.

Also included is a backup script, backup.sh, with the ability to burn ``El Torito'' bootable backup CD's. This distribution includes very simple init script for booting; it should probably be customized for your machine.

=============================== BUILDING =======================================

To build, cross your fingers and try:

./configure
make
make install

Review and install burn_baby_burn/burn_baby_burn and burn_baby_burn/init into /etc/burn_baby_burn.

Review and install burn_baby_burn/sets/* into /etc/burn_baby_burn/sets.

Review the new templates templates/conf/lilo.burn_baby_burn and templates/fstab/fstab.burn_baby_burn and install into /usr/share/new/templates (or wherever your new templates reside -- see new (1)).

You may want to wrap your cron jobs in the included do_nicely.sh script. For example, here is my /etc/crontab:


SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root do_nicely.sh "run-parts /etc/cron.hourly" 02 4 * * * root do_nicely.sh "run-parts /etc/cron.daily" 22 4 * * 0 root do_nicely.sh "run-parts /etc/cron.weekly" 42 4 1 * * root do_nicely.sh "run-parts /etc/cron.monthly"


Read the ``INSTALL'' file for generic detailed information on installing this program.

=============================== NASTY DETAILS ==================================

burn_dir.sh volume_name dir cdr|cdrw|<image path> log|stderr

        Burns the files in a directory to CD-R[W] media as an ISO-9660
        filesystem.

        cdr causes the media to be burned at a faster speed.
        cdrw causes the media to be erased and burned at a slower speed.
        Anything else causes an image to be written to the path given.
        
        log causes error messages to be logged using the logger command.
        stderr causes error messages to be printed to stderr.

burn_image.sh filename cdr|cdrw log|stderr

Burns a CD image to CD-R[W] media.

burn_pwd.sh volume_name cdr|cdrw

Burns the present working directory as an ISO-9660 filesystem.

burn_wavs.sh cdr|cdrw log|stderr

Burns the wav files in the current directory, creating an audio CD.

cdrip.sh

Rips each track from an audio CD and stores them as wav files.

copy_iso9660.sh cdr|cdrw

Copies a CD-ROM.

copy_cdda.sh cdr|cdrw log|stderr

Copies an audio CD.

demp3ize.sh directory

        Converts all of the .mp3 files in the current directory to .wav
        files, placing the new .wav in the specified directory.

demp_n_burn.sh [no_tmp_files]

Converts mp3s in pwd into CDDA audio and burns the traks.

        no_tmp_files causes demp_n_burn.sh to decompress and burn each
        mp3 without using a temporary file.

erase_cdrw.sh log|stderr

Erases a CD-RW.

        log causes error messages to be logged using the logger command.
        stderr causes error messages to be printed to stderr.

backup.sh existing_media|new_media|cdr|<image path> log|stderr <set>

        Allows one to perform a backup to CD-R[W] media.  The directories
        to burn are specified in /etc/burn_baby_burn/burn_baby_burn.
        This program can make bootable (El Torito) backup media.
        If you want to boot a kernel off of a CD, make sure your CD-ROM
        driver and the ISO-9660 filesystem are not kernel modules.
        Specify BOOTABLE=true in your set configuration file.

        An init script is provided which trys to provide a sane
        environment, given the root disk is read-only.  Backup.sh insures
        this is placed in the appropriate place in the generated ISO-9660
        filesystem.

        existing_media checks for the existance of the file backup in the root
        directory of the media being burned to.  This can allow one to use
        backup.sh in a cron script, without having to worry about accidentally
        destroying the wrong disk.
        new_media makes no such check.
        cdr does not make a check or attempt to blank the disc.
        Anything else causes an image file to be written to the path given.

        log causes error messages to be logged using the logger command.
        stderr causes error messages to be printed to stderr.

        set is the name of the set to burn.  An appropriate configuration
        file must exist.

backup_wrapper.sh log|stderr

        A wrapper that assumes existing media and determines the set
        from that media.

mkboot.sh

Creates a simple boot image to be used with backup.sh.

do_nicely

        A script to cause tasks to wait for /tmp/be_nice to disappear
        before executing.

verify_burn.sh source_dir log|stderr

Verifies a newly burned CD agains the original data using md5sum.

        log causes error messages to be logged using the logger command.
        stderr causes error messages to be printed to stderr.

mp3ize.sh artist album [disk_[123456789]]

        The directory artist/album[/disk_[123456789]] will be created if
        it does not exist.  This is where the audio files will be placed.

The scripts may exit with one of the following error codes:

        1       Missing configuration file
        2       Bad filesystem on CD-ROM before a burn
        3       Bad filesystem on CD-ROM after a burn
        4       Incorrect disc
        5       Error creating a temporary directory or file
        6       Received signal
        7       Filesystem too large to fit on CD-ROM
        8       Error burning to disc
        9       Error erasing disc
        10      General error

Since the burn_baby_burn package is implemented as shell scripts it has many dependencies. Here are some programs it makes use of:

  • cdrecord
  • cdparanoia
  • new
  • mktemp
  • mount
  • mke2fs
  • basename
  • dirname
  • logger
  • md5sum
  • bash
  • mkisofs
  • mpg123
  • swap
  • lilo
  • tar
  • rsync
  • bzip2
  • encode


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.