All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gary Thomas <gary@mlbassoc.com>
To: Poky Project <poky@yoctoproject.org>
Subject: Re: Prevent auto-mounting?
Date: Mon, 31 Oct 2011 08:17:49 -0600	[thread overview]
Message-ID: <4EAEAE0D.30306@mlbassoc.com> (raw)
In-Reply-To: <4EAA84DC.8010300@mlbassoc.com>

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


      reply	other threads:[~2011-10-31 14:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28 10:33 Prevent auto-mounting? Gary Thomas
2011-10-31 14:17 ` Gary Thomas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EAEAE0D.30306@mlbassoc.com \
    --to=gary@mlbassoc.com \
    --cc=poky@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.