SUMMARY: DVD Burning On SunBlade 1000 or 2000's, Solaris 8 (or 9)

Dave Warchol Warchol at harthosp.org
Fri Apr 2 10:11:28 EST 2004


First, thanks to all who replied, it definitely looks like folks have it
working using a couple of different approaches:
-Dave Foster, he also included a perl script, which can be found at the
end of the summary
-David Videchak
-Mats Oberg
-Peter Stokes, it turns out that he posted a SUMMARY for a similar
request 
 to sunmanagers last week,  I have included that as well
 (I apologize for being behind in my reading .....)
- Lars Hecking (This should help both of us....)

=====
>From Dave Foster:
We are using a Pioneer A05 IDE internal drive, inside an
IDE/SCSI converter enclosure (see link below). Works very
well. The new Pioneer A06 and the new Plextor supports
both + and - DVD formats.

For software, we're using the ProDVD freeware (comes as a
binary), again works very well. I've attached a Perl script
I wrote which allows you to burn directories of data with
one simple command (pipes mkisofs | prodvd) and does logging
for you.

We use SUDO to allow mere mortal users to burn DVDs (requires
direct access to devices so root is needed).

Here are some links:

IDE/SCSI converter:  (~$109)
   
http://www.microlandusa.com/microland/product_detail.asp?non=1&p%5Fid=ARS2000UB


General HOW-TO for DVD on UNIX:

http://www.unixhub.com/docs/misc/DVD.html

=====
>From David Videchak: 

When we purchase a BLADE 2000 we no longer purchase the $400 DVD rom
drive
and instead purchase

SONY DRU510A

DVD +RW CDR-RW EIDE INTERNAL DRIVE SONY

AEC-7720U

AEC-7720U Ultra SCSI-to-IDE bridge (from Addonics Tech)

With the SCSI to IDE set to SCSI 6 you can boot to the CD or DVD to
install
the system.

You will need the driver from:

http://ftp.berlios.de/pub/schily/kernel/scg/ 

I have used scg-sparc-sol2.7
<http://ftp.berlios.de/pub/schily/kernel/scg/scg-sparc-sol2.7>    on
solaris
8 with no problem.

You will also need to get cdrecord
ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-2.01a25.tar.gz 

You must compile cdrecord or you can try and use the one at
SUNFREEWARE.

If you want to use a DVD drive you need the precompiled cdrecord.prodvd
in
order to burn to it. You can get the file from:

ftp://ftp.berlios.de/pub/cdrecord/ProDVD/cdrecord-prodvd-2.01a27-sparc-sun-s

olaris2.8

You will also need the key to burn DVD's larger than 1GB. You can get
the
key from:

ftp://ftp.berlios.de/pub/cdrecord/ProDVD/README 

The key is free for non commercial use but it is valid for 6 months.

If you wan a graphical environment:

http://www.xcdroast.org/ 

I have also tried GEARPRO DVD and it works but it should for over
$1200. I
prefer xcdroast.  Once you get it running the first time you will like
it.

=====
>From Mats Oberg:
Hi, well I use a SunBlade 150 and Solaris10, but this should work for
solaris 8 or 9 aswell.

I use a usb connected Iolo dvd-writer, and a freeware called
DVD+rw-tools.
I managed to burn a dvd in "dvd+r" format using this configuration.

I first tried didn't cdrecord-ProDVD, but it doesn't support this
format, but it should work for the "dvd-r" format.

=====
>From Peter

I listed a summary for DVD burning on Sunmanagers the other week, here
is the meat of it. I wanted it for U5/10, so I went IDE. I did have
one
respondent who was using an IDE to SCSI card (Acard make one amongst
others), so I guess you could use the Plextor with the converter. The
software would stay the same, ie use cdrw, cdrecord, mkisofs etc.

Peter

Original SUMMARY

----------------------------------

Responses
--------

A few responses, the following were the main ones

-----
We've been using the Pioneer A05, internal ATAPI drive within a
SCSI/ATAPI converter box. Some links:

     
http://www.microlandusa.com/microland/product_detail.asp?non=1&p%5Fid=ARS2000UB


http://www.unixhub.com/docs/misc/DVD.html 

We use this with cdrecord and ProDVD (both from the same site), they
work great.

We'll be buying a Pioneer A06 multi-format drive soon.
----
I'm using the Sony DRU-510A, which is DVD +/- R & RW and CDRW built in

one.  I'm also using it on a Blade 100 and an Ultra 2 (with a ide-scsi

converter).  Both computing platforms can boot from cdrom and record 
DVD's & CD's via XCDRoast (engine is cdrecord or cdrecord-prodvd).  I'm

happy with the performance.  The only small problem has been blanking a

DVD +RW disk, cdrecord does not fully support this format yet.
----
buy a plextor.  They're always well supported and very high quality.
----

Resulting purchase and experience
-------------------------

In the end because we already had one of these on a Windows system and
it worked well, I bought the Plextor PX-708. Installed in a Ultra
5/400
running Sol 9 with latest patches, Gnome 2.0 and installed latest
cdrecord and cdrecord-ProDVD. These all work well (turn off volmgt of
course) with the exception of mkisofs having no support for largefiles
yet. I also have cdrw working to write iso's to CD's, but did not get
CD
copy of CDRW to work. I can also rip music CD's down to mp3/wav files
no
problem. I have only tried DVD_R's at present as they appear to be
better supported with ProDVD and are cheaper to buy. One
recommendation
I did get from a media seller was to stick with Ritech dyes on DVD-R's
as apparently not all DVD-R's work with all DVD writers.

The one major problem I have got is that sometimes when creating an
iso
copy of a cd to disk (IDE disk) I get timeouts on the disk. I used dd
to
get the iso image from the CD, but am not sure if moving to SCSI disks
will help this. It does not happen every time, but is annoying.

=====
>From Lars Hecking:

Have you got any responses?

 I'm trying to write DVDs here, too, using the same external USB
drive,
 but it fails under Linux/OpenBSD (cdrecord) and Solaris (cdrw) with
 the same type of error (no media/invalid media).


=====
Dave Foster's perl script:

#!/usr/local/bin/perl
#
#   DVDBURN  11-05-03  DSFoster
#
# Version for Pinwheel.
#
# Script to create an image file for an ISO 9660 filesystem
# with Rock Ridge extensions and burn to DVD-R through a
# pipe. Note that currently several arguments have been added
# which make the resulting DVDs NOT ISO 9660 compliant; this was
# done to relax filename requirements so files don't get renamed
# and so file/dir names are consistent between UNIX/PC/Mac systems.
#
# May require environment variable CDR_DEVICE be set according to
# 'prodvd -help', eg. "setenv CDR_DEVICE 1,4,0" 
# (scsi-bus,target,lun). Use 'prodvd --scanbus' to determine
# the device. If this variable is not set, be sure the dev= option
# to the 'prodvd' command is included in this script.
#
# Requires a key from the following website (in README file):
#
#     ftp://ftp.berlios.de/pub/cdrecord/ProDVD/
#     ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ProDVD/
#
# This key may need updating periodically.
#
# All local configuration is done within the "CONFIGURATION" section.
#
# IMPORTANT: To use mkisofs and prodvd work through a pipe you
#   must use the 'tsize=#' option with prodvd. This means you
#   have to compute the disk usage for the directory before
#   burning the data.
#
#
# To see available drive-specific options:
#
#   prodvd dev=1,1,0 driveropts=help -checkdrive
#
# Options available for Pioneer A04 drive:
#
#   "Driver options:
#       burnfree        Prepare writer to use BURN-Free technology
#       noburnfree      Disable using BURN-Free technology
#
#
# This script uses no outside "tainted" data, and is therefore
# secure to use as a setuid script. ["Programming PERL", O'Reilly...]
#
# Usage:  
#
#    dvdburn <directory>
#
# This script uses system() to perform a command similar to
# the following:
#
#   mkisofs -follow-links -R <directory> | prodvd dev=1,1,0 -v fs=6m \
#        tsize=<bytes> speed=2 -
#
#
# NOTE: On older systems you must wrap this script within a C
#   program, and make *this* C program setuid. This is because of
#   a kernel bug which creates a "race condition" when a setuid 
#   root shell is fired up, creating a security hole. Perl scripts
#   will not run setuid when this kernel bug is apparent.
#   ["Programming PERL", O'Reilly..., pg. 360]
#
# Modifications:
#
# 01-31-01 DSF Created, using bourne shell version at template.
# 02-21-01 DSF Modified for new host and device. Add undocumented
#              -test argument.
# 04-05-01 DSF Add arguments to relax filename requirements:  
#                 -iso-level 3 -allow-lowercase -allow-multidot 
#                 -l -L -relaxed-filenames -no-iso-translate
# 05-03-02 DSF Add -follow-links to mkisofs command so links are
#                 followed; necessary for use with "cd_chunks"
command.
# 05-10-02 DSF Log sessions, including username and amount of data
burned.
# 05-30-02 DSF Use full pathname for directory in log output.
# 08-01-02 DSF Modified for Pinwheel (search for "Host-specific").
# 08-02-02 DSF Adapted from 'cdburn' using cdrecord to 'dvdburn'
#              using 'prodvd' (DVD version of cdrecord).
# 08-30-02 DSF Add "tsize=#" option so mkisofs and prodvd will work
#              through a pipe (avoid "VTrack 0 has unknown length"
error).
# 08-06-03 DSF Update key (see below).
# 08-19-03 DSF Add option "driveropts=burnfree" to 'prodvd' cmd.
# 11-05-03 DSF Add -L option to disable -follow-links.
# 02-08-04 DSF Update key (see below).


#--- CONFIGURATION ---------------------------------------------------

# For security reasons use absolute paths for all programs, devices
and
# mount points!

# Host-specific stuff
$bin_dir = "/usr/bin";                       # Location of mkisofs and
prodvd
@local_hosts = qw( pinwheel );               # Valid hostnames
$device = "1,1,0";                           # Device (bus,target,lun)

$prog_name = "dvdburn";                      # Name of program
$dvd_cmd   = "prodvd";                       # Binary to burn DVD (ie.
cdrecord)

$log_dir  = "/var/adm";                      # Log directory and
filename
$log_file = "${prog_name}.log";
$log_session = 1;                            # Flag to log session

# ISO9660 with Rock Ridge Extensions, but with relaxed filenames
#   so they will be consistent between UNIX and Mac/Windows systems.
#   See man page for mkisofs for details of arguments.

$burn_cmd = "${bin_dir}/mkisofs -iso-level 3 -allow-lowercase
-allow-multidot -l -L -relaxed-filenames -no-iso-translate FOLLOW_LINKS
-R DIRECTORY | ${bin_dir}/${dvd_cmd} dev=${device} -v fs=6m TSIZE
speed=2 driveropts=burnfree -";

# For pure ISO9660 with Rock Ridge Extensions. Enforces 8.3 filenames
# and renames files so as to be unique. Filenames may be inconsistent
# on Windows and Mac systems.

$burn_cmd_iso9660 = "${bin_dir}/mkisofs FOLLOW_LINKS -R DIRECTORY |
${bin_dir}/${dvd_cmd} dev=${device} -v fs=6m TSIZE speed=2
driveropts=burnfree -";

# As I am not sure if people will follow my licensing rules, so these
# keys are time limited and will expire on 2004 Aug 20 13:06:40
# I will continue to make private/educational/research use free,
# but it may be that you need to request your private key for free
# after August 20th 2004.
# 
# If you get an "Alarm clock" abort from cdrecord-ProDVD, then you
# are experiencing license problems. Possible reasons are: (see
README).
#
# This may have to be updated periodically. See the following URL:
#       ftp://ftp.berlios.de/pub/cdrecord/ProDVD/README
#       ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ProDVD/README  
(previous)

$prodvd_key =
"8:dvd,clone:sparc-sun-solaris2,i386-pc-solaris2,i586-pc-linux,powerpc-apple,hppa,powerpc-ibm-aix,i386-unknown-freebsd,i386-unknown-openbsd,i386-unknown-netbsd,powerpc-apple-netbsd,i386-pc-bsdi,mips-sgi-irix,i386-pc-sco:1.11::1093000000:::private/research/educational_non-commercial_use:9vl2T2kP6w6O4h.bXuet8hP1Z3H5erm3qWmxhbcr.fHvuN8ZJbhQUWBzjAc";

#----- End Configuration ---------------------------------------------


# Clean up the path for secure operation in setuid mode

$ENV{PATH} = '/bin:/usr/bin';

# Save UID so we can get user info later
$old_uid = $<;

# Set UID = EUID. NOTE: Using $UID and $EUID didn't work here!
#$< = $>;

# Add our key to the environment so we do not run in demo mode
$ENV{CDR_SECURITY} = $prodvd_key;

# Define command paths

$du =  "/usr/local/bin/du";        # Solaris du chokes sometimes!
$awk = "/usr/bin/awk";

# Make sure the local host is correct!!

chop($host = `hostname`);
$host_index = -1;
for ($i = 0; $i <= $#local_hosts; $i++) {
	if ($host eq $local_hosts[$i]) {
		$host_index = $i;
		$file_system = $file_systems[$i];
	}
}
if ($host_index == -1) {
	print "  This program can only be run on hosts ( @local_hosts
)\n";
	exit 1;
}

# Check arguments and set flags

$debug_mode = 0;
$test_mode = 0;
$follow_links = "-follow-links";    # Default is to follow links

for ($inc = 0; $inc <= $#ARGV; $inc++) {
	if ($ARGV[$inc] eq "-h") {
		shift(@ARGV);
		help_msg();
		exit 0;
	}
	elsif ($ARGV[inc] eq "-d") {
		shift(@ARGV);
		$debug_mode = 1;
	}
	elsif ($ARGV[inc] eq "-L") {            # Do not follow links
		shift(@ARGV);
		$follow_links = " ";
	}
	elsif ($ARGV[inc] eq "-test") {
		shift(@ARGV);
		$test_mode = 1;
	}
	elsif ($ARGV[inc] eq "-iso9660") {       # Pure ISO9660 format
		shift(@ARGV);
		print "\n  Warning: Using pure ISO9660 format.";
		print "\n     (filenames may be inconsistent between
UNIX and Mac/Windows systems).\n";
		$burn_cmd = $burn_cmd_iso9660;
	}
}

if ($#ARGV < 0) { help_msg(); exit 0; }


# Make sure the directory specified exists
$dir = $ARGV[0];

unless (-d $dir) {
	print "\n\nDirectory not found: $dir\n";
	help_msg();
	exit 1;
}
unless (-r $dir) {
	print "\n\nCannot read directory: $dir\n";
	help_msg();
	exit 1;
}

# Add specified directory to command to burn data
$ind = index($burn_cmd, "DIRECTORY");
substr($burn_cmd, $ind, 9) = $dir;

# Add setting specifying whether we follow links or not
$ind = index($burn_cmd, "FOLLOW_LINKS");
substr($burn_cmd, $ind, 12) = $follow_links;

# Adjust prodvd command if just testing (-test)
if ($test_mode == 1) {
	$ind = index($burn_cmd, "${dvd_cmd}");
	substr($burn_cmd, $ind, 8) = "${dvd_cmd} -dummy";
}


# Get full pathname for $dir and compute it's disk usage
# to use with ProDVD's 'tsize=#' option. This allows mkisofs
# and prodvd to work through a pipe.

# Get full pathname for log entry
if ( substr($dir, 0, 1) ne "/" ) {
	$cwd = `pwd`;
	chomp ( $cwd );
	$dir = $cwd . "/" . $dir;
}
# Untaint $dir (Programming Perl 2nd Ed pg 338)
unless ($dir =~ m#^([-\ \@\/\w.]+)$#) {   # Flag unlogged burns
	$LOG = 17;
	$file = "${log_dir}/${log_file}";
	unless ( open( LOG, ">>$file" ) ) {
		print "\nError writing to log file:
${log_dir}/${log_file}\n";
		exit 1;
	}
	print LOG "${pname};${date};${dir};NOT LOGGED (path
tainted)\n";
	close(LOG);
	$log_session = 0;    # Flag to NOT log session later
}
$dir = $1;

# Get disk space burned (-L follows links)

print "\nComputing disk usage for $dir ... this may take awhile ...";
$space = `$du -ksL $dir 2>/dev/null`;
print "\nDone\n";
@strings = split( ' ', $space);
$space = $strings[0];
$tsize = int $strings[0] * 1024;

# Add 'tsize' option to burn command
$ind = index($burn_cmd, "TSIZE");
substr($burn_cmd, $ind, 5) = "tsize=$tsize";

# Burn the DVD by piping output of mkisofs directly to prodvd.

print "\n  Ready to transfer data in directory $dir to DVD...";
print "\n  Press Return to continue: ";
$ans = <STDIN>;

if ($debug_mode == 1) { print "\n$burn_cmd\n"; }

$status = system( $burn_cmd );

if ($status != 0) {
	die "\n   Error transferring data...command failed\n";
} 
else {

	# Log session: username, directory and amount of data burned

	($pname,$ppasswd,$puid,$pgid,$pquota,$pcomment,$pgcos,$pdir,$pshell)
= getpwuid($old_uid);
	$date = localtime;

	$LOG = 17;
	$file = "${log_dir}/${log_file}";
	unless ( open( LOG, ">>$file" ) ) {
		print "\nError writing to log file:
${log_dir}/${log_file}\n";
		exit 1;
	}
	print LOG "${pname};${date};${dir};${space}\n";
	close(LOG);
}

exit 0;


#---------------------------------------------------------------------
# Print an array of strings with freakin spaces between the elements!

sub pretty_print {
	for ($i = 0; $i <= $#_; $i++) { print "$_[$i] "; }
	print "\n";
}


#---------------------------------------------------------------------
# Display help info

sub help_msg {

	print "\n  Usage:  $prog_name [-d] [-iso9660] <directory>\n";
	print "\n     <directory> : Directory to burn";
	print "\n     -L : Do not follow links to other filesystems";
	print "\n     -iso9660 : Pure ISO9660 format (filenames may be
inconsistent";
	print "\n          between UNIX and Mac/Windows systems).";
	print "\n     -d : Debug mode (display commands)";
	print "\n\n";
	$status = 0;
}

===========Original Post========================
All:
      If anyone doing this I'd be very interested in hearing about what
you are using for hardware, software (free or not), interface (USB,
firewire, etc.) and format.  Any tips, techniques, howtos would also be
appreciated.  I will gladly summarize.

Thanks
Dave  



More information about the sunmanagers mailing list