Commit Graph

112 Commits

Author SHA1 Message Date
Colin Walters c563d07cb6 switchroot: Suppress compiler warning for asprintf
We're not going to run OOM here, if we do, we're totally screwed
anyways.
2013-04-01 21:52:24 -04:00
Colin Walters c9f56564a3 switchroot: Use MS_MOVE to / rather than chroot
This fixes a number of bugs; the two biggest are:

1) On shutdown systemd can correctly umount /
2) We can use linux-user-chroot inside the system, as is
   necessary to do upgrades

See http://lists.freedesktop.org/archives/systemd-devel/2012-September/006703.html
2013-02-11 20:46:53 -05:00
Colin Walters 3832544ac4 admin: Rework /ostree/deploy to support multiple independent operating systems
The real vision of OSTree is to "multiple versions of multiple
operating systems".  Up until now, it's worked to install gnome-ostree
inside a host distribution, but several things don't work quite right
if you try to do completely different systems.

In the new model, there's the concept of an "osname" which encompasses
a few properties:

1) Its own /var
2) A set of trees deployed in /ostree/deploy/OSNAME/
3) Its own "current" and "previous" links.

Now it no longer really makes sense to boot with "ostree=current".
Instead, you specify e.g. "ostree=gnome/current".

This is an incompatible change to the deployment code - you will need
to run init-os gnome and redeploy.

All "ostree admin" subcommands now take an OSNAME argument.
2012-12-21 13:47:15 -05:00
Colin Walters 2ddbeb1f71 Make /etc a writable mount
First, move deployments to /ostree/deploy.  Having them in the
toplevel clutters the filesystem layout too much.

When we deploy a tree like /ostree/deploy/NAME, there is now also a
writable directory /ostree/deploy/NAME-etc.  This is mounted as
read-write inside the system.

On an initial install, that directory is copied from
/ostree/deploy/NAME/etc.  On subsequent deployments, we find any
changes made in the current deployment's /etc, and apply that set of
changes to the new deployment's /etc.

See https://live.gnome.org/OSTree/EverythingInEtcIsABug
2012-09-06 08:17:23 -04:00
Colin Walters d596615bab main: Fix a format string error 2012-06-27 22:26:16 -04:00
Adrian Perez 99142ef417 switchroot: Properly check for number of arguments
The ostree-switch-root tool expects three arguments (argc=4): new root, OS
tree target, and init(8) binary to launch inside it. Also, the error message
when not enough arguments are passed now tells about the second argument
being the target OS tree.

Reviewed-by: Colin Walters <walters@verbum.org>
2012-04-18 15:20:46 -04:00
Colin Walters 8729997eab switchroot: Bind mount /lib/modules after we mount /lib
Otherwise we don't ge the right /lib/modules.
2012-02-13 10:56:13 -05:00
Colin Walters fcd70e5891 switchroot: Bind mount /lib/modules from /ostree/modules
Since we have kernels outside of the tree, keep modules outside
too.
2012-02-10 19:17:29 -05:00
Colin Walters feca75a930 switchroot: remount rootfs read/write
See rationale in comment.
2012-02-08 22:23:25 -05:00
Colin Walters 8e944cbffd ostree-switch-root: Correctly prepend sysroot before mounts to move from dracut 2012-02-08 20:22:27 -05:00
Colin Walters 0172ab5a3a switchroot: Further work on being dracut-only 2012-02-08 17:32:34 -05:00
Colin Walters a904c9693b Add ostree-switch-root here
Merge the code from ostree-init; now that we're back to targeting an
initramfs (dracut), we don't need to statically link the binary, so
there's no strong reason to have a separate module.
2012-02-05 16:02:44 -05:00