Jump to content

Cannot mount my usb drive [solved]


Sunwatcher
 Share

Recommended Posts

I have searched the forum, and I've found some things about mounting a usb drive -- but my knowledge of linux is still so sketchy that I just didn't understand what was being said. I have a fresh install of 2008 on my desktop with, as far as I can tell, the latest kernel. I inserted a usb drive and got an error message: "Cannot open volume. You are not privilieged to mount the volume '. . . .'"

 

If it doesn't work through the gui, then I am rather lost. Is there a way that I can get Mandriva to mount usb drives automatically as user -- as it already does on my laptop with 2007 RC1? Do I have to do something through the command line? (If so I need step by step instructions.) Is there some clear documentation avaible that will teach me about mount points and mounting devices? Thanks for any help.

Link to comment
Share on other sites

Standard install shouldn't give this error message; that you can check using Mandriva One.

So:

- either you have some compatibility issue with your hardware,

- or you used some "unusual" installation option.

 

Did you change advanced options about mounting, about removable devices, boot options maybe?

Do you remember what security level you chose?

 

Yves.

Link to comment
Share on other sites

Thanks Yves. I did not change anything about mounting, etc. Nor did I change security level from what came with the standard installation. (I'm not so clear on all this, so I just went with all default options on installation.) I can use my usb ports for other things: I had an external hd attached, and a wireless mouse. The problem extends to different usb drives, different manufacturers.

Link to comment
Share on other sites

As you say you don't know linux much, we'll first try to see what the hardware is and how it is detected.

In your main Mandriva Applications menu, there should be a "Tools" submenu, and inside a "Terminal" item. Please execute "Terminal" (or XTerm or Gnome-terminal or Konsole or whatever it is called). This will open a terminal window, which is to Gnome/KDE what DOS is to Windows, but infinitely more modern and powerfull.

Do the following steps (don't type the quotes):

1/ In the terminal window, type "cd" and ENTER

2/ In the terminal window, type "lshal >before" and ENTER

3/ Plug your USB device in, and wait 5 seconds or so

4/ In the terminal window, type "lshal >after" and ENTER

5/ In the terminal window, type "diff before after >newdevice.txt" and ENTER

6/ In the terminal window, type "rm -f before after" and ENTER

 

Now you can close the terminal window, either by typing Ctrl+d, or "exit" and ENTER, or just closing the window ;)

Please post the contents of the "newdevice.txt" file, which should have been created in your home-directory.

Also please post the output of the following three commands (in a terminal window):

id

mount

ls -l /media

You can copy the output from the terminal window to the browser by simply selecting the text in the terminal window with the mouse, and then pressing the middle mouse button in the browser text-editor.

 

Yves.

Link to comment
Share on other sites

I followed your instructions in steps 1-6 above. The output to newdevice.txt was:

2c2

< Dumping 88 device(s) from the Global Device List:

---

> Dumping 96 device(s) from the Global Device List:

969a970,1177

> udi = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15'

> info.bus = 'usb_device' (string)

> info.linux.driver = 'usb' (string)

> info.parent = '/org/freedesktop/Hal/devices/usb_device_0_0_0000_00_1d_7' (string)

> info.product = 'TD Classic 003C' (string)

> info.subsystem = 'usb_device' (string)

> info.udi = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15' (string)

> info.vendor = 'M-Systems Flash Disk Pioneers' (string)

> linux.device_file = '/dev/5-3' (string)

> linux.hotplug_type = 2 (0x2) (int)

> linux.subsystem = 'usb' (string)

> linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-3' (string)

> usb_device.bus_number = 5 (0x5) (int)

> usb_device.can_wake_up = false (bool)

> usb_device.configuration_value = 1 (0x1) (int)

> usb_device.device_class = 0 (0x0) (int)

> usb_device.device_protocol = 0 (0x0) (int)

> usb_device.device_revision_bcd = 256 (0x100) (int)

> usb_device.device_subclass = 0 (0x0) (int)

> usb_device.is_self_powered = false (bool)

> usb_device.linux.device_number = 7 (0x7) (int)

> usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-3' (string)

> usb_device.max_power = 200 (0xc8) (int)

> usb_device.num_configurations = 1 (0x1) (int)

> usb_device.num_interfaces = 1 (0x1) (int)

> usb_device.num_ports = 0 (0x0) (int)

> usb_device.product = 'TD Classic 003C' (string)

> usb_device.product_id = 8 (0x8) (int)

> usb_device.serial = '0C90D850A280DA15' (string)

> usb_device.speed = 480.0 (480) (double)

> usb_device.speed_bcd = 294912 (0x48000) (int)

> usb_device.vendor = 'M-Systems Flash Disk Pioneers' (string)

> usb_device.vendor_id = 2284 (0x8ec) (int)

> usb_device.version = 2.0 (2) (double)

> usb_device.version_bcd = 512 (0x200) (int)

>

> udi = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_usbraw'

> info.capabilities = {'usbraw'} (string list)

> info.category = 'usbraw' (string)

> info.parent = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15' (string)

> info.product = 'USB Raw Device Access' (string)

> info.udi = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_usbraw' (string)

> linux.device_file = '/dev/bus/usb/005/007' (string)

> linux.hotplug_type = 2 (0x2) (int)

> linux.subsystem = 'usb_device' (string)

> linux.sysfs_path = '/sys/class/usb_device/usbdev5.7' (string)

> usbraw.device = '/dev/bus/usb/005/007' (string)

>

> udi = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_if0'

> info.bus = 'usb' (string)

> info.linux.driver = 'usb-storage' (string)

> info.parent = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15' (string)

> info.product = 'USB Mass Storage Interface' (string)

> info.subsystem = 'usb' (string)

> info.udi = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_if0' (string)

> linux.hotplug_type = 2 (0x2) (int)

> linux.subsystem = 'usb' (string)

> linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-3/5-3:1.0' (string)

> usb.bus_number = 5 (0x5) (int)

> usb.can_wake_up = false (bool)

> usb.configuration_value = 1 (0x1) (int)

> usb.device_class = 0 (0x0) (int)

> usb.device_protocol = 0 (0x0) (int)

> usb.device_revision_bcd = 256 (0x100) (int)

> usb.device_subclass = 0 (0x0) (int)

> usb.interface.class = 8 (0x8) (int)

> usb.interface.number = 0 (0x0) (int)

> usb.interface.protocol = 80 (0x50) (int)

> usb.interface.subclass = 6 (0x6) (int)

> usb.is_self_powered = false (bool)

> usb.linux.device_number = 7 (0x7) (int)

> usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-3/5-3:1.0' (string)

> usb.max_power = 200 (0xc8) (int)

> usb.num_configurations = 1 (0x1) (int)

> usb.num_interfaces = 1 (0x1) (int)

> usb.num_ports = 0 (0x0) (int)

> usb.product = 'USB Mass Storage Interface' (string)

> usb.product_id = 8 (0x8) (int)

> usb.serial = '0C90D850A280DA15' (string)

> usb.speed = 480.0 (480) (double)

> usb.speed_bcd = 294912 (0x48000) (int)

> usb.vendor = 'M-Systems Flash Disk Pioneers' (string)

> usb.vendor_id = 2284 (0x8ec) (int)

> usb.version = 2.0 (2) (double)

> usb.version_bcd = 512 (0x200) (int)

>

> udi = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_if0_scsi_host'

> info.capabilities = {'scsi_host'} (string list)

> info.category = 'scsi_host' (string)

> info.parent = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_if0' (string)

> info.product = 'SCSI Host Adapter' (string)

> info.udi = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_if0_scsi_host' (string)

> linux.hotplug_type = 2 (0x2) (int)

> linux.subsystem = 'scsi_host' (string)

> linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-3/5-3:1.0/host8' (string)

> scsi_host.host = 8 (0x8) (int)

>

> udi = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_if0_scsi_host_scsi_device_lun0'

> info.bus = 'scsi' (string)

> info.linux.driver = 'sd' (string)

> info.parent = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_if0_scsi_host' (string)

> info.product = 'SCSI Device' (string)

> info.subsystem = 'scsi' (string)

> info.udi = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_if0_scsi_host_scsi_device_lun0' (string)

> linux.hotplug_type = 2 (0x2) (int)

> linux.subsystem = 'scsi' (string)

> linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-3/5-3:1.0/host8/target8:0:0/8:0:0:0' (string)

> scsi.bus = 0 (0x0) (int)

> scsi.host = 8 (0x8) (int)

> scsi.lun = 0 (0x0) (int)

> scsi.model = 'TD Classic 003C' (string)

> scsi.target = 0 (0x0) (int)

> scsi.type = 'disk' (string)

> scsi.vendor = 'Memorex' (string)

>

> udi = '/org/freedesktop/Hal/devices/storage_serial_Memorex_TD_Classic_003C_0C90D850A280DA15_0_0'

> block.device = '/dev/sdb' (string)

> block.is_volume = false (bool)

> block.major = 8 (0x8) (int)

> block.minor = 16 (0x10) (int)

> block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_Memorex_TD_Classic_003C_0C90D850A280DA15_0_0' (string)

> info.addons = {'hald-addon-storage'} (string list)

> info.capabilities = {'storage', 'block'} (string list)

> info.category = 'storage' (string)

> info.parent = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_if0_scsi_host_scsi_device_lun0' (string)

> info.product = 'TD Classic 003C' (string)

> info.udi = '/org/freedesktop/Hal/devices/storage_serial_Memorex_TD_Classic_003C_0C90D850A280DA15_0_0' (string)

> info.vendor = 'Memorex' (string)

> linux.hotplug_type = 3 (0x3) (int)

> linux.sysfs_path = '/sys/block/sdb' (string)

> storage.automount_enabled_hint = true (bool)

> storage.bus = 'usb' (string)

> storage.drive_type = 'disk' (string)

> storage.firmware_version = '1.02' (string)

> storage.hotpluggable = true (bool)

> storage.lun = 0 (0x0) (int)

> storage.media_check_enabled = true (bool)

> storage.model = 'TD Classic 003C' (string)

> storage.no_partitions_hint = false (bool)

> storage.originating_device = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_if0' (string)

> storage.partitioning_scheme = 'mbr' (string)

> storage.physical_device = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_if0' (string)

> storage.removable = true (bool)

> storage.removable.media_available = true (bool)

> storage.removable.media_size = 515899392 (0x1ec00000) (uint64)

> storage.removable.support_async_notification = false (bool)

> storage.requires_eject = false (bool)

> storage.serial = 'Memorex_TD_Classic_003C_0C90D850A280DA15-0:0' (string)

> storage.size = 0 (0x0) (uint64)

> storage.vendor = 'Memorex' (string)

>

> udi = '/org/freedesktop/Hal/devices/volume_uuid_98F2_33C2'

> block.device = '/dev/sdb1' (string)

> block.is_volume = true (bool)

> block.major = 8 (0x8) (int)

> block.minor = 17 (0x11) (int)

> block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_Memorex_TD_Classic_003C_0C90D850A280DA15_0_0' (string)

> info.capabilities = {'volume', 'block'} (string list)

> info.category = 'volume' (string)

> info.interfaces = {'org.freedesktop.Hal.Device.Volume'} (string list)

> info.parent = '/org/freedesktop/Hal/devices/storage_serial_Memorex_TD_Classic_003C_0C90D850A280DA15_0_0' (string)

> info.product = 'TRAVELDRIVE' (string)

> info.udi = '/org/freedesktop/Hal/devices/volume_uuid_98F2_33C2' (string)

> linux.hotplug_type = 3 (0x3) (int)

> linux.sysfs_path = '/sys/block/sdb/sdb1' (string)

> org.freedesktop.Hal.Device.Volume.method_argnames = {'mount_point fstype extra_options', 'extra_options', 'extra_options'} (string list)

> org.freedesktop.Hal.Device.Volume.method_execpaths = {'hal-storage-mount', 'hal-storage-unmount', 'hal-storage-eject'} (string list)

> org.freedesktop.Hal.Device.Volume.method_names = {'Mount', 'Unmount', 'Eject'} (string list)

> org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'} (string list)

> storage.model = '' (string)

> volume.block_size = 512 (0x200) (int)

> volume.fstype = 'vfat' (string)

> volume.fsusage = 'filesystem' (string)

> volume.fsversion = 'FAT16' (string)

> volume.ignore = false (bool)

> volume.is_disc = false (bool)

> volume.is_mounted = false (bool)

> volume.is_mounted_read_only = false (bool)

> volume.is_partition = true (bool)

> volume.label = 'TRAVELDRIVE' (string)

> volume.linux.is_device_mapper = false (bool)

> volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'remount', 'exec', 'utf8', 'shortname=', 'codepage=', 'iocharset=', 'umask=', 'dmask=', 'fmask=', 'uid=', 'flush'} (string list)

> volume.mount_point = '' (string)

> volume.num_blocks = 1007584 (0xf5fe0) (int)

> volume.partition.flags = {'boot'} (string list)

> volume.partition.label = '' (string)

> volume.partition.media_size = 515899392 (0x1ec00000) (uint64)

> volume.partition.number = 1 (0x1) (int)

> volume.partition.scheme = 'mbr' (string)

> volume.partition.start = 16384 (0x4000) (uint64)

> volume.partition.type = '0x0e' (string)

> volume.partition.uuid = '' (string)

> volume.size = 515883008 (0x1ebfc000) (uint64)

> volume.unmount.valid_options = {'lazy'} (string list)

> volume.uuid = '98F2-33C2' (string)

>

> udi = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_if0_scsi_host_scsi_device_lun0_scsi_generic'

> info.capabilities = {'scsi_generic'} (string list)

> info.category = 'scsi_generic' (string)

> info.parent = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_if0_scsi_host_scsi_device_lun0' (string)

> info.product = 'SCSI Generic Interface' (string)

> info.udi = '/org/freedesktop/Hal/devices/usb_device_8ec_8_0C90D850A280DA15_if0_scsi_host_scsi_device_lun0_scsi_generic' (string)

> linux.device_file = '/dev/sg2' (string)

> linux.hotplug_type = 2 (0x2) (int)

> linux.subsystem = 'scsi_generic' (string)

> linux.sysfs_path = '/sys/class/scsi_generic/sg2' (string)

> scsi_generic.device = '/dev/sg2' (string)

>

1864c2072

< Dumped 88 device(s) from the Global Device List.

---

> Dumped 96 device(s) from the Global Device List.

 

 

The three other commands gave the following output:

[root@localhost george]# id

uid=0(root) gid=0(root) groups=0(root)

[root@localhost george]# mount

/dev/sda5 on / type ext3 (rw,relatime)

none on /proc type proc (rw)

/dev/sda1 on /media/hd type ntfs (ro,sync,umask=0022,nls=utf8)

none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

[root@localhost george]# ls -l /media

total 28

drwxr-xr-x 2 root root 4096 2007-10-09 06:31 cdrom/

drwxr-xr-x 2 root root 4096 2007-10-09 06:31 floppy/

dr-xr-xr-x 1 root root 12288 2008-02-06 08:44 hd/

drwxr-xr-x 2 root root 4096 2008-01-23 17:16 hd2/

drwxr-xr-x 2 root root 4096 2008-02-05 09:36 hd3/

Link to comment
Share on other sites

First, I want to warn you. It seems you are logged in as root. This is very dangerous, and strongly advised against: beginners should especially not login as root because of the security risk that is, and experienced users don't do that because they know it is not needed :)

 

Next, let's introduce some basic concepts.

 

In Linux, as in any Unix system, most peripherals are shown under /dev as if they were files. There you can locate scanners, printers, modems, disks, sound cards, mice, keyboards, and so on...

The disks (hard drives, CD/DVD drives, USB keys...) are named /dev/hdX for IDE disks, and /dev/sdX for other drives, where X is a sequencial letter (a, b, c, d...); in your case, your USB drive is /dev/sdb.

On a /dev/sdX drive, partitions are then numbered, with 1 to 4 being the "primary" partitions, one of which can be "extended", thus containing "logical" sub-partitions, numbered beginning with 5; in your case, your only partition on your USB drive is /dev/sdb1.

 

Whereas in Windows partitions are mapped to drive letters, in Unix a partition is "mounted" to the filesystem to a fixed location. Thus if you add a new device in Windows, this leads to a shift in letters, whereas in Unix hence in Linux, most of the times the existing devices stay at the same place somewhere under /media.

 

Mounting is often done automatically for removable media (like in Windows) but it is not mandatory. From your previous post, it seems it is not done in your case. It seems to be a problem similar to that of kilimanjaro. By the way, "unmounting" or "umount" is the equivalent of Windows' "Safely remove the device" action.

 

Now let's try the easiest things first. Are you using Gnome or KDE?

If you're using Gnome, open the "System" menu, the "Preferences" submenu, and choose the "Peripherals and removable media" item. On the first tab, make sure the 3 first checkboxes ("mount...", "mount...", and "browse...") are checked. (Note that I'm translating from French, so labels may differ).

 

Yves.

Link to comment
Share on other sites

Could you plug your USB drive in, and in a terminal window, type:

mount

If you don't see any line starting with /dev/sdb1, then please give the error message (if any) of this command:

gnome-mount -d /dev/sdb1

 

Yves.

Link to comment
Share on other sites

In a terminal as user, typing "mount" gave:

/dev/sda5 on / type ext3 (rw,relatime)

none on /proc type proc (rw)

/dev/sda1 on /media/hd type ntfs (ro,sync,umask=0022,nls=utf8)

none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

none on /sys/fs/fuse/connections type fusectl (rw)

 

So, when I typed "gnome-mount -d /dev/sdb1", terminal showed this:

gnome-mount 0.6

. . . and a window popped up saying, "Cannot mount volume. You are not privileged to mount the volume 'TRAVELDRIVE'."

 

I then went to su, and I got a slightly different message in a pop up window: "Cannot mount volume. Invalid mount option when attempting to mount the volume 'TRAVELDRIVE'."

Link to comment
Share on other sites

That's interesting. I think we should ensure the drive can be mounted by root first, and then take care of normal users.

 

A previous post from you indicates that those are the allowed options: 'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'remount', 'exec', 'utf8', 'shortname=', 'codepage=', 'iocharset=', 'umask=', 'dmask=', 'fmask=', 'uid=', 'flush'. This all seems quite complete to me. I wonder what this "Invalid mount option" is...

 

Process accounting doesn't seem to show parameters. Does anyone know how to debug this situation?

 

Yves.

Link to comment
Share on other sites

Well, there's always the solution I pointed kilimanjaro at, that is creating a line in the /etc/fstab file. That's because HAL settings are ignored when there's such a line, hence you have total control on the mount point (which must then exist permanently) and on the options used.

 

So find your UUID (let's say it is "ABCD-EFGH") with this command:

find /dev/disk/by-uuid/ -lname "*sdb1" -printf "%P\n"

and put this line in /etc/fstab:

UUID=ABCD-EFGH /media/TRAVELDRIVE vfat,auto umask=0,users,noatime,noauto 0 0

 

Hopefully, you should be able to mount and umount at least this one particular device...

 

Yves.

Edited by theYinYeti
Link to comment
Share on other sites

Well, I have had success. Not being able to use usb drives was going to be a distro-killer for me, and I was about install Ubuntu. I decided to give Mandriva one more shot, so I re-installed with the usb drive plugged in. Again, I just accepted all the default installation values, and this time everything just worked. I guess there was something strange with the original installation. All is well now, and I have my favorite Linux distro!

 

Again, thank you very much Yves.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...