Professional Web Applications Themes

SCSI device numbers - FreeBSD

On Tue, 2005-02-15 at 09:45, Lowell Gilbert wrote: > Mike Jeays <Mike.Jeaysrogers.com> 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 ...

  1. #1

    Default Re: SCSI device numbers

    On Tue, 2005-02-15 at 09:45, Lowell Gilbert wrote:
    > Mike Jeays <Mike.Jeaysrogers.com> 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?
    I don't understand either, but it happens. I rebooted with the flash
    drive not plugged in, and the DVD burner is now dev=1,0,0. Then I
    inserted the flash drive, and it was assigned dev=2,0,0. A second flash
    drive got 3,0,0 - which seems reasonable.

    So I wrote a tiny Perl script to find the unit number, and call it
    before running cdrecord. It works OK, but it still seems like a kludge
    to me.

    Thanks for the help.

    Mike Jeays Guest

  2. #2

    Default Re: SCSI device numbers

    On Sun, Feb 13, 2005 at 10:52:54PM -0500, Mike Jeays wrote:
    > 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).
    One possibility might be to make the umass driver a module and keep
    atapicam compiled into the kernel, or make them both modules, but always
    load atapicam first. This will cause usb storage devices to always come
    later since they won't be detected until the umass module is loaded.

    P.S. Does freebsd do anything to autoload modules that might interfere?
    >
    > 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.
    >
    >
    >
    >
    >
    > _______________________________________________
    > [email]freebsd-questionsfreebsd.org[/email] mailing list
    > [url]http://lists.freebsd.org/mailman/listinfo/freebsd-questions[/url]
    > To unsubscribe, send any mail to "freebsd-questions-unsubscribefreebsd.org"
    --
    I sense much NT in you.
    NT leads to Bluescreen.
    Bluescreen leads to downtime.
    Downtime leads to suffering.
    NT is the path to the darkside.
    Powerful Unix is.

    Public Key: [url]ftp://ftp.tallye.com/pub/lorenl_pubkey.asc[/url]
    Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C

    Loren M. Lang Guest

Similar Threads

  1. How to control SCSI device in win32??
    By news.hinet.net in forum PERL Modules
    Replies: 0
    Last Post: November 11th, 07:25 AM
  2. Lilo: strange warnings when scsi boot + ide-scsi emulation
    By Mannr@uwaterloo.ca in forum Linux Setup, Configuration & Administration
    Replies: 1
    Last Post: August 9th, 01:50 AM
  3. How to make partition in SCSI device with a script?
    By Alex in forum Linux Setup, Configuration & Administration
    Replies: 1
    Last Post: July 16th, 12:44 PM
  4. Replies: 2
    Last Post: July 10th, 08:09 PM
  5. Replies: 1
    Last Post: June 30th, 05:26 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139