(Dr.R.K.) HOWTO - Burn CDs


Go to Bottom blank blank Go up one level To frames R.K.'s Home Page Keyword Index Site Map Help Linux

Kernel Set-up

Most of the following needs to be done as root.

Make sure that the cdrecord, cdparanoia, mkisofs RPMs are installed.

You need to make sure that the IDE-SCSI device interface is being used for the CD-R. RedHat 7.X will automatically configure your system correctly, if you have the CD-RW drive installed when RedHat Linux is being installed.

Test and Add "insmod ide-scsi" to /etc/rc.d/rc.local . View the kernel modules list with "lsmod".

Will need to change the boot parameters by adding the following line to /etc/lilo.conf where /dev/hdb is my CD-RW:
append = "hdb=ide-scsi" This is my /etc/lilo.conf:


boot = /dev/hda
timeout = 250
linear
prompt
  default = linux
  vga = normal
  read-only
# can't set mem=128M since BIOS uses 8M for video memory
  append = "mem=120M hdb=ide-scsi"
map=/boot/map
install=/boot/boot.b
image = /boot/vmlinuz-2.2.14-5.0
  label = linux
  root = /dev/hda1

Run "lilo" to instantiate the new lilo.conf.

Reboot. Test that the ide-scsi is working with "cdrecord -scanbus"


Prepare an ISO9660 Image

Now you are ready to create an ISO9660 image file. Put all the files to be saved in a directory (e.g. /dir/path).

Also before creating the image file, make the file .mkisofsrc and edit it with your own values and place in the dir you are running from.

Run the command to create the image file:

	mkisofs -v -J -r -d -D -f -l -L -N -o /tmp/xxx.iso /dir/path/

ISO9660 Image Configuration File

The following is an example of the mkisofs configuration file, and the more common entries with explanations.
#
# command: mkisofs -v -J -r -d -D -f -l -L -N -o /tmp/xxx.iso cdrom/
#
#CONFIGURATION
#       mkisofs looks for the .mkisofsrc file, first in	the  cur-
#       rent working directory, then in the user's home directory,
#       and then in the directory in which the mkisofs  binary  is
#       stored.	This file is assumed to contain a series of lines
#       of the form TAG=value, and in this  way	you  can  specify
#       certain	options.  The case of the tag is not significant.
#       Some fields in the volume header are not settable  on  the
#       command	line,  but  can be altered through this facility.
#       Comments may be placed in this  file,  using  lines  which
#       start with a hash (#) character.
#
#       APPI   The  application	identifier  should  describe  the
#	      application that will be on  the	disc.	There  is
#	      space  on	 the  disc for 128 characters of informa-
#	      tion.  May be overridden using the -A command  line
#	      option.
APPI=R.K.Owen /usr/src/ collection 2000-02-17
#
#       COPY   The copyright information, often the name of a file
#	      on the disc containing the copyright notice.  There
#	      is  space in the disc for 37 characters of informa-
#	      tion.  May be overridden using the -copyright  com-
#	      mand line option.
COPY=check individual packages
#
#       ABST   The  abstract information, often the name of a file
#	      on the disc containing an abstract.  There is space
#	      in  the disc for 37 characters of information.  May
#	      be overridden  using  the	 -abstract  command  line
#	      option.
#
#       BIBL   The  bibliographic information, often the name of a
#	      file on the disc containing a bibliography.   There
#	      is  space in the disc for 37 characters of informa-
#	      tion.  May be overridden using the  -bilio  command
#	      line option.
#
#       PREP   This  should  describe  the  preparer of the CDROM,
#	      usually with a mailing address  and  phone  number.
#	      There  is	 space	on the disc for 128 characters of
#	      information.  May be overridden using the	 -p  com-
#	      mand line option.
PREP=R.K. Owen, Ph.D. 
#
#       PUBL   This  should  describe  the publisher of the CDROM,
#	      usually with a mailing address  and  phone  number.
#	      There  is	 space	on the disc for 128 characters of
#	      information.  May be overridden using the	 -P  com-
#	      mand line option.
PUBL=KooZ Software
#
#       SYSI   The  System Identifier.  There is space on the disc
#	      for 32 characters of information.	 May be	 overrid-
#	      den using the -sysid command line option.
SYSI=RKOwen /usr/src/ 2000-02-17
#
#       VOLI   The  Volume Identifier.  There is space on the disc
#	      for 32 characters of information.	 May be	 overrid-
#	      den using the -V command line option.
VOLI=RKOwen-src-2000-02-17
#
#       VOLS   The  Volume  Set	Name.  There is space on the disc
#	      for 128 characters of information.  May be overrid-
#	      den using the -volset command line option.
#

Test the ISO9660 Image

To test out the image file, mount it via the loopback device

	mount -t iso9660 xxx.iso /mnt/image -o loop
Where /mnt/image is a mount point created for this purpose. The ISO9660 image can be perused like an ordinary filesystem.
When finished then unmount the image filesystem with
	umount /mnt/image

Test Burn the Image

Now that an image is ready, it can be burned into a CD. Run several tests with

	cdrecord -v -eject -dummy [-multi] speed=4 dev=0,0,0 xxx.iso

The device numbers can be found from cdrecord -scanbus . The -eject will cause the CD tray to slide out after the burn, which is useful to signal when completed, and some versions of Linux will try to automount the burned CD when completed unless it's ejected.

(Use -multi if you plan to add more to the CD later and the speed and dev are appropriate for your CD-RW - mine is rated at 8x8x32 and as you can see I back it off one level.)

When you are satisfied with the results then remove the "-dummy" option.


Ubuntu changes

Ubuntu has made some changes, which changes things a bit. Look in /etc/cdrecord/cdrecord to see the default name (e.g. /dev/cdrw which is a symbolic link to /dev/hdb for example.) Therefore, it looks like one of the changes is using the IDE (ATA) interface instead of the SCSI layer. Hence, no need to specify the device or speed if the defaults are defined correctly.

	cdrecord -v -eject -dummy [-multi] xxx.iso

Check if things are working with cdrecord -inq to see if things look reasonable.


Multi-session CDs

If doing multi-session CDs, make sure you read the README provided with cdrecord.

You will need to get the start track with

	cdrecord -msinfo dev=0,0,0
and use the value in mkisofs (e.g. 0,53151)
	mkisofs ... -o yyy.iso -C 0,53151 -M /dev/cdrw /dir/path
Also you will need to carefully structure the dir path. You can add directories, but not overwrite existing files or dirs on the CD.

Last Modified: 2001/12/27 20:17:23
Go to Top blank blank Go up one level To frames R.K.'s Home Page Keyword Index Site Map Help Linux
Brought to you by: R.K. Owen,Ph.D.
This page is http://owen.sj.ca.us/rkowen/howto/cdr.html