LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-20-2005, 10:44 PM   #1
spankmeister7
LQ Newbie
 
Registered: Jan 2003
Posts: 8

Rep: Reputation: 0
flash drive


So I picked up a flash drive.
And I'm using Gentoo.
With the 2.6.11 kernel.

I have hotplug installed, and my system uses SCSI drives.

When I plug in the drive and run dmesg, I get this:

usb 1-3: new high speed USB device using ehci_hcd and address 2

Um.. now what do I do? I've poked around how-to's, but they all seem to be for the 2.4 kernel.
 
Old 09-20-2005, 11:00 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Ah, you've come to the right place!

In order to use a USB Flash Drive (aka "Mass Storage Device"), you'll actually need several key components in your kernel, or loaded as modules. These include USB Mass Storage (CONFIG_USB_STORAGE), SCSI Generic Support (CONFIG_CHR_DEV_SG), and SCSI Disk Support (CONFIG_BLK_DEV_SD). Obviously, general USB support as well, but as your system has detected the USB device, so you have that.

For your greatest simplicity, you'll want to install the hotplug service and set it start at boot (rc-update add hotplug default). Make sure you've loaded the sd_mod kernel modules.

With these modules loaded and the hotplug service running (which is, I believe, optional) you should be good to go. Plug in your USB Flash drive and it should show up as a /dev/sdXN, where XN will be "a1" if you have no other SCSI/USB devices on the system.

For gentoo-specific USB Mass Storage configuration, you can check out this HOWTO from the Gentoo Linux Wiki.

If you'd like, you can udev to recognize the device by specific name, serial number, or similar, and give it a more friendly name like /dev/jumpdrive.

If you have any problems with these steps, let me know, and I'd be glad to help you debug it and get it up and running.
 
Old 09-20-2005, 11:03 PM   #3
TomaCzar
Member
 
Registered: Dec 2003
Location: Roc City (Rochester-NY)
Distribution: Slacker 4 Life
Posts: 125

Rep: Reputation: 15
spankmeister7,

Try doing a 'dmesg' to find out where the flash drive was associated. It should be a /dev/sdX. If it's already formatted, simply mount that partition.

ex. mount /dev/sda1 /mnt/flash

If it isn't already formatted, format it with the fsck of whatever file structure you want on there (vfat is recommended if you want to be able to go back and forth between M$ boxes).
 
Old 09-21-2005, 12:29 AM   #4
spankmeister7
LQ Newbie
 
Registered: Jan 2003
Posts: 8

Original Poster
Rep: Reputation: 0
more

Thanks for the quick responses!

Since my system is already primarily SCSI based, I already have scsi generic and scsi disk support compiled into the kernel.
My main SCSI drive partitions already show up as /dev/sda, /dev/sda1, /dev/sda2.

When I run sg_map I get:
/dev/sg0 /dev/sda
/dev/sg1 /dev/scd0
/dev/sg2 /dev/nst0
/dev/sg3 /dev/scd1

Which correspond to my scsi hard drive, scsi cd-burner, scsi tape drive, and scsi dvd-rom drive.

What module is sd_mod?

When I run dmesg there is no reference to /dev/sd-anything.
 
  


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
flash drive?? n0kturnal Slackware 4 08-08-2005 03:29 PM
Need Help With Flash Drive The_Landlord Linux - Newbie 4 01-25-2005 04:45 PM
Flash Drive dudeguy9001 Linux - Hardware 1 12-31-2004 07:13 PM
IRQ conflict when external drive/flash-drive is put to use Nightfrost Linux - Hardware 0 10-22-2004 04:15 AM
Flash Drive Patbuzz86 Linux - Newbie 8 05-14-2004 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:42 PM.

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