Bug 6492 - [Generic x86_64] USB not mounted
Summary: [Generic x86_64] USB not mounted
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.7
Hardware: All Multiple
: Medium normal
Target Milestone: 1.7
Assignee: Marius Avram
QA Contact: Lucian Musat
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-06-30 14:48 UTC by Lucian Musat
Modified: 2015-08-07 12:50 UTC (History)
10 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lucian Musat 2014-06-30 14:48:37 UTC
STATUS: FAILED
BUILD: 1.7.M1.rc1:68824d9b8f6e290da078383316b3f4b732585f2b
ENVIRONMENT: genericx86-64 on Sugarbay
STEPS TO REPRODUCE: 1. boot system
2. plug usb stick
3. create files in usb
4.copy some files from local hardware to usb

EXPECTED OUTCOME: 1. create/copy successfully

Actual Outcome: Plugging the USB drive does nothing. It fails to mount it in /media and sometimes this message is outputed in the terminal:

sd 24:0:0:0: [sdb] No chaching mode page found
sd 24:0:0:0: [sdb] Assuming drive cache: write through
sd 24:0:0:0: [sdb] No chaching mode page found
sd 24:0:0:0: [sdb] Assuming drive cache: write through
sd 24:0:0:0: [sdb] No chaching mode page found
sd 24:0:0:0: [sdb] Assuming drive cache: write through

Mounting manually "mount /dev/sdb /home/root/usb" works and shows the content of the drive.
Comment 1 Darren Hart 2014-07-01 16:02:08 UTC
The dmesg output is normal. mount works, so not a driver issue. Sounds like a udev issue. I'll see if I can reproduce.
Comment 2 Blloyd 2014-07-02 19:23:51 UTC
genericx86 also appears to be impacted.  live boot drops to shell and shows no devices mounted when debugshell is enabled even though udev does create the /dev/sda device when it is plugged in.
For x86 case, this means it isnt even mounting the base image, keeping from making it to the running system.

running udevadm monitor (which could not be exited without reboot from the basic console), showed proper connect and disconnect messages.  It just isn't mounting the drive afterwards.
Comment 3 Costin 2014-07-18 11:35:49 UTC
Hello,

Just did my 1.7_M1 meta-intel BSP related (for core2_32) tests and I have the same issue with mounting the USB. I also get the same messages as on first commnet.

poky_commit: a5531a2b8983318b99c119a87b78a9

Regards,

Costin
Comment 4 Marius Avram 2014-08-25 15:15:26 UTC
I've took a look into because its related somehow to my bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=5332

And i think I discovered the cause.
The reason is the stick is mounted on /run/media/sdc. 

In glib-2.0 there is a function in file gio/gunixmounts.c called g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry).

When this worked with previous builds it was because /media/sdc was used. 
Another valid alternative for glib would be if the drive would be mounted in
/run/media/<username>/sdc.

I would want to fix this (because I spent some time on it), but I'm not sure which is the right way. A way would be to create a patch for this function. Another would be to modify the mounting directory back to /run/media/ but I'm not sure how.

Can anyone give me any advice ? If yes please send me an email or leave a comment here.
Comment 5 Ross Burton 2014-08-26 12:24:54 UTC
Patching glib to also allow /run/media/[mountpoint] seems like a reasonable thing to do.
Comment 6 Marius Avram 2014-08-26 14:27:53 UTC
I've sent a solution to the mailing list. 

A branch with it can also be found here:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=mavram/YB6492

I also created a bug on the gnome bug tracker:
https://bugzilla.gnome.org/show_bug.cgi?id=735447
Comment 7 Marius Avram 2014-09-12 12:49:59 UTC
Solution merged with master beginning with c46a54853a47b6373e71a9f25b537b6ab907db3e
Comment 8 Lucian Musat 2014-09-17 10:56:55 UTC
Verified this on 429802fe6691c8a70ec9735c0db4c6a4e1e1b038