[poky] Prevent auto-mounting?

Gary Thomas gary at mlbassoc.com
Mon Oct 31 07:17:49 PDT 2011


On 2011-10-28 04:33, Gary Thomas wrote:
> How do I keep a file system from being automatically mounted?
> In particular, I want to automate this sequence:
> * [re]partition a disk using sfdisk
> * format the partitions
> * mount & use the partitions
>
> The problem I have is that when sfdisk completes and the disk label
> is reread by the kernel, some process(?) goes off and tries to mount
> the partitions. This not only gets in the way of reformatting those
> partitions, but it may be 100% incorrect as the disk layout may have
> changed.
>
> Any ideas what process is doing this and how I stop it?
>

I found that adding the device to /etc/udev/mount.blacklist prevents
the device from being mounted just after being [re]partitioned.  In
my case, this command does the trick:
   # echo /dev/mmcblk0p1 >>/etc/udev/mount.blacklist

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------



More information about the poky mailing list