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

Contents

This first version recapitulates the operations which Jean carried out to burn a CD by using the BeOS. He tried to make a compilation of the various experiments and documents he found in the news, the howto Linux in French, the Be site and the BeOs Tip server,

  • If you do not want to use the terminal you’d better stop here because there is not a single application that makes the creation of a disk image and the burning of a cd-rom possible by just clicking an icon.
  • It is assumed that your CD-writer is functioning properly under other operating systems, because this document will not help you solving SCSI, IDE problems resulting in not working devices.
  • Jean test platform was the BeOS R4.5 on intel, the PPC users are hereby encouraged to let us know the results of their experiments. Jean used an IDE 4/4/12 Yahama cd-writer, but it should work well with other cd-writers that are supported by cdrecord. (see the list of supported cd-writers in the doc. file of the cdrecord program)
  • Jean is currently testing the creation of bootable cd-roms, some updates docs will follow soon.
  • Jean didn’t try to make an audio cd-rom yet, but updates on that subject will follow soon.
  • Please let me know of if I made any spelling mistakes, omissions or other errors. Jean will appreciate any suggestions to improve this HOWTO.
  • Doesn’t it work for you ? Just read the documentation again, the solution is probably there. I can’t help you on this, it worked for Jean the first time he did it.

The steps that need to be taken :

  1. Installing and configuring the software. (that’s the hardest part)
  2. Make a disk image for the cd to be created. (some lines have to be typed on the terminal)
  3. Burning the cd. (a line has to be typed)
  4. Read the docs to go on…

2. Installing the software

Contents

2.1 Things you need to install :

  1. Bash (if this is not installed the compilation of cdrecord will not work properly, you can try to skip this step)
  2. ftp.ninemoons.com/pub/geekgadgets/be/i586/snapshots/990626/bin/ba sh-2.03-bin.tgz

  3. Cdrecord (version 1.8) :
  4. http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schi lling/private/cdrecord.html

  5. Mkhybrid (version 0.48a) :
  6. http://www.xs4all.nl/~marcone/be.h tml (to get the binary and the documentation)

Jean created a folder named Download in his Home folder in which he put the two compressed files of cdrecord and mkhybrid.

2.2 Installing Bash and GeekGadgets

  • read Install GeekGadget” on the BeOs Tip server.
    • Create a folder named GeekGadgets in /boot/apps.
    • Create a folder etc in the previous folder (/boot/apps/GeekGadgets).
    • Put the code listed below in a file named gg-startup.sh and save that in the etc folder you’ve just created. (/boot/apps/GeekGadgets/etc).
    • #! /bin/sh 
      
      export GG=/boot/apps/GeekGadgets 
      export PATH=$GG/bin:$GG/X11R6.3/bin:$PATH 
      export LIBRARY_PATH=$GG/X11R6.3/lib:$LIBRARY_PATH 
      export C_INCLUDE_PATH=$GG/include 
      export SHELL=$GG/bin/bash 
      export CONFIG_SHELL=$GG/bin/bash 
      export BELIBRARIES=$BELIBRARIES:$GG/lib
    • Open or create when it’s not there yet a file named .profile (do not forget the point) in your home folder and add the following line :
    • source /boot/apps/GeekGadgets/etc/gg-startup.sh
    • It helps to install the man utility it will supply you with all the docs on cdrecord and a lot of other utilities

    2.3 Installing cdrecord :

    • Open a terminal and type :
    • cd /boot/download/
      zip -d cdrecord-1.8a22.tar.gz
      tar -xvf cdrecord-1..8a22.tar
      cd cdrecord-1.8
      make
    • The computer will grind on that for about 2-3 minutes so you might as well have yourself a cup of coffee.
    • Open the folder named cdrecord and if all went well you’ll be able to find an executable named cdrecord. Copy this file to the folder named  /boot/home/config/bin.
    • It’s totally optional to install the man pages on cdrecord but it’s strongly recommended!
    • Open a terminal and type :
    • cdrecord

      You’ll see a list of available options appearing. To get the version ofcdrecord you can type

      cdrecord -version
    • that’s all for cdrecord !

    2.4 Installing of Mkhybrid :

    Mkhybrid is a version of mkisofs (based on mkisofs v1.11) that enables the creation of hybrid CD’s with ISO9660/HFS/JOLIET file systems. HFS (Hierarchial File System) is a file system used by Macintosh computers. Joliet is an extension of the ISO9660 standard used by Windows95-98 and NT that enables the use of long file names.

       

    • Open a terminal and type :
    • cd /boot/download
      gzip -d mkhybrid-0.48a.tar.gz
      tar -xvf mkhybrid-0.48a.tar 
      cd mkhybrid-0.48a
      configure
      make
      

    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


(comments are closed).