Bug 115552

Summary: usb-stick does not mount correctly
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Uwe Girlich <Uwe.Girlich>
Component: HotplugAssignee: Danny Kukawka <dkukawka>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None    
Version: Beta 4   
Target Milestone: ---   
Hardware: i686   
OS: SUSE Other   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: /var/log/messages during USB stick plug-in
/proc/partitions
lshal output after inserting the usb stick
debug output of the hal daemon

Description Uwe Girlich 2005-09-07 05:44:09 UTC
I plug in a single 256 MB USB stick with a partition table, which results in:

/dev/sda mounted to /media/usbdisk -> empty directory.
/dev/sda1 mounted to /media/usbdisk_1 -> error message "no medium found".

I unmounted as root both subfs mounts and mounted manually:

mount /dev/sda1 /media/usbdisk_1

This works perfect and only seconds later even a konqueror window pops up
automatically with the content. The file system is vfat.
Comment 1 Uwe Girlich 2005-09-07 05:45:32 UTC
Created attachment 49011 [details]
/var/log/messages during USB stick plug-in
Comment 2 Uwe Girlich 2005-09-07 05:49:33 UTC
Created attachment 49012 [details]
/proc/partitions

/proc/partitions after the hotplug mount and after my
manual mount look equal.
In both cases there is sda and sda1.
Comment 3 Danny Al-Gaaf 2005-09-07 10:13:43 UTC
please attach output of lshal if the device is plugged in and automatical 
mounted.
Comment 4 Uwe Girlich 2005-09-07 11:20:57 UTC
Created attachment 49035 [details]
lshal output after inserting the usb stick
Comment 5 Uwe Girlich 2005-09-07 11:24:00 UTC
I did not cut out the 3 interesting sections but attached the full output.
Comment 6 Danny Al-Gaaf 2005-09-07 12:29:29 UTC
How did you formated/partitioned the stick? I never saw this problem befor. 
Tested this also with a new with YaST formated stick with one and two partitions 
and this is no problem 
Comment 7 Uwe Girlich 2005-09-07 12:39:27 UTC
I did not create the partition table entries. It had 1 vfat partition as I bought
it. I changed it later (with yast) to reiser to keep user/attributes. As subfs was
introduced in SL, I had to change it back to vfat, because subfs has no reiser in
its "floppyfs" list.

I can remove the partition and create it anew if you think this will help.
Comment 8 Danny Al-Gaaf 2005-09-07 12:58:37 UTC
Would be nice If you could do this. Please delete all partitions with yast and 
create a new partition. Please backup the stick before with:

 dd if=/dev/sda of=/tmp/backup_usb_stick & pid=$!
Comment 9 Uwe Girlich 2005-09-08 11:44:54 UTC
I removed the partition and created one primary partition of type "c" (32 bit fat,
maximum size) with fdisk, I created a new file system with mkfs.msdos /dev/sda1,
removed the device, plugged it in again and got the same behaviour as I got
at the beginning: the whole device at /media/usdisk and the partition at
/media/usbdisk_1.
I got lots of errors creating the partition with yast2. I'll try it again.
Comment 10 Uwe Girlich 2005-09-08 12:24:56 UTC
The number of cylinders seems to be different sometimes. YaST2 tried to create
the partition with
/usr/sbin/parted -s /dev/sda unit cyl mkpart primary fat32 1 1015
which resulted in 
Error: The location 1015 is outside the device /dev/sda.
I tried it manually and had to go down to
/usr/sbin/parted -s /dev/sda unit cyl mkpart primary fat32 1 32
to create the (maximum) partition. I created the file system likewise with
/usr/sbin/parted -s /dev/sda mkfs 1 FAT
which I could mount manually but the hotplug mount effect remains the same.
A side-note: regardless of the mkfs 1 FAT I got a ext2 partition but even this
cannot be mounted automatically on plug-in. Directly after the partition/file
system is ready the partition will be mounted correctly (and even a konqueror
window pops up). The problem is only later, if I remove/add the stick
physically.
Comment 11 Danny Al-Gaaf 2005-09-08 12:37:56 UTC
There is already a bug for yast #115578.

Please do this:

- stop hal (with 'rchal stop')
- hald --verbose=yes --daemon=no --retain-privileges > /tmp/hal_log 2>&1
- wait 10 seconds
- plugin the usb-stick
- wait 10 seconds
- stop hal with "Ctrl + C"

attach the file /tmp/hal_log to the bug
Comment 12 Uwe Girlich 2005-09-08 13:02:53 UTC
Created attachment 49205 [details]
debug output of the hal daemon
Comment 13 Uwe Girlich 2005-09-08 13:07:00 UTC
I found it strange, that the debugging hald wrote its trace file but did not
mount anything!
Comment 14 Danny Al-Gaaf 2005-10-11 08:58:38 UTC
I think this is the same problem like in #115137. /dev/sda is detected as a 
mountable partition. I mark this bug as a duplicate.

*** This bug has been marked as a duplicate of 115137 ***