LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   usb memory stick mount (http://www.linuxquestions.org/questions/linux-hardware-18/usb-memory-stick-mount-277534/)

nadroj 01-13-2005 08:22 PM

usb memory stick mount
 
hello... im pretty new, fyi...
im running ubuntu on my system, and want to mount my usb 32mb "CMDrive" memory stick so i can r/w to it. im not sure which device to mount though... i thought it was a "/dev/sda#" but i dont have any sda#'s listed... i have the usb-storage driver in "/lib/modules/2.6.8.1-4-386/kernel/drivers/usb/storage" (and actually using usb keyboard, which i didnt have to configure), so i guess all my usb is supported and workign fine, id think. i formatted the memstick a while ago in windowz, so its probably FAT, and not usbfs, right?
so my question, again, is, where are my usb devices located? i think the cmd "mount -t usbfs /dev/usb /mnt/usb" is what i would use, substituting the correct fs and location... i tried "fat" as fs, also, but it says it isnt supported.. should i go look for how to get fat drivers (?)?
thanks in advance

Lord Zoltar 01-13-2005 08:49 PM

Hmm... I had similar problems. part of it turned out to be that I wasn't putting the USB drive into the correct USB port... still not sure why that made a difference :confused: ...what's in your /etc/fstab ? I have
"/dev/sda1 /mnt/USBflashdrive auto noauto,owner,ro,user 0 0"
...but I just copied that line from the one for my cdrw drive, so it could account for some of the problems I'm still having...

nadroj 01-13-2005 09:01 PM

i have 6 usb ports, 4 in back and 2 in front, im trying the top one in front, cause of simplicitys sake... although i do, asi said, have a keyboard in the rear usb port, and it detected and works fine.

my fstab looks like this:
Code:

proc            /proc          proc    defaults        0      0
/dev/hdb4      /              ext3    defaults,errors=remount-ro 0      1
/dev/hdc        /media/cdrom0  udf,iso9660 ro,user,noauto  0      0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0      0
/dev/hda1      /mnt/win1      ntfs    auto,users,umask=000,rw 0 0
/dev/hda5      /mnt/win2      ntfs    auto,users,umask=000,rw 0 0
/dev/hdb5      /mnt/win3      ntfs    auto,users,umask=000,rw 0 0

i didnt add the usb device in it..because i dont know where it is! lol
i dont have any 'sda'/'sdb' files in /dev.. i checked the other arrays of files in it thats listed, like "md#" but i found out that those are raid devices (i think) so thats not it... and afew others.

i was looking around for usb related stuff, and found in my folder "/proc/bus/usb/" there are 4 child folders (001-004) and a file called 'devices'. maybe these represent the 4 ports in the rear? in the 'devices' file, are _5_ sections, and one of them has information about my logitech kb which is in a rear usb and working...

i dunno. i guess ill try one of the 3-open rear usb ports...? :S
thanks though

Lord Zoltar 01-13-2005 09:05 PM

/dev/sd* will be created automatically when you plug the device in. try pluggin it in the `ls /dev/sd*`

nadroj 01-13-2005 09:08 PM

"no such file or directory"
iv been lookin through the /dev folder for sda/sdb and usb-related files.. but there doesnt seem to be any

Lord Zoltar 01-13-2005 09:26 PM

heh... weird. well, you'll probably want to add a line to fstab eventually (but correct, unlike mine!;))
umm... might be something with udev. don't know too much about how udev works myself, except to change the permissions, and that probably won't solve your problems...
maybe a kernel upgrade (I went to 2.6.10, as some thought this would correct the problem), i dunno...

nadroj 01-13-2005 09:35 PM

im using kernel v.2.6.8.1-4-386
i was checking at your 'older' thread.. and found a post, recommending to check your /etc/udev/rules.d/udev.rules file to see some usb info.. i found this:
Code:

# USB devices
BUS="usb", KERNEL="hiddev*",    NAME="usb/%k"
BUS="usb", KERNEL="auer*",      NAME="usb/%k"
BUS="usb", KERNEL="legousbtower*", NAME="usb/%k"
BUS="usb", KERNEL="dabusb*",    NAME="usb/%k"
BUS="usb", KERNEL="lp[0-9]*",  NAME="usb/%k"

notice the "lp[0-9] part.. i do have a /dev/lp0 file.. i tried mounting that, thinking it would be it, but whenever i try mounting this usb stuff, it shows up as that folder i was referring to earlier (/proc/bus/usb).. it shows 4 folders and the 'devices' file...
im pretty sure my stick is FAT, and i do have that fat driver in /lib/modules/2.6.8....etc,etc, but when i mount with fat it says not supported

edit: iv never done a kernel upgrade, what would be the easiest way to do it? (my package man. is Synaptic) or a good website to learn?

Lord Zoltar 01-13-2005 10:01 PM

like I said, I don't know a whole helluvalot about how the udev system works.
for a kernel upgrade, you could try:
http://www.linuxquestions.org/questi...5&pagenumber=2
(yes it's another one of my threads;))

or you can just read the relevant section:
Quote:

Using slack and never compile a kernel? Then, you must you must ;)

Anyways, it's actually pretty easy. here's how I do it... some people may say it's wrong but it works...

Download the sources... try and get 2.6.7 sources only from you slack 10 cd's in /testing (disk 2)... you can't use the prebuilt kernel because it has the same config as 2.4.26 (rivafb nastiness).

cd to /testing and installpkg kernel-sources

now cd /usr/src/linux-2.6.7

cp /boot/config .config

make menuconfig

(this is the hardest part... figuring out what all of these options are... there's a help/more info available for each one... read them. Generally, if the help says Y then you should say Y other wise N.

You need to find the rivafb section... it's under video somewhere in there (device drivers maybe)... make sure that is not checked... you may want to enable some other stuff like cpufreq scaling if your processor supports it etc.)

When you've finished with this.

Gedit/Kedit/Nedit (if you're in X) Makefile... do a find for /boot and uncomment the section "export install path /boot" or something like that.

!!!!! Important !!!!! Edit you're /etc/lilo.conf !!!! Copy the current entry to another section just below and change the vmlinuz part to vmlinuz-ide-2.4.26... and change the name from Linux to Linux-2.4.26... You will have a Linux entry that is the default and a new Linux-2.4.26 entry that points to vmlinuz-ide-2.4.26... this is so you have a kernel to boot if the compile goes bad.... !!!!!!!!!!!!!!

run lilo from the command line.

now,

make
make modules_install
make install

your new kernel should now be built and be installed to /boot as vmlinuz, System.map, and config (I always copy these to make a back-up once I know they work b/c a future kernel compile will mv them to .old versions)

cd /boot
cp vmlinuz vmlinuz-2.6.7
cp System.map System.map-2.6.7
cp config config-2.6.7

gedit /etc/lilo.conf and create another kernel section just above the 2.4.26 entry for 2.6.7 and point the vmlinuz to vmlinuz-2.6.7

don't forget to rerun lilo.

That's it...


there might be a couple small errors here but nothing that would be too hard to figure out. I've used this as a guide for a few kernel upgrades since then.

as to the reason WHY the kernel upgrade is needed, here's a transcript of the relevant email
Quote:

> Hello,
> I just got a new flashdrive and when I plug it in, I find the following
> in /var/log/messages:
>
> "Jan 7 16:44:20 solomonsdesk kernel: usb 1-5: USB disconnect, address
> 39
> Jan 7 16:44:21 solomonsdesk kernel: usb 1-5: new high speed USB device
> using address 40
> Jan 7 16:44:21 solomonsdesk kernel: usb 1-5: new high speed USB device
> using address 41
> Jan 7 16:44:22 solomonsdesk wait_for_sysfs[7931]: either wait_for_sysfs
> (udev 042) needs an update t
> o handle the device
> '/devices/pci0000:00/0000:00:10.3/usb1/1-5/1-5:1.0/host26/26:0:0:0'
> properly (no
> bus device link) or the sysfs-support of your device's driver needs to
> be fixed, please report to <li
> nux-hotplug-devel@lists.sourceforge.net>
> Jan 7 16:44:22 solomonsdesk wait_for_sysfs[7935]: either wait_for_sysfs
> (udev 042) needs an update t
> o handle the device '/block/sda/sda1' properly (no bus device link) or
> the sysfs-support of your devi
> ce's driver needs to be fixed, please report to
> <linux-hotplug-devel@lists.sourceforge.net>
> Jan 7 16:44:22 solomonsdesk wait_for_sysfs[7937]: either wait_for_sysfs
> (udev 042) needs an update t
> o handle the device '/class/scsi_device/26:0:0:0' properly (no device
> symlink) or the sysfs-support o
> f your device's driver needs to be fixed, please report to
> <linux-hotplug-devel@lists.sourceforge.net
> >
> Jan 7 16:44:22 solomonsdesk wait_for_sysfs[7933]: either wait_for_sysfs
> (udev 042) needs an update t
> o handle the device '/block/sda' properly (no bus device link) or the
> sysfs-support of your device's
> driver needs to be fixed, please report to
> <linux-hotplug-devel@lists.sourceforge.net>
> Jan 7 16:44:22 solomonsdesk udev[8512]: removing device node
> '/dev/sda1'
> Jan 7 16:44:22 solomonsdesk udev[8513]: removing device node '/dev/sda'
> Jan 7 16:44:22 solomonsdesk udev[8532]: removing device node
> '/dev/sda1'
> Jan 7 16:44:22 solomonsdesk udev[8533]: removing device node '/dev/sda'
> Jan 7 16:44:22 solomonsdesk udev[8540]: removing device node
> '/dev/sda1'
> Jan 7 16:44:22 solomonsdesk udev[8541]: removing device node '/dev/sda'
> Jan 7 16:44:22 solomonsdesk udev[8548]: removing device node
> '/dev/sda1'
> Jan 7 16:44:22 solomonsdesk udev[8549]: removing device node
> '/dev/sda'"
>
> It says to contact this list... so I'm contacting!
> vital stats: kernel is 2.6.9 custom compiled, distro is slackware, I
> cannot mount or access in any other way the USB flashdrive
> ...anything else you want to know?
> Do you know what's causing this or how I can fix it?

Please upgrade to a newer version of udev, or kernel 2.6.10. A newer
udev will not print this and 2.6.10 does not cause this problem.

Hope this helps...

nadroj 01-13-2005 10:09 PM

ok, this looks like good stuff, havent looked at nearly it all yet.. just first couple lines... first off, thanks :D
2ndly, i know this is all a plot to get more hits to your posts :P
and 3rd... i have no /usr/src/linux... i did "whereis linux" and it printed /usr/include/linux... so this is what i use, rather than the stated?

edit: also.. no lilo stuff, im using grub

Lord Zoltar 01-13-2005 10:28 PM

1) I should have mentioned, that kernel upgrade guide was intended for slackware. I make no gaurantees for how it will work with other distros, but it should at least be similar.
2) Damn! how did you know?!?!! I'll get you, one day! mwahahahahaha!
3) no /usr/src/linux? i'm guessing you did `ls /usr/src` as well, hmm...
alright. it seems you're using ubuntu. If there's a ubuntu-distro forum here, I'd ask there about kernel upgrades, seeing as I know NOTHING about ubuntu. but there's probably an optional kernel-source package. check with your package manager and installation method (cd iso's, etc...) or package repository to see where to get linux source.

nadroj 01-13-2005 10:41 PM

ya.. i first checked with pkg manager Synaptic (for ubuntu), cause i figured it would be easy and wouldnt need to bug everyone here.. well... mainly you. lol
no the only thing in /usr/src is a folder called 'rpm' with about 5 subfolders.. which are all empty.
when i go to synaptic, i can see my installed "linux-image-2.6.8.1-4-386 - Linux kernel image for version 2.6.8.1 on 386." it says the latest version is the one i have, (says 2.6.8.1-16.8). i can right click andunder "mark suggested for installation" is "lilo" and "linux-doc" and "linux-source", all same version i have. maybe i could click to install lilo.. but that would probably cause a bunch of conflicts with my grub loader, eh? so... guess not.
ya, i think when i first signed up here, i checked for ubuntu forum and didnt find one.. ill check right now again, and then the ubuntu site for a how-to, or similar.. hopefully i come up with something.
oh ya, for the synaptic packages.. i can click on refresh, and it shows its downloading some info from the net, from the (default) repositories.. but maybe the sites it has set up, hasnt added the new kernel yet? :S the sites are security.ubuntu.com/ubuntu.. i guess ill add one then? what should the address be and 'type'?
thank U

edit: ok, i have 3 fields to enter in, for the 'new' repository:
url - http://www.kernel.org/pub/linux/, which i found ALL by myself!! *rolls eyes
distribution - ???
sections - ???
dont know what to put for the ??'s.. i looked at my other repositories' details, thinking they would be similar, but they are not


All times are GMT -5. The time now is 07:19 AM.