I am writing files to a DVD with growisofs once a day. Each time I append to the DVD, I have to eject the DVD and then re-load the DVD in order to see the file I just wrote. I am using RHEL 5.0 and to initialize a blank DVD, I use the command:

growisofs -Z /dev/dvd -rJ -use-the-force-luke=notray file1

which will write file1 to the DVD. Next, I will try to write file2 to the DVD (without ejecting the DVD in between) with the command:

growisofs -M /dev/dvd -rJ -use-the-force-luke=notray file2

and that will fail with the error:

"/usr/bin/mkisofs: Invalid argument. Seek error on old image

: - ( mkisofs has failed: 22"

If I eject and then try the growisofs -M command again, it will successfully write file2 but if I try to write file3, file3 will fail with the same error.

I remember reading some where (might have been a man page) that in between burn sessions you might have to eject and re-load the DVD, however, I did not have this problem with non-Blue-Ray compatible drives.

Even if this is a problem with the Blue-Ray drives I have been trying, is there a way to simulate an eject without actually ejecting a disc? Or some other way to work around this without having to physically eject the DVD? I can't do an eject -T because it is a laptop drive, so the drive cannot close under its own power.

Any help or ideas would be greatly appreciated. I have looked at ioctl commands such as:

ioctl(file_descriptor, CDROMSTART)
ioctl(file_descriptor, CDROMSTOP)

but I haven't looked at many other commands or found a command that solves my problem... yet


migrated from stackoverflow.com Dec 30 '09 at 0:12

This question came from our site for professional and enthusiast programmers.


The eject is required by some drives -- it forces them to reread the contents of the disc after a burn session has changed those contents. It's a hardware thing, so to fake it you'd need to convince the drive that it's just loaded a new media and needs to perform its initial scan of that new media.

I don't know if this is possible via standard IOCTLs -- I'd expect you'd have to hack the drive firmware (and possibly add your own special IOCTL to the driver code) to do it.

  • It definitely isn't what I wanted to hear, but I think you are right about having to modify the firmware. Thanks! – Kevin S. Jan 4 '10 at 20:01

The ioctl CDROMRESET seems to force the TOC of device to be re-read by the system. You can try it to your probleme, I think this should work

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.