From owner-freebsd-questions@FreeBSD.ORG Tue Feb 15 14:45:15 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5BE4516A4CE for ; Tue, 15 Feb 2005 14:45:15 +0000 (GMT) Received: from mail28.sea5.speakeasy.net (mail28.sea5.speakeasy.net [69.17.117.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DFE043D1F for ; Tue, 15 Feb 2005 14:45:15 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 16455 invoked from network); 15 Feb 2005 14:45:14 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail28.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 15 Feb 2005 14:45:14 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id BC08B7E; Tue, 15 Feb 2005 09:45:13 -0500 (EST) Sender: lowell@be-well.ilk.org To: Mike Jeays References: <1108353173.33317.10.camel@chaucer.jeays.ca> From: Lowell Gilbert Date: 15 Feb 2005 09:45:13 -0500 In-Reply-To: <1108353173.33317.10.camel@chaucer.jeays.ca> Message-ID: <44fyzx287a.fsf@be-well.ilk.org> Lines: 31 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-questions@freebsd.org Subject: Re: SCSI device numbers X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2005 14:45:15 -0000 Mike Jeays writes: > I have at present two emulated SCSI devices on my system; a USB flash > drive, and a DVD-writer. > > They get assigned: > > 0,0,0 0) 'SanDisk ' 'Cruzer Micro ' '2033' Removable Disk > 2,0,0 200) 'HL-DT-ST' 'DVDRAM GSA-4160B' 'A300' Removable CD-ROM > > if the USB device is present at boot time (I think). > > So my script for burning CDs, which says: > mkisofs -J -L -R -o x1.iso "$*" > cdrecord -v dev=2,0,0 x1.iso > rm -f x1.iso > is very fragile. > > How should I do it? Write a script to read the output of cdrecord > -scanbus and grab the device number? There has to be a "right" way, and > instinct says this isn't it. It's not a bad way. I'm not sure I understand why the device numbering is so fragile, though; wouldn't the ATAPI buses available at boot time be the same whether they have devices or not? -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/