LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 09-07-2006, 12:02 AM   #1
micro_xii
Member
 
Registered: Sep 2006
Posts: 140

Rep: Reputation: 15
Exclamation cant detect usb flash drive


Greetings to all.

Newbie here.

In this forum i follow the steps:

cat /proc/partitions
8 0 35548320 sda
8 1 1052226 sda1
8 2 34491555 sda2
8 16 71687000 sdb
8 17 1052226 sdb1
8 18 70621740 sdb2
8 32 35548320 sdc
8 33 1052226 sdc1
8 34 34491555 sdc2
8 80 122879 sdf---->my usb.it changes when i plug /unplug.

mkdir /mnt/usb
mount /dev/sdf /mnt/usb

it works fine..temporarily.I want it to be permanent and computer will detect it automatically.....in the forum it says something about /etc/fstab...........i mean whats next..when i command this it says
permission denied...but i logon as a root.Can anyone show the complete command...newbie here
 
Old 09-07-2006, 03:58 AM   #2
Thomas Lemmens
Member
 
Registered: Sep 2006
Location: European Union (BE)
Distribution: Ubuntu, Slackware
Posts: 49

Rep: Reputation: 16
Quote:
Originally Posted by micro_xii
Greetings to all.

Newbie here.

In this forum i follow the steps:

cat /proc/partitions
8 0 35548320 sda
8 1 1052226 sda1
8 2 34491555 sda2
8 16 71687000 sdb
8 17 1052226 sdb1
8 18 70621740 sdb2
8 32 35548320 sdc
8 33 1052226 sdc1
8 34 34491555 sdc2
8 80 122879 sdf---->my usb.it changes when i plug /unplug.

mkdir /mnt/usb
mount /dev/sdf /mnt/usb

it works fine..temporarily.I want it to be permanent and computer will detect it automatically.....in the forum it says something about /etc/fstab...........i mean whats next..when i command this it says
permission denied...but i logon as a root.Can anyone show the complete command...newbie here
What distribution are you running on your pc? What brand is your usb-stick?
I am working on opensuse 10.1 64bit and my usb-stick (brand: imation) is automatically detected on insert and opened in Nautilus (filemanager of gnome desktop). And when I rightclick on the desktop-icon there is a popupmenu with an option to unmount the volume. In proc/partitions you can see that two devices are activated by inserting the stick: sde AND sde1 (I suppose that sde is for the specific used usbbus and sde1 is the imation scsistick).
This is my /etc/fstab
/dev/hdb6 / reiserfs acl,user_xattr 1 1
/dev/hdb7 /home reiserfs acl,user_xattr 1 2
/dev/hda1 /windows/C vfat users,gid=users,umask=0002,utf8=true 0 0
/dev/hda2 /windows/D ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/hdb1 /windows/E ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/hdb5 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/fd0 /media/floppy auto noauto,user,sync 0 0

As you can see there is no sde-entry in the fstab (= filesystem table). Automatic mount and umount is a specific feature of the distribution, and not standard linux. In standard linux, you have to manualy mount and umount your removable devices. Maybe another member knows the secrets of these features.

Hope this helps,
Thomas

Last edited by Thomas Lemmens; 09-07-2006 at 04:08 AM.
 
Old 09-07-2006, 05:20 AM   #3
micro_xii
Member
 
Registered: Sep 2006
Posts: 140

Original Poster
Rep: Reputation: 15
im using suse 9, flash disk imation 128mb

linux:~ # cat /proc/partitions ----->without usb disk inserted
major minor #blocks name

8 0 35548320 sda
8 1 1052226 sda1
8 2 34491555 sda2
8 16 71687000 sdb
8 17 1052226 sdb1
8 18 70621740 sdb2
8 32 35548320 sdc
8 33 1052226 sdc1
8 34 34491555 sdc2
linux:~ # cat /proc/partitions ------->usb inserted.
major minor #blocks name

8 0 35548320 sda
8 1 1052226 sda1
8 2 34491555 sda2
8 16 71687000 sdb
8 17 1052226 sdb1
8 18 70621740 sdb2
8 32 35548320 sdc
8 33 1052226 sdc1
8 34 34491555 sdc2
8 80 122879 sdf

using this commands my usb disk works fine
cat /proc/partitions
mkdir /mnt/usb
mount /dev/sdf /mnt/usb
But this commands are temporary,when i unplug the usb and return it...the suse 9 cant detect automatically...i need to type again the commands....i need a command that will mount it permanently and suse 9 can detect it automatically...thx.

/etc/fstab (what additional command should i put here)

/dev/sdb2 / reiserfs acl,user_xattr 1 1
/dev/sda2 /data1 auto noauto,user 0 0
/dev/sdc2 /data2 auto noauto,user 0 0
/dev/sda1 swap swap pri=42 0 0
/dev/sdb1 swap swap pri=42 0 0
/dev/sdc1 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
sysfs /sys sysfs noauto 0 0
/dev/cdrecorder /media/cdrecorder subfs fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/cdrom /media/cdrom subfs fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0 /media/floppy subfs fs=floppyfss,procuid,nodev,nosuid,sync 0 0

Last edited by micro_xii; 09-07-2006 at 05:31 AM.
 
Old 09-07-2006, 05:55 AM   #4
liaty
Member
 
Registered: Oct 2005
Distribution: openSuse 10.1
Posts: 129

Rep: Reputation: 15
before touching your fstab, I would look in system services in yast and check that there is no service for automounting file systems (autofs in 10.1, don't know about 9).

But if you want to add a line to your fstab try from command line as root:

vi /etc/fstab

[esc] i (to get into write mode)

on new line:

/dev/sdf [TAB] /mnt/usb [TAB] auto [TAB] auto,user [TAB] 0 [TAB] 0

then [esc] :wq to save and exit.


create the spaces using the [TAB] button.
There are other options to go with auto,user. Have a google.
 
Old 09-07-2006, 09:26 AM   #5
Thomas Lemmens
Member
 
Registered: Sep 2006
Location: European Union (BE)
Distribution: Ubuntu, Slackware
Posts: 49

Rep: Reputation: 16
In my opinion the reason why you have to mount and umount manually removable devices in standard linux is obvious: the system is loading the fstab entries at boot time. When you are inserting removable devices AFTER boottime, it's unsure how and where the system loads the device. It is depending on other loaded removable devices. You have to fix it manually. A sophisticated distro as suse 10.1 uses autofs to deal with this problem (new autodetected devices). If autofs or equivalent software is absent, (and/or autodetection of new inserted devices is absent,) it makes only sense to change the fstab when you insert the removable device BEFORE boot time (and remove it after shutdown).

Hope this helps,
Thomas

Last edited by Thomas Lemmens; 09-07-2006 at 09:31 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
How will Red Hat 9 detect a USB flash drive? northern_lights Linux - Newbie 3 09-20-2006 09:23 AM
How to detect USB Flash drive in C program? kr123 Programming 1 12-06-2005 02:56 PM
kinoppix 3.7 doesnot detect the usb flash drive nirVaan Linux - Newbie 2 06-02-2005 01:16 AM
Failure to detect SanDisk Cruzer 256 USB Flash Drive on RH 8.0 sudz1979 Linux - Hardware 3 02-25-2004 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

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