The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Burning CDs with BeOS

Contributed by: Scot Hacker
This tip is valid for: Both BeOS and Haiku

Update: The bulk of this tip is preserved for posterity, but in the editor’s humble opinion, is unnecessarily complex. If all you want to do is burn audio CDs, BeOS includes the “CDBurner” application, which makes the process incredibly easy. CdManager is also excellent. If you want to burn data CDs, I recommend downloading WriteCD or Melt — both programs take the pain out of the process described below. Remember also that Be’s CDBurner can be used to actually burn the data track once you’ve created and loaded up an image file — just pull down Disc | Add Data Track.

The original tip is below.


Jean de Pompignan has written a complete tutorial (in French), which has been translated into English by Mark J.P. Vergee. The authors have graciously given permission for us to mirror the English translation here at the Tip Server.


HOWTO burn a cd with the BeOs

French Original by Jean de Pompignan jean@cybercable.fr, 

English translation by Mark J.P. Vergeer mvergeer@hotmail.com

Version 0.5, 14 july 1999


This document covers the process of burning a cd with under BeOs.


Contents

  • 1 Introduction
  • 2 Installating the software
  • 3 Creating a disk image
  • 4 Burning the image onto the CD
  • 3. Creating a disk image

    Contents

    3.1 Creating a BeFs disk image

    Create a file named image.img on your harddisk, if you follow the procedures below it will be seen as an additional harddisk by BeOS then you are able to copy your files onto this harddisk image with Tracker or with some file management tool. The size of the image.img file should not exceed 650Mb. Before you create a cd from this image.img file it must be prepared by Tracker so that it’ll have all the attributes of a BeFs partition in ReadOnly mode. Cd’s created this way will not be readable by other operating systems because they still lack the ability to read the BeFs.

    or even more simple just type something like :

    dd if=/dev/zero of=/boot/home/image.img bs=1024k count=640 mkbfs 2048 image.img sync

    to create an empty file image and type:

    mkdir /mnt mount -t bfs image.img /mnt

    to mount it on the desktop.

    Attention!! Creating a large image file can take a long time….

    An icon untitled will appear on the desktop and the file named image.img will seem to have disappeared from the home folder. But if you use the terminal you will be able to verify that it is still there.

    You can give the ‘new’ harddisk a volume name, hummingbird for example and copy onto it all you like. When you finished copying your files, unmount the the volume (right mouse click on the icon and unmount). Go to stage 4 to burn your cd.

    3.2 Creating an ISO9660 disk image

    1. Create a folder named cdromiso in your home folder.
    2. Copy into this folder all the files you want to be burned onto the cd.
    3. To create an image image.img with the volume name ‘Hummingbird”, open a terminal and type  :
    4. mkhybrid -a -r -J -V Hummingbird -o imageiso.img /boot/home/cdromiso/
    5. The file imageiso.img is the file that will be used to burn the cd with cdrecord.

    4. Burning the image onto a CD

    Contents

    Type cdrecord in a terminal to see all the options that are available (I’ll explain below what is used in this howto document if you do not care to read the documents).

    4.1 Collecting information about cdwriter

    You need to know the addresses of your cdwriter (SCSI or IDE), open a terminal and type

    cdrecord -scanbus

    You’ll get an feedback that will inform you about the position of your cd-writer on the cable (IDE or SCSI), for example

    $ cdrecord - scanbus
    Cdrecord release 1.8a22 Copyright (C) 1995-1999 Jörg Schilling
    scsibus8:
                 &n
    bsp;  800) *
                 &n
    bsp;  801) 'TOSHIBA ' 'DVD-ROM SD-M1202' '1018' Removable CD-ROM
                 &n
    bsp;  802) *
                 &n
    bsp;  803) *
                 &n
    bsp;  804) *
                 &n
    bsp;  805) *
                 &n
    bsp;  806) *
                 &n
    bsp;  807) *
    scsibus9:
                 &n
    bsp;  900) 'YAMAHA  '
     'CRW4416E        ' '1.0f' Removable
     CD-ROM
                 &n
    bsp;  901) 'IOMEGA  ' 'ZIP
     100         ' '23.D' Removable Disk
                 &n
    bsp;  902) *
                 &n
    bsp;  903) *
                 &n
    bsp;  904) *
                 &n
    bsp;  905) *
                 &n
    bsp;  906) *
                 &n
    bsp;  907) *

    900 is the address of the cdwriter, so in this case it will be neccessary
    to include the following in the command line of cdrecord:

    dev=9,0,0

    4.2 Starting the burning process :

    You can test the burning process by typing the following (all operations
    go exactly as in a real cd-burning process, except for the laser not being
    turned on):

    cdrecord -v -dummy dev=9,0,0 speed=4 -data /boot/home/image.img

    To actually burn/write/record the cd type the following :

    cdrecord -v dev=9,0,0 speed=4 -data /boot/home/image.img

    (if your write is configured as a master on the secundairy IDE)

    Once your cd has been burned you are free to delete the image.img file.

    4.3 Easier/Quicker way of doing it?

    Copy the following lines to your .profile file (change dev=9,0,0 to the actual address of your cdwriter) :

    # Burning CD's
    
    function testcd {
    cdrecord -v -dummy dev=9,0,0 speed=4 -data /boot/home/image.img
    }
    
    function burncd {
    cdrecord -v dev=9,0,0 speed=4 -data /boot/home/image.img
    }
    
    function createimage {
    dd if=/dev/zero of=/boot/home/image.img bs=1024k count=640
    mkbfs 2048 /boot/home/image.img
    sync
    }
    
    function createiso {
    mkhybrid -a -r -J -V colibri -o /boot/home/imageiso.img /boot/home/cdromiso/
    }
    
    function testcdiso {
    cdrecord -v -dummy dev=9,0,0 speed=4 -data /boot/home/imageiso.img
    }
    
    function burncdiso {
    cdrecord -v dev=9,0,0 speed=4 -data /boot/home/imageiso.img
    }
    
    function mountimage {
    mkdir /mnt
    mount -t bfs image.img /mnt
    }
    

    Open a new terminal, as long as you don’t throw away your initial image
    you can type   :

    createimage

    to create an image with the BeFs and

    moountimage

    to mount the disk image. As soon as you finished copying files to the image
    you dismount it and you can type :

    testcd

    to test the burning process, and

    burncd

    to start burning your cd.

    To create an ISO 9660 CD, make a folder cdromiso in your home folder
    and copy the files you want on your cd in this cdromiso folder. To create
    the image type :

    createiso

    to test  type

    testcdiso
    burncdiso

    to start burning the iso image.

    Who said burning a cd was complicated?

    5. Documentation

    Contents

    6. Recapitulation for the easily distracted

    Contents

    # to create a file with the size of the cd that is to be created dd if=/dev/zero of=/boot/home/image.img bs=1024k count=640
    
    mkbfs 2048 image..img
    sync
    
    mkdir /mnt
    mount -t bfs image.img /mnt
    
    cdrecord -scanbus
    
     on the 2nd IDE bus)
    cdrecord -checkdrive dev=9,0,0
    
     2nd IDE bus)
    cdrecord -v -dummy dev=9,0,0 speed=4 -data /boot/home/image.img
    
     on the 2nd IDE bus)
    cdrecord -v dev=9,0,0 speed=4 -data /boot/home/image.img 
    
    mkhybrid -a -r -J -V colibri -o image.img /boot/home/cdrom/

Posted in Miscellaneous

Comment on this tip

Comments may be incorporated into the original tip by site editors.

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.