All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fred Ollinger <Fred.Ollinger@seescan.com>
To: Martin Townsend <mtownsend1973@gmail.com>,
	"yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: mount bind /var/lib and package management
Date: Wed, 25 May 2016 15:55:21 +0000	[thread overview]
Message-ID: <1464191708134.90083@seescan.com> (raw)
In-Reply-To: <CABatt_w=BzX5MUg45tjWu+fRqZUr0r2QoduV3fiecfSsvoCw+w@mail.gmail.com>

Bind mount can allow mount to be two places:

From the mount manpage:

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

If you do this, then you have your files on tmpfs.

Frederick
________________________________________
From: yocto-bounces@yoctoproject.org <yocto-bounces@yoctoproject.org> on behalf of Martin Townsend <mtownsend1973@gmail.com>
Sent: Wednesday, May 25, 2016 8:07 AM
To: yocto@yoctoproject.org
Subject: [yocto] mount bind /var/lib and package management

Hi,

When using a read only rootfs it mount --binds /var/lib into
/var/volatile/lib which lives in tmpfs and makes sense.  The problem
is that I use dpkg but I'm assuming other package management tools use
/var/lib as their admin dir.

Wouldn't this break package updates as the dpkg database files etc
will then be updated in tmpfs so a power cycle would means the changes
are lost? Or am I missing something?

I tried to mount bind all directories except dpkg which I managed to
get working but other systemd services failed as they expected
/var/lib to be writeable (the service that creates /var/lib/machines).
I suppose I could alter this to remount / rw first but gave up at this
point.

The next thing I tried was to use a new admindir for dpkg, ie
/lib/dpkg which I have working but I had to hack a lot of files
changing /var/lib to /lib including files for apt-get native.  I'm not
confident that I've got them all.

Is there another solution I haven't thought of?

Thanks in advance,
Martin.
--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


      reply	other threads:[~2016-05-25 16:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25 15:07 mount bind /var/lib and package management Martin Townsend
2016-05-25 15:55 ` Fred Ollinger [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=1464191708134.90083@seescan.com \
    --to=fred.ollinger@seescan.com \
    --cc=mtownsend1973@gmail.com \
    --cc=yocto@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.