Re: [SLE] Testing for a blank DVD

From: Anders Johansson (andjoh_at_rydsbo.net)
Date: 03/12/05

  • Next message: Stephen Furlong: "RE: [SLE] Stupid OT question"
    To: suse-linux-e@suse.com
    Date: Sat, 12 Mar 2005 01:15:12 +0100
    
    

    On Saturday 12 March 2005 00:31, Ken Schneider wrote:
    > On Fri, 2005-03-11 at 18:09, Paul W. Abrahams wrote:
    > > I've written a small shell script for doing backup that uses mkisofs and
    > > cdrecord. I haven't been able to construct the script as a pipe because
    > > cdrecord, it seems, needs to know the length of the track it's writing
    > > (for a DVD, at least). So if there's no DVD in the drive, mkisofs will
    > > spend some time creating an image and then cdrecord will bomb out.
    > >
    > > I'm looking for a command-line method of testing if a drive has a blank
    > > DVD in it. I can check if the drive is mounted using a combination of
    > > "mount" and "grep", but you can mount a drive even if there's no media in
    > > it, and that method doesn't distinguish between a blank DVD in the drive
    > > (good) and no DVD in the drive (bad). As far as I can tell, cdrecord
    > > itself has no way of testing for the presence of a blank DVD without
    > > actually attempting to write it.
    > >
    > > So does anyone know a command that I can put into a shell-script test to
    > > see if the drive does or does not have a blank DVD?
    > >
    > > Paul
    >
    > A quick check of cdrecord --help shows a couple of options -atip is one
    > for retrieving info from the disk. As I recall there is a way to
    > retrieve the disk and manufacturer info from a blank. You could use that
    > to test whether a disk is in the drive.

    There is also "cdinfo" which is in the cdrecord package, which is bound to
    have some grepable information. Or /usr/sbin/hwinfo --cdrom, which also seems
    to output information about the inserted media

    I don't have a recorder available here to say exactly what the output looks
    like with a blank inserted, but the output from a regular data/movie dvd
    looks very grepable

    -- 
    Check the headers for your unsubscription address
    For additional commands send e-mail to suse-linux-e-help@suse.com
    Also check the archives at http://lists.suse.com
    Please read the FAQs: suse-linux-e-faq@suse.com
    

  • Next message: Stephen Furlong: "RE: [SLE] Stupid OT question"

    Relevant Pages

    • SUMMARY: DVD Burning On SunBlade 1000 or 2000s, Solaris 8 (or 9)
      ... I've attached a Perl script ... one simple command (pipes mkisofs | prodvd) and does logging ... When we purchase a BLADE 2000 we no longer purchase the $400 DVD rom ... You must compile cdrecord or you can try and use the one at ...
      (SunManagers)
    • Re: Burning backup to dvd
      ... cdrecord: WARNING: Data may not fit on current disk. ... In order to rule out some of the possible causes I did try to write a straightforward data dvd backup in k3b - something I do regularly on this workstation. ... Can you attempt to use a different DVD media? ...
      (Fedora)
    • Re: [SLE] Testing for a blank DVD
      ... > I've written a small shell script for doing backup that uses mkisofs and ... > cdrecord, it seems, needs to know the length of the track it's writing (for a ... So if there's no DVD in the drive, mkisofs will spend some ...
      (SuSE)
    • [SLE] Testing for a blank DVD
      ... I've written a small shell script for doing backup that uses mkisofs and ... cdrecord, it seems, needs to know the length of the track it's writing (for a ... DVD, at least). ... So if there's no DVD in the drive, mkisofs will spend some ...
      (SuSE)
    • Re: Fail to burn DVDs [NOT resolved after all]
      ... > How can I burn a DVD under FC2? ... > Here is some feedback I get from cdrecord. ... > CD-ROM ... it is on the FC2 ...
      (Fedora)