Re: [yocto] Mounting USB drives on a "read-only-rootfs" based system

2016-06-15 Thread Jeffrey D Boyer
My distro is running udev.  I discovered the automounter script in 
/etc/udev/rules.d was causing the mount point to be /media.  For all I know, 
this is default behavior for udev.

Anyway, I think I found a solution.  As suggested by another person on the 
thread, I went ahead and mounted a tmpfs on the /media directory.  This allowed 
the udev automount script to function as it did when the squashfs option was 
disabled.  

Thanks to everyone for all the help.

-Original Message-
From: Mike Looijmans [mailto:mike.looijm...@topic.nl] 
Sent: Wednesday, June 15, 2016 4:07 AM
To: Jeffrey D Boyer ; Christopher Larson 

Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Mounting USB drives on a "read-only-rootfs" based system

On 14-06-16 15:48, Jeffrey D Boyer wrote:
> Sorry, /media is not a symlink and there is no /run/media link or directory 
> present on my running system.  When I insert an SD card, for example, I get a 
> bit of text on the debug serial port that a card has been detected, but I 
> don't see a mount point anywhere after that.
>
>   root@mySys:/# mmc1: new high speed SDHC card at address 1234
>   mmcblk1: mmc1:1234 SA04G 3.63 GiB
>mmcblk1: p1
>
> It should be noted that if I exclude the " read-only-rootfs" option in 
> the bb script, a normal read/write kernel image is produced and the 
> action of inserting an SD card under those conditions will 
> automatically produce a mount point at /media/mmcblk1p1

Apparently your distro or image or whatever is lacking some directories. The 
/run/media should have been created automagically.

Are you using udev or mdev for hotplug?

For mdev, I implemented the automounting using /run/media and that should also 
work on read-only-rootfs systems. So I can probably figure out what's wrong 
with your config.

For udev, I don't have a clue, sorry...


> FYI, I'm running 3.14 kernel.  Is this a job for aufs?  If so, how would I go 
> about configuring it?

No, it's not related to autofs or aufs or whatever. It's plain simple udev or 
mdev.



Kind regards,

Mike Looijmans
System Expert

TOPIC Embedded Products
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijm...@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail





-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Mounting USB drives on a "read-only-rootfs" based system

2016-06-15 Thread Mike Looijmans

On 14-06-16 15:48, Jeffrey D Boyer wrote:

Sorry, /media is not a symlink and there is no /run/media link or directory 
present on my running system.  When I insert an SD card, for example, I get a 
bit of text on the debug serial port that a card has been detected, but I don't 
see a mount point anywhere after that.

root@mySys:/# mmc1: new high speed SDHC card at address 1234
mmcblk1: mmc1:1234 SA04G 3.63 GiB
 mmcblk1: p1

It should be noted that if I exclude the " read-only-rootfs" option in the bb 
script, a normal read/write kernel image is produced and the action of inserting an SD 
card under those conditions will automatically produce a mount point at /media/mmcblk1p1


Apparently your distro or image or whatever is lacking some directories. The 
/run/media should have been created automagically.


Are you using udev or mdev for hotplug?

For mdev, I implemented the automounting using /run/media and that should also 
work on read-only-rootfs systems. So I can probably figure out what's wrong 
with your config.


For udev, I don't have a clue, sorry...



FYI, I'm running 3.14 kernel.  Is this a job for aufs?  If so, how would I go 
about configuring it?


No, it's not related to autofs or aufs or whatever. It's plain simple udev or 
mdev.




Kind regards,

Mike Looijmans
System Expert

TOPIC Embedded Products
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijm...@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail





--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Mounting USB drives on a "read-only-rootfs" based system

2016-06-14 Thread Fred Ollinger
There's also bind mounts as an option.


   The bind mounts.
  Since Linux 2.4.0 it is possible to remount part of the file 
hierarchy somewhere else.  The call is:

 mount --bind olddir newdir

  or by using this fstab entry:

 /olddir /newdir none bind

  After this call the same contents are accessible in two places.  
One can also remount a single  file  (on  a
  single file).


From: yocto-boun...@yoctoproject.org  on behalf 
of Burton, Ross 
Sent: Tuesday, June 14, 2016 7:28 AM
To: Jeffrey D Boyer
Cc: yocto@yoctoproject.org; Christopher Larson
Subject: Re: [yocto] Mounting USB drives on a "read-only-rootfs" based system


On 14 June 2016 at 14:48, Jeffrey D Boyer 
mailto:jeffrey.d.bo...@jci.com>> wrote:
FYI, I'm running 3.14 kernel.  Is this a job for aufs?  If so, how would I go 
about configuring it?

If you want to support arbitrary mounts then it's probably simplest to either 
change /media to be a symlink to /run/media, or put a tmpfs on /media.

Ross
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Mounting USB drives on a "read-only-rootfs" based system

2016-06-14 Thread Burton, Ross
On 14 June 2016 at 14:48, Jeffrey D Boyer  wrote:

> FYI, I'm running 3.14 kernel.  Is this a job for aufs?  If so, how would I
> go about configuring it?
>

If you want to support arbitrary mounts then it's probably simplest to
either change /media to be a symlink to /run/media, or put a tmpfs on
/media.

Ross
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Mounting USB drives on a "read-only-rootfs" based system

2016-06-14 Thread Jeffrey D Boyer
Sorry, /media is not a symlink and there is no /run/media link or directory 
present on my running system.  When I insert an SD card, for example, I get a 
bit of text on the debug serial port that a card has been detected, but I don't 
see a mount point anywhere after that.

root@mySys:/# mmc1: new high speed SDHC card at address 1234
mmcblk1: mmc1:1234 SA04G 3.63 GiB
 mmcblk1: p1

It should be noted that if I exclude the " read-only-rootfs" option in the bb 
script, a normal read/write kernel image is produced and the action of 
inserting an SD card under those conditions will automatically produce a mount 
point at /media/mmcblk1p1

FYI, I'm running 3.14 kernel.  Is this a job for aufs?  If so, how would I go 
about configuring it?


-Original Message-
From: Mike Looijmans [mailto:mike.looijm...@topic.nl] 
Sent: Tuesday, June 14, 2016 9:18 AM
To: Christopher Larson ; Jeffrey D Boyer 

Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Mounting USB drives on a "read-only-rootfs" based system

Yup, even mdev based images do that with current OE.

I'd expect "/media" to symlink to "run/media" on most devices (regardless 
whether the rootfs is read-only or not). Check if that's the case on your 
system.

On 14-06-16 00:01, Christopher Larson wrote:
> Afaik usb storage is already automounted by udev on /run/media/, so 
> there's no need to use /media for that purpose.
>
> On Mon, Jun 13, 2016 at 2:22 PM, Jeffrey D Boyer 
> mailto:jeffrey.d.bo...@jci.com>> wrote:
>
> Hello,
>
> __ __
>
> New to the list here, so I’m sorry if this question has been asked before,
> but I couldn’t find a direct answer to it. 
>
> __ __
>
> I have a yocto image that was built using the following bb script line:
> IMAGE_FEATURES += " read-only-rootfs". 
>
> __ __
>
> As this image eventually resides on a static flash device, it must be
> read-only.  However, the system hardware supports removable media (SD card
> and USB drives), and I’d like to be able to mount and write to those
> removable drives / partitions for data logging purposes.  What needs to be
> done in order to make the /media directory auto-mountable when a
> “read-only” image is specified by the build script?
>
> __ __
>
> Thanks.
>
> __ __
>
>
> --
> 

Kind regards,

Mike Looijmans
System Expert

TOPIC Embedded Products
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijm...@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail





___
> yocto mailing list
> yocto@yoctoproject.org <mailto:yocto@yoctoproject.org>
> https://lists.yoctoproject.org/listinfo/yocto
>
>
>
>
> --
> Christopher Larson
> clarson at kergoth dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior 
> Software Engineer, Mentor Graphics
>
>

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Mounting USB drives on a "read-only-rootfs" based system

2016-06-14 Thread Mike Looijmans

Yup, even mdev based images do that with current OE.

I'd expect "/media" to symlink to "run/media" on most devices (regardless 
whether the rootfs is read-only or not). Check if that's the case on your system.


On 14-06-16 00:01, Christopher Larson wrote:

Afaik usb storage is already automounted by udev on /run/media/, so there's no
need to use /media for that purpose.

On Mon, Jun 13, 2016 at 2:22 PM, Jeffrey D Boyer mailto:jeffrey.d.bo...@jci.com>> wrote:

Hello,

__ __

New to the list here, so I’m sorry if this question has been asked before,
but I couldn’t find a direct answer to it. 

__ __

I have a yocto image that was built using the following bb script line:
IMAGE_FEATURES += " read-only-rootfs". 

__ __

As this image eventually resides on a static flash device, it must be
read-only.  However, the system hardware supports removable media (SD card
and USB drives), and I’d like to be able to mount and write to those
removable drives / partitions for data logging purposes.  What needs to be
done in order to make the /media directory auto-mountable when a
“read-only” image is specified by the build script?

__ __

Thanks.

__ __


--



Kind regards,

Mike Looijmans
System Expert

TOPIC Embedded Products
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijm...@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail





___

yocto mailing list
yocto@yoctoproject.org 
https://lists.yoctoproject.org/listinfo/yocto




--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics




--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Mounting USB drives on a "read-only-rootfs" based system

2016-06-13 Thread Richard Leitner
Hi,
you can adjust the mount behaviour for example in your udev mount script
(if you use udev).

If you have a fixed name/mountpoint for your media you can pre-create
that folder (for example /media/data-logging) and let udev's mount.sh
mount media which matches your criteria to that path.

kind regards,
richard
On 06/13/2016 11:22 PM, Jeffrey D Boyer wrote:
> Hello,
> 
>  
> 
> New to the list here, so I’m sorry if this question has been asked
> before, but I couldn’t find a direct answer to it. 
> 
>  
> 
> I have a yocto image that was built using the following bb script line:
> IMAGE_FEATURES += " read-only-rootfs". 
> 
>  
> 
> As this image eventually resides on a static flash device, it must be
> read-only.  However, the system hardware supports removable media (SD
> card and USB drives), and I’d like to be able to mount and write to
> those removable drives / partitions for data logging purposes.  What
> needs to be done in order to make the /media directory auto-mountable
> when a “read-only” image is specified by the build script?
> 
>  
> 
> Thanks.
> 
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Mounting USB drives on a "read-only-rootfs" based system

2016-06-13 Thread Christopher Larson
Afaik usb storage is already automounted by udev on /run/media/, so there's
no need to use /media for that purpose.

On Mon, Jun 13, 2016 at 2:22 PM, Jeffrey D Boyer 
wrote:

> Hello,
>
>
>
> New to the list here, so I’m sorry if this question has been asked before,
> but I couldn’t find a direct answer to it.
>
>
>
> I have a yocto image that was built using the following bb script line:
> IMAGE_FEATURES += " read-only-rootfs".
>
>
>
> As this image eventually resides on a static flash device, it must be
> read-only.  However, the system hardware supports removable media (SD card
> and USB drives), and I’d like to be able to mount and write to those
> removable drives / partitions for data logging purposes.  What needs to be
> done in order to make the /media directory auto-mountable when a
> “read-only” image is specified by the build script?
>
>
>
> Thanks.
>
>
>
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>


-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto