LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-23-2006, 09:58 AM   #1
Earl Parker II
Member
 
Registered: Jan 2002
Location: Shelby, NC, US
Distribution: Linux Mint 19.2
Posts: 130

Rep: Reputation: 17
USB pen drive is seen as a CD-ROM


I'm running Slackware 11.0 RC3 on an older Dell Dimension L667r. I have no problem mounting a SanDisk 512MB pen drive- however, Slackware considers it a CD-ROM drive (/dev/sr0 in dmesg) so I'm unable to write to it. Is there a way to get Linux to recognize this thing as a r/w device?
 
Old 09-23-2006, 10:19 AM   #2
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
I just spent the morning getting my new pen to work with automount. What is your /etc/fstab entry for the pen?

Also what does dmesg show after plugging in the pen?
 
Old 09-23-2006, 01:18 PM   #3
Earl Parker II
Member
 
Registered: Jan 2002
Location: Shelby, NC, US
Distribution: Linux Mint 19.2
Posts: 130

Original Poster
Rep: Reputation: 17
My /etc/fstab entry is:

Code:
/dev/sr0  /mnt/sandisk  usbfs  noauto,rw  0   0
The entry in dmesg is:

Code:
Vendor: SanDisk   Model: U3 Cruzer Micro   Rev: 2.15
Type: CD-ROM                               ANSI SCSI revision: 02
Attached scsi CD_ROM sr0 as scsi1, channel 0, id 0, lun 1
sr0: scsi1 drive
 
Old 09-23-2006, 01:26 PM   #4
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Do you have USB Mass Storage and SCSI Disk Support modules loaded or compiled into the kernel?
 
Old 09-23-2006, 02:33 PM   #5
Earl Parker II
Member
 
Registered: Jan 2002
Location: Shelby, NC, US
Distribution: Linux Mint 19.2
Posts: 130

Original Poster
Rep: Reputation: 17
Indeed I do. In fact, much to my amazement, I seem to have gotten it working- here's what I did:

1. I'd forgotten that I'd been fooling around with a camera (another story) which was assigned to /dev/sda in /etc/fstab, so I got rid of that line just to see what would happen.

2. I rebooted and had this in dmesg:
Code:
Vendor: SanDisk   Model: U3 Cruzer Micro   Rev: 2.15
Type: Direct-Access                        ANSI SCSI revision: 02
Attached scsi removeable disk sda as scsi1, channel 0, id 0, lun 0
SCSI device sda: 9900865 512-byte hwr sectors (507MB)
3. Then I entered this line in /etc/fstab:
Code:
/dev/sda  /mnt/sandisk  usbfs  noauto,rw  0   0
4. Now I'm thinking that this drive is being seen as a hard drive (sda) so I decided to see if I could create a filesystem on it:
Code:
mke2fs -v -b 1024 /dev/sda
5. After creating the ext2 filesystem I changed the appropriate line in /etc/fstab to read:
Code:
/dev/sda  /mnt/sandisk  ext2  noauto,rw  0   0
6. I mounted the drive manually and was able to read/write with no problems at all. Apparently it's now seen as a SCSI hard drive.

Thank you, dive, for responding. I don't think I left any steps out but if you see a glaring ommission just let me know.

I'm certainl no Linux guru but I'll be glad to help anyone with this sort of thing if I can.

Last edited by Earl Parker II; 09-23-2006 at 02:37 PM.
 
Old 09-23-2006, 02:38 PM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
I had to put rw,uid=dive to get mine to write, but if it works ok then that's good.

Now I've got to figure out what to do with portable a portable 1 gig of ram...
 
Old 09-23-2006, 02:45 PM   #7
Earl Parker II
Member
 
Registered: Jan 2002
Location: Shelby, NC, US
Distribution: Linux Mint 19.2
Posts: 130

Original Poster
Rep: Reputation: 17
Can you define a 'portable 1 gig of RAM'? This is a new one on me...
 
Old 09-23-2006, 02:53 PM   #8
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
1GB usb memory stick
 
Old 09-23-2006, 03:00 PM   #9
Earl Parker II
Member
 
Registered: Jan 2002
Location: Shelby, NC, US
Distribution: Linux Mint 19.2
Posts: 130

Original Poster
Rep: Reputation: 17
Thanks- hadn't a memory stick referred to that way before... BTW, I'm use the terms 'pen drive' and 'memory stick' interchangeably- am I incorrect?
 
Old 09-23-2006, 03:03 PM   #10
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Yeah I think you can use either term + I think they can also be named jumpdrive or thumbdrive

Last edited by dive; 09-23-2006 at 03:04 PM.
 
Old 09-23-2006, 05:51 PM   #11
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by Earl Parker II
5. After creating the ext2 filesystem I changed the appropriate line in /etc/fstab to read:
Code:
/dev/sda  /mnt/sandisk  ext2  noauto,rw  0   0
Surely you should be mounting a partition, e.g. /dev/sda1? Run "fdisk -l" (that's a lowercase L, not number one) to see what partitions are on the device.
 
Old 09-24-2006, 12:11 AM   #12
Earl Parker II
Member
 
Registered: Jan 2002
Location: Shelby, NC, US
Distribution: Linux Mint 19.2
Posts: 130

Original Poster
Rep: Reputation: 17
You're exactly right- it should have read:
Code:
/dev/sda1  /mnt/sandisk  ext2  noauto,rw  0   0
I apologize for the typo.
 
Old 09-24-2006, 05:33 PM   #13
combatbob
LQ Newbie
 
Registered: Aug 2005
Location: Killeen, Texas
Distribution: Ubuntu as of late
Posts: 25

Rep: Reputation: 15
Sep 24 15:14:01 localhost kernel: hub.c: new USB device 00:10.4-3, assigned address 2
Sep 24 15:14:01 localhost kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Sep 24 15:14:01 localhost kernel: Vendor: Pretec Model: 512MB Gini Rev: 1.10
Sep 24 15:14:01 localhost kernel: Type: Direct-Access ANSI SCSI revision: 02
Sep 24 15:14:04 localhost usb.agent[2207]: usb-storage: already loaded
Sep 24 15:14:57 localhost net.agent[2240]: Bad NET invocation: $INTERFACE is not set

Okay where do I go from here to mount this. acording to fstab usbfs is mounting in /proc/bus/usb possibly device usb-storage-1. but I can't access it. what do i need to do now. Kernel recognizes plug unplug states. howevere note the usb-storage already loaded message.. any hellp would be appreciated
 
Old 09-25-2006, 04:03 AM   #14
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Have a look in kernel config under scsi devices for extra modules that you need for usb storage. You need SCSI Disk Support ( BLK_DEV_SD ) but there may be another. I have that and SCSI Generic Support ( CHR_DEV_SG )

You need to have at least BLK_DEV_SD compiled in or as a module. If as a module you can modprobe it to load it.

After installing the module you should get a line in dmesg to which device it's assigned. Mine says

Code:
sb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
  Vendor: Samsung   Model: Mighty Drive      Rev: PMAP
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 2030592 512-byte hdwr sectors (1040 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 2030592 512-byte hdwr sectors (1040 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: Attached scsi removable disk sda
So the device is attached at sda1. Notice it waits a bit before it assigns a device to it. This takes a few seconds on my system so you need to run dmesg a few times until it gets attached.

Last edited by dive; 09-25-2006 at 04:08 AM.
 
Old 10-04-2006, 09:45 AM   #15
combatbob
LQ Newbie
 
Registered: Aug 2005
Location: Killeen, Texas
Distribution: Ubuntu as of late
Posts: 25

Rep: Reputation: 15
Sigh still no luck, any suggestions? I don't understand the Debian system. the pen drive doesn't come up under SDA as it did in slack and mandriva. It is there though. Cant edit or find scsi devices. I can't find any device under scsi. I might need to load a "package from Debian" to get it under scsi. I notice that NET failed. I was looking to see inf netsmnp was installed, it was an issue for slack. Blk_DV_SD looks like a variable, what lib or program is it associated with? Its starting to look like Debian loads the kernel then mouses all mods after that. I don't know for sure.

Last edited by combatbob; 10-04-2006 at 09:54 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Usb Pen Drive vivekthemind Linux - Hardware 4 09-30-2005 05:09 AM
USB Pen Drive Partitioning esckey2004 Linux - General 1 12-10-2004 02:34 PM
USB Pen Drive fuoi2 Linux - Newbie 10 09-08-2004 08:03 AM
USB Pen Drive on 2.6.x LST Linux - Hardware 1 05-02-2004 10:25 PM
USB Pen Drive rlculver Linux - Hardware 1 11-08-2003 09:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration