From owner-freebsd-hackers Mon Sep 9 10:57:47 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8565537B400 for ; Mon, 9 Sep 2002 10:57:44 -0700 (PDT) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCC3843E42 for ; Mon, 9 Sep 2002 10:57:43 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: from panzer.kdm.org (localhost [127.0.0.1]) by panzer.kdm.org (8.12.5/8.12.5) with ESMTP id g89HvgKD039846; Mon, 9 Sep 2002 11:57:42 -0600 (MDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.5/8.12.5/Submit) id g89HvgRo039845; Mon, 9 Sep 2002 11:57:42 -0600 (MDT) (envelope-from ken) Date: Mon, 9 Sep 2002 11:57:42 -0600 From: "Kenneth D. Merry" To: Charles Peterman Cc: hackers@FreeBSD.ORG Subject: Re: DVD-RAM: multi-session writing Message-ID: <20020909115741.A39823@panzer.kdm.org> References: <200209091334.28200.cjp@sandstorm.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200209091334.28200.cjp@sandstorm.net>; from cjp@sandstorm.net on Mon, Sep 09, 2002 at 01:34:28PM -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Sep 09, 2002 at 13:34:28 -0400, Charles Peterman wrote: > > FreeBSD 4.5. > Hitachi DVD-RAM drive > > I have to support writing files to a DVD-RAM in a Windows compatible mode. > Normally I would treat the thing as a slow HD and read and write at my > leisure, but Windows does not play nicely with UFS. So I came upon the > solution of writing an ISO image out to the disk, like so: > > readcd dev=$DVDRAM_SCSI_ID -w f=image.iso. > > Now this works and is portable, but it has an unfortunate side effect. If I > attempt to write another image out, I overwrite the existing data. > > So, there are three possible solutions: > > 1. Move to UDF, (works for me, but management is scared of anything labelled a > "kernel change") FreeBSD's UDF code doesn't have write support yet, I don't think. You'd have to use something like mkisofs to make an image and dump it on the drive. > 2. Figure out some way to get the first sector after the last ISO from the > disk, and start writing the new data there. (I checked camtools and readcd > and came up with nothing.) > 3. Make a new ISO with all of the old and the new data, write that out to > disk. (A bit resource intense, but it should work.) > > > The question for you is whether I was thorough enough evaluating method 2. Is > there some way to find out the last sector used on a SCSI device from the > command line? If not, is there some way to roll my own? Check out the -C and -M options for mkisofs. Also, you don't need to use readcd to write the image. You can just use dd. e.g.: dd if=image.iso of=/dev/cd0c bs=2k (you can use seek= to jump forward on the disk, so you don't have to start from the beginning each time) Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message