DVD writes bad data to disk when growisofs is executed from script
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
DVD writes bad data to disk when growisofs is executed from script
I used to perform backups to a cdrom, with a script that I wrote in python. My source code repository soon became to large to use a cdrom for backups, so I bought an external usb dvd writer(Memorex dual format dvd recorder), in the hopes that all I would have to do was change the backup media location in my script. Boy, was I naive! For months I have been trying to figure out why the same command that I type from the command line creates a perfectly readable dvd, but when I place the same command in a script and execute it through a system call I get an unreadable dvd. I thought the issue might be a python issue, so I wrote a shell script to do the same thing, and I had the same problem. Here is the command:
*-use-the-force-luke -->I created a dvd using the gnome gui and this is one of the options that I saw when I typed ps -jx while the dvd was burning. I thought maybe I wasn't using the correct switches so I added this one.
OS: Fedora Core 3
Kernel: 2.6.9-1.667smp
mkisofs: 2.01 (i686-pc-linux-gnu) *This covers growisofs as well
Obviously, the dvd writer is being recognized...
dmesg:
Initializing USB Mass Storage driver...
scsi2 : SCSI emulation for USB Mass Storage devices
Vendor: Memorex Model: DVD+/-DLRWN16 D2 Rev: 2.AB
Type: CD-ROM ANSI SCSI revision: 02
Basically, if I copy files to the Nautalis CD/DVD GUI in Fedora Core 3 and select create DVD I can produce readable isos. The gui makes the iso and burns the dvd all in one shot. However, if I type the same commands that I see by running ps when nautalis is creating the dvd I get a dvd that appears to be blank.
My previous post got trashed, I think, so this will be shorter.
growisofs will not overwrite an existing iso file system on a dvd if
one is running it from a non-interactive shell. It will overwrite an isofs
if you are running from an interactive shell. You also need to add some
mkisofs arguments, as growisofs is essentially a frontend to mkisofs.
The 'use-the-force-luke' flag can take a number of options, but the 'tty'
one overcomes the behavior described above. Here is the command line I userun out of cron nightly:
$1 is the file or directory to be backed up. -R and -J are options to mkisofs(8).
Options to use with the use-the-force-luke flag can be found in the growisofs
source code. I would put in the URL here, but that trashed my previous post,
so just google for it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.