Jump to content

Cannot mount USB memory-stick [solved]


satelliteuser083
 Share

Recommended Posts

I was browsing through the topics and came across the one by 'crazyspongebob' on Dec 14 2004, concerning the problem of 10.1 Official in mounting a memory drive. I have a similar problem, I also tried to use harddrake to mount it, but was unable to achieve anything (at least, harddrake tells me that it knows the drive is there but I have no way of addressing it, i.e. no icon, etc). 'hotplug' has been activated.

I followed the instructions contained in the reply from 'aRTee' and the results follow below . If anyone can interpret them and give me a hint on what I have to do to be able to use the memory-stick, I'll be extremely grateful. The stick IS formatted, in FAT32, and Windows can read it OK.

 

Cheers

 

Lawrence [LP]

:joker:

******************************

 

aRTee wrote:

 

open a konsole before connecting the drive, then login as root

su

[ + root password ]

then monitor the system logs with:

tail -f /var/log/messages

(you can stop the monitoring by hitting ctrl-c)

then connect the device. Post any output here, if necessary including /etc/fstab

 

 

[LP] -> here I did as instructed by aRTee, which resulted in:

 

[lawrence@localhost lawrence]$ su -

Password:

[root@localhost root]# tail -f /var/log/messages

Mar 1 17:44:56 localhost kernel: Shorewall:net2all:DROP:IN=ppp0 OUT= MAC= SRC=62.194.197.98 DST=80.4.132.65 LEN=48 TOS=0x00 PREC=0x00 TTL=112 ID=6077 DF PROTO=TCP SPT=2032 DPT=7358 WINDOW=65535 RES=0x00 SYN URGP=0

Mar 1 17:44:56 localhost kernel: Shorewall:net2all:DROP:IN=ppp0 OUT= MAC= SRC=194.249.24.221 DST=80.4.132.65 LEN=48 TOS=0x00 PREC=0x00 TTL=108 ID=63724 DF PROTO=TCP SPT=3086 DPT=7358 WINDOW=64240 RES=0x00 SYN URGP=0

Mar 1 17:44:59 localhost kernel: Shorewall:net2all:DROP:IN=ppp0 OUT= MAC= SRC=62.194.197.98 DST=80.4.132.65 LEN=48 TOS=0x00 PREC=0x00 TTL=112 ID=6082 DF PROTO=TCP SPT=2032 DPT=7358 WINDOW=65535 RES=0x00 SYN URGP=0

Mar 1 17:45:03 localhost kernel: Shorewall:net2all:DROP:IN=ppp0 OUT= MAC= SRC=194.249.24.221 DST=80.4.132.65 LEN=48 TOS=0x00 PREC=0x00 TTL=108 ID=64375 DF PROTO=TCP SPT=3086 DPT=7358 WINDOW=64240 RES=0x00 SYN URGP=0

Mar 1 17:45:05 localhost kernel: Shorewall:net2all:DROP:IN=ppp0 OUT= MAC= SRC=62.194.197.98 DST=80.4.132.65 LEN=48 TOS=0x00 PREC=0x00 TTL=112 ID=6089 DF PROTO=TCP SPT=2032 DPT=7358 WINDOW=65535 RES=0x00 SYN URGP=0

Mar 1 17:45:36 localhost kernel: Shorewall:net2all:DROP:IN=ppp0 OUT= MAC= SRC=222.233.52.32 DST=80.4.132.65 LEN=451 TOS=0x00 PREC=0x00 TTL=50 ID=0 DF PROTO=UDP SPT=51072 DPT=1026 LEN=431

Mar 1 17:45:52 localhost kernel: Shorewall:net2all:DROP:IN=ppp0 OUT= MAC= SRC=210.91.120.51 DST=80.4.132.65 LEN=48 TOS=0x00 PREC=0x00 TTL=112 ID=28575 DF PROTO=TCP SPT=3951 DPT=4899 WINDOW=64240 RES=0x00 SYN URGP=0

Mar 1 17:45:54 localhost kernel: Shorewall:net2all:DROP:IN=ppp0 OUT= MAC= SRC=210.91.120.51 DST=80.4.132.65 LEN=48 TOS=0x00 PREC=0x00 TTL=112 ID=28710 DF PROTO=TCP SPT=3951 DPT=4899 WINDOW=64240 RES=0x00 SYN URGP=0

Mar 1 17:46:00 localhost kernel: Shorewall:net2all:DROP:IN=ppp0 OUT= MAC= SRC=210.91.120.51 DST=80.4.132.65 LEN=48 TOS=0x00 PREC=0x00 TTL=112 ID=28961 DF PROTO=TCP SPT=3951 DPT=4899 WINDOW=64240 RES=0x00 SYN URGP=0

Mar 1 17:47:10 localhost su(pam_unix)[6558]: session opened for user root by lawrence(uid=501)

Mar 1 17:47:39 localhost kernel: Shorewall:net2all:DROP:IN=ppp0 OUT= MAC= SRC=85.72.22.171 DST=80.4.132.65 LEN=48 TOS=0x00 PREC=0x00 TTL=49 ID=59845 DF PROTO=TCP SPT=2460 DPT=7358 WINDOW=32768 RES=0x00 SYN URGP=0

Mar 1 17:47:41 localhost kernel: Shorewall:net2all:DROP:IN=ppp0 OUT= MAC= SRC=85.72.22.171 DST=80.4.132.65 LEN=48 TOS=0x00 PREC=0x00 TTL=49 ID=59914 DF PROTO=TCP SPT=2460 DPT=7358 WINDOW=32768 RES=0x00 SYN URGP=0

Mar 1 17:47:47 localhost kernel: Shorewall:net2all:DROP:IN=ppp0 OUT= MAC= SRC=85.72.22.171 DST=80.4.132.65 LEN=48 TOS=0x00 PREC=0x00 TTL=49 ID=60021 DF PROTO=TCP SPT=2460 DPT=7358 WINDOW=32768 RES=0x00 SYN URGP=0

 

[root@localhost root]#

[root@localhost root]#

[root@localhost root]#

[root@localhost root]#

[root@localhost root]#

 

 

[LP] -> here I plugged in the Sony USB memory-stick, then repeated 'tail' (as below):

 

[root@localhost root]# tail -f /var/log/messages

Mar 1 17:48:28 localhost kernel: Vendor: Sony Model: Storage Media Rev: 1.00

Mar 1 17:48:28 localhost kernel: Type: Direct-Access ANSI SCSI revision: 02

Mar 1 17:48:28 localhost kernel: usbcore: registered new driver usb-storage

Mar 1 17:48:28 localhost kernel: USB Mass Storage support registered.

Mar 1 17:48:28 localhost scsi.agent[6729]: disk at /devices/pci0000:00/0000:00:1f.2/usb1/1-2/1-2.1/1-2.1:1.0/host0/0:0:0:0

Mar 1 17:48:28 localhost kernel: SCSI device sda: 64000 512-byte hdwr sectors (33 MB)

Mar 1 17:48:28 localhost kernel: sda: Write Protect is off

Mar 1 17:48:28 localhost kernel: sda: assuming drive cache: write through

Mar 1 17:48:28 localhost kernel: /dev/scsi/host0/bus0/target0/lun0: unknown partition table

Mar 1 17:48:28 localhost kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

 

[root@localhost root]#

 

[LP] -> /etc/fstab (after plugging in memory-stick) contains:

 

/dev/hda12 / ext3 noatime 1 1

/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-15,codepage=850,noauto,ro,exec,users 0 0

none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-15,sync,codepage=850 0 0

/dev/hda1 /mnt/win_c vfat umask=0,iocharset=iso8859-15,codepage=850 0 0

/dev/hda5 /mnt/win_d vfat umask=0,iocharset=iso8859-15,codepage=850 0 0

/dev/hda6 /mnt/win_e vfat umask=0,iocharset=iso8859-15,codepage=850 0 0

/dev/hda7 /mnt/win_f vfat umask=0,iocharset=iso8859-15,codepage=850 0 0

/dev/hda10 /mnt/win_g ntfs umask=0,nls=iso8859-15,ro 0 0

/dev/hda11 /mnt/win_h ntfs umask=0,nls=iso8859-15,ro 0 0

none /proc proc defaults 0 0

/dev/hda9 swap swap defaults 0 0

/dev/hda13 swap swap defaults 0 0

Link to comment
Share on other sites

You have a weirdly partitioned key which MDK 10.1 can't automount; it's a known problem. You can use it quite easily, though...for a quick fix, after you plug it in, just do this as root:

 

md /mnt/removable

 

you only need to do that step once. Next, do this:

 

mount /dev/sda /mnt/removable

 

That will make the contents of the key accessible in the /mnt/removable directory. Do that step each time you plug the key in.

 

Someone will probably be able to provide you with a nicely formatted line to add to /etc/fstab which will let you mount it simply by typing 'mount /dev/sda', too. I can't write fstab lines off the top of my head, though, sorry. Anyone care to chip in?

 

This *ought* to work in 10.2, though I don't know if anyone's actually tested it yet. If someone with one of these types of key could test it on 10.2b3 or Cooker - preferably a clean install, or if an upgrade make sure gnome-volume-manager is installed and running (yes, even on KDE) - that'd be great. Report to Bugzilla whether it's automounted.

Link to comment
Share on other sites

I had such a weirdly partitioned key once... I reformatted it myself as Fat (or Fat32?) in Windoze... and after that it worked in Linux too! Maybe my Windoze did a better job at formatting it than it was formatted by default??

 

Maybe the Mandrake tool (dunno which one this would be though) would work too.

 

It know it sounds strange but it might be worth a try. Worked for me.

 

But first try adamw's suggestion.

Link to comment
Share on other sites

You have a weirdly partitioned key which MDK 10.1 can't automount; it's a known problem. You can use it quite easily, though...for a quick fix, after you plug it in, just do this as root:

 

md /mnt/removable

 

you only need to do that step once. Next, do this:

 

mount /dev/sda /mnt/removable

 

That will make the contents of the key accessible in the /mnt/removable directory. Do that step each time you plug the key in.

 

Someone will probably be able to provide you with a nicely formatted line to add to /etc/fstab which will let you mount it simply by typing 'mount /dev/sda', too. I can't write fstab lines off the top of my head, though, sorry. Anyone care to chip in?

 

This *ought* to work in 10.2, though I don't know if anyone's actually tested it yet. If someone with one of these types of key could test it on 10.2b3 or Cooker - preferably a clean install, or if an upgrade make sure gnome-volume-manager is installed and running (yes, even on KDE) - that'd be great. Report to Bugzilla whether it's automounted.

 

 

I did as you suggested and, lo and behold, I found the stick listed in KDiskFree. Wasn't able access it though, because was not 'root' . This has happened before, don't know how to solve that one. Thanks anyway

Link to comment
Share on other sites

yeah, as I mentioned it's a quick fix, you'll have to be root to do anything much with the disk after you mount it that way. Just stay as root in the console and use console commands - ls /mnt/removable for a list, cp blah /mnt/removable to copy, etc. That's why I was hoping someone would chip in with a /etc/fstab line that will let you use the drive as a normal user - HINT, HINT. As I said I suck at coming up with fstab lines, so I'm not going to try.

Link to comment
Share on other sites

Adamw

I did as you suggested and, lo and behold, I found the stick listed in KDiskFree. Wasn't able access it though, because outside of the terminal-shell I was not 'root' . This (general lack of access) has happened before, don't know how to solve that one.

 

Darkelve

I also did as you suggested, but it had no effect.

 

Thanks anyway to you both.

:thanks:

Link to comment
Share on other sites

I have a problem where the usb drive shows up as /dev/sda1 after formatting but after removing the drive it loses the format and has to be re-formatted. Any way to make the format stick?

Link to comment
Share on other sites

To mount with giving your user access, use the following option:

mount /dev/sda /mnt/removable -o uid=501

 

This is assuming your used id (uid) is 501, which is the common situation on Mandrakelinux. I have come across a lot of variations.

Check in the file /etc/passwd, you will find your username toward the end, then an x, then a number, and possibly the same number again, all separated with colon symbols. That first real number (like I said, usually 501 or 500..) is the uid for that user.

You can also find the uid if you start userdrake, it is shown there too.

 

Lastly, you can use diskdrake to mount the drive/partition, and you should even be able to add the uid option.

If not, just have the drive mounted with diskdrake, then close diskdrake and check the fstab line, add uid=501 in the latter part - ask here if you don't know how, just post your fstab.

Link to comment
Share on other sites

Just to add...

 

I have a USB drive also, which didn't mount automatically, so I did the following (note: this will result in a loss of data)

 

run fdisk /dev/sda

delete all partitions on device

create a new W95 FAT32 partition, write to disk

run the command "dd if=/dev/zero of=/dev/sda1 count=512" to clean out the first sector of the fat (make sure sda1 is the actual device...don't dd your hardrive by mistake!!!!!!!)

run mkfs.vfat /dev/sda1 to format the device

 

This worked for me. My crappy USB drive automatically mounts whenever I plug it in now. I've also done this for a couple of co-workers and it works on theirs too.

 

If you don't want FAT32, use FAT16 instead. Actually, FAT16 would probably be better unless you have a 4GB USB drive.

Link to comment
Share on other sites

"run the command "dd if=/dev/zero of=/dev/sda1 count=512" to clean out the first sector of the fat (make sure sda1 is the actual device...don't dd your hardrive by mistake!!!!!!!)"

 

listen to the man. last weekend I did this:

 

dd if=pcmcia.img of=/dev/sda

 

when I meant to do this:

 

dd if=pcmcia.img of=/dev/sdb

 

result: half an hour of careful manual partition table reconstruction, two hours of MDK reinstall. Bit of an annoying side effect of SATA hard disks, USB memory sticks and USB floppy drives all being /dev/sdSOMETHING these days...you never coulda made that mistake when it was /dev/hda and /dev/fd0, sigh. :)

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...