LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-05-2005, 01:11 AM   #1
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 35
using mknod to connect devices


If I have a mp3 player that uses a HD and I connect it with an USB cable how can I "force" linux to mount this device?

For eg.... I connect my device on my USB port and now want to creat a nod so I could mount it with the mount command... just like a regular HD...


[ ]ś
 
Old 06-05-2005, 05:49 PM   #2
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
USB drives are /dev/sda or /dev/sda1 depending on the device.

plug ion the device, and have a look at dmesg outut.
Hopefully the device will be listed as a mass storeage device.
 
Old 06-06-2005, 10:59 AM   #3
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Original Poster
Rep: Reputation: 35
I dont know if the mknod command will be the right to do what I want


like I said when I plug my mp3 player (that uses a HD as internal storage) in my usb port happens. The device SDA isnt created, I cant mount it... but have to be some way, after all it is a HD ... Im using Gnomad2 to transfer files, but I want to know, learn more, and Im curious to know how its possible to see this Device, how can I explore its HD.... when I plug my pendrive the sda device appear and I can mount.


[ ]ś
 
Old 06-06-2005, 11:11 AM   #4
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
Get udev, it creates new /dev nodes for you whenever they're needed
 
Old 07-26-2005, 01:24 PM   #5
ttilt
Member
 
Registered: Dec 2003
Location: Campinas, Brasil
Distribution: slackware 10
Posts: 150

Rep: Reputation: 15
Quote:
Originally posted by oneandoneis2
Get udev, it creates new /dev nodes for you whenever they're needed
hi, i have udev and when i plug in a pen drive, the /dev/sda? is not crated. Any ideas why?

lsusb lists the pen drive correctly, just no /dev is created. Here's my /etc/udev/udev/conf:

Code:
# udev.conf
# The main config file for udev
#
# This file can be used to override some of udev's default values
# for where it looks for files, and where it places device nodes.


# udev_root - where in the filesystem to place the device nodes
udev_root="/dev/"

# udev_db - The name and location of the udev database.
udev_db="/dev/.udev.tdb"

# udev_rules - The name and location of the udev rules dir
udev_rules="/etc/udev/rules.d"

# udev_permissions - The name and location of the udev permission dir
udev_permissions="/etc/udev/permissions.d"

# default_mode - set the default mode for all nodes that have no
#                explicit match in the permissions file
default_mode="0600"

# default_owner - set the default owner for all nodes that have no
#                 explicit match in the permissions file
default_owner="root"

# default_group - set the default group for all nodes that have no
#                 explicit match in the permissions file
default_group="root"

# udev_log - set to "yes" if you want logging, else "no"
udev_log="yes"
 
Old 07-27-2005, 09:06 AM   #6
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Original Poster
Rep: Reputation: 35
you need to have the right modules in the kernel, like scsi and usb, after wall a sda device is recognized like a scsi disk...
 
Old 07-27-2005, 11:31 AM   #7
ttilt
Member
 
Registered: Dec 2003
Location: Campinas, Brasil
Distribution: slackware 10
Posts: 150

Rep: Reputation: 15
yea i fixed the prob.

THe thing is i was trying to make a pen drive work, but i was missing sd_mod module in the kernel and also the device that's used, at least in slack 10.1, is not /dev/sda, but /dev/uba. Does anyone know why? Does that have something to do w/ the fact that I'm using 2.6 kernel?

Thanks
 
Old 07-27-2005, 06:56 PM   #8
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Original Poster
Rep: Reputation: 35
Maybe this is because your PenDrive have a diferent hardware so it is recognized like UBA, usb A, mine is recognized like a SCSI drive, sda...

this is just a guest, because I always used this pen drive from apacer never tested other and every distro recognize it like sd device...

Or maybe because this pen I use is usb2.0 and you are using 1.1 ??
remember that usb 2.0 and 1.1 have a lot of speed diference maybe this is why one is like a normal usb drive and the other is like a scsi drive... my external firewire hd is recognized like a scsi drive for its speed (400mb/s)

Last edited by maginotjr; 07-27-2005 at 06:58 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using mknod to restore clobbered devices Woodsman Slackware 2 11-24-2005 07:02 PM
mknod Basel Linux From Scratch 1 09-03-2005 02:13 PM
mknod Infinite_Pizza Linux - Software 2 04-14-2005 08:59 PM
mknod or devfs? rose_bud4201 *BSD 5 05-07-2004 01:29 AM
mknod watashiwaotaku7 Linux - Software 1 01-23-2003 10:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10: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