LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Using cdrtools in BLFS (https://www.linuxquestions.org/questions/linux-from-scratch-13/using-cdrtools-in-blfs-4175432985/)

stoat 10-18-2012 09:18 PM

Using cdrtools in BLFS
 
.
Sort of a Brief History and Explanation


I have been using growisofs (and its backend, mkisofs) to burn DVDs in my BLFS systems. Growisofs is provided by dvd+rw-tools, and mkisofs is provided by cdrtools. I have various scripts and shortcuts to automate tasks. I've been happy with the arrangement. Not long ago, the BLFS book dropped cdrtools and its mkisofs command, and replaced it with xorriso and its xorrisofs command. Xorriso was not new and had been in the BLFS book alongside cdrtools for a while. dvd+rw-tools still defaults to mkisofs in its source files, so the book uses seds to change that to xorrisofs in the source code. A short time later, xorriso disappeared from the book and Libisoburn was added to provide xorrisofs. That remains the current situation as of this moment. I hope that was understandable. Basically what happened was mkisofs was dumped for xorrisofs, and the dvd+rw-tools source has to be adjusted for the change with seds.

Why all this happened, I don't know. But Debian and some other distros also dropped cdrtools. And it isn't hard to find accounts of friction between Debian maintainers and Jörg Schilling, the author and maintainer of cdrtools, over licensing issues. Some of those accounts seem to involve personal animosities. So maybe something along these lines is behind this change as it relates to BLFS. Anyway, here's the thing... I still prefer mkisofs.

In my current BLFS system, I installed Libisoburn and I tried to like it. I'm sure if I worked at it, I could gain control of it and use it. But for now, I'm not going to. In case anyone else would like to install cdrtools for mkisofs, well that is why I'm posting this.


How to Install cdrtools and dvd+rw-tools in BLFS


Install cdrtools. The current alpha version is cdrtools-3.01a08. Do the usual routine of downloading, untarring, and changing to the build directory. Then...
Code:

make INS_BASE=/usr DEFINSUSR=root DEFINSGRP=root
As root...
Code:

make INS_BASE=/usr DEFINSUSR=root DEFINSGRP=root install &&
install -v -m755 -d /usr/share/doc/cdrtools-3.01a08      &&
install -v -m644 README* ABOUT doc/*.ps /usr/share/doc/cdrtools-3.01a08

Install dvd+rw-tools. This of course is still in the BLFS book, and the current version is dvd+rw-tools-7.1. The instructions in the current book (chapter 41) are good except for this purpose the xorrisofs seds are omitted.
Code:

sed -i '/stdlib/a#include <limits.h>' transport.hxx &&
make all rpl8 btcflash

As root...
Code:

make prefix=/usr install &&
install -v -m644 -D index.html /usr/share/doc/dvd+rw-tools-7.1/index.html


Some Examples for Burning with growisofs


Burn an ISO to DVD
Code:

growisofs -dvd-compat -speed=8 -Z /dev/sr0=isofile.iso
Burn Data to DVD
Code:

growisofs -dvd-compat -speed=8 -Z /dev/sr0 -r -J -hide-rr-moved -V "DATA" $HOME/dvd
NOTE: For this example, put the data files in $HOME/dvd. The example labels the disk "DATA".
Burn Video to DVD
Code:

growisofs -dvd-compat -speed=8 -Z /dev/sr0 -dvd-video -V "VIDEO" $HOME/dvd
NOTE: For this example, put the AUDIO_TS and VIDEO_TS folders in $HOME/dvd. The example labels the disk "VIDEO".
Erase a DVD-RW
Code:

growisofs -speed=8 -Z /dev/sr0=/dev/zero
Rip Data or Video to an ISO
Code:

dd if=/dev/sr0 of=$HOME/isofile.iso
Setting the -speed=N Option Value

This option controls recording velocity. N denotes the speed closest to N*1385 KB/s among those offered by unit for the currently mounted media which can be viewed in the output of the dvd+rw-mediainfo command...
Code:

$ dvd+rw-mediainfo /dev/sr0
INQUIRY:                [Optiarc ][DVD RW AD-7280S ][1.01]
GET [CURRENT] CONFIGURATION:
 Mounted Media:        10h, DVD-ROM
 Media ID:              TYG02     
 Current Write Speed:  4.0x1385=5540KB/s
 Write Speed #0:        8.0x1385=11080KB/s
 Write Speed #1:        6.0x1385=8310KB/s
 Write Speed #2:        4.0x1385=5540KB/s
GET [CURRENT] PERFORMANCE:
 Write Performance:    4.0x1385=5540KB/s@[0 -> 713151]
 Speed Descriptor#0:    00/713152 R@8.0x1385=11080KB/s W@8.0x1385=11080KB/s
 Speed Descriptor#1:    00/713152 R@8.0x1385=11080KB/s W@6.0x1385=8310KB/s
 Speed Descriptor#2:    00/713152 R@5.0x1385=6925KB/s W@4.0x1385=5540KB/s

For the example above, the possible values for N are...
Code:

-speed=1        Means use the lowest possible speed (4X)
-speed=4        Means use 4X
-speed=6        Means use 6X
-speed=8        Means use 8X
-speed=256      Means use the highest possible speed (8X)


Some References:


http://slashdot.org/story/06/09/04/1...-jrg-schilling
http://linux.dsplabs.com.au/growisof...growisofs-p18/
http://www.yolinux.com/TUTORIALS/Lin...ialCDBurn.html
http://lists.debian.org/cdwrite/2004/02/msg00094.html

Keith Hedger 10-19-2012 09:13 AM

Thanks for this I use growisofs/cdrtools a lot and as I have just started on a new LFS build I will keep this in mind. There seems to be a lot of the "not invented here" attitude around in linux lately, which does no one any good.


All times are GMT -5. The time now is 09:33 AM.