summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-12-02 22:28:45 +0000
committerColin Guthrie <colin@mageia.org>2013-12-07 18:32:06 +0000
commit8faa57a8737a0e1a163fbd91d86065784ea5d44d (patch)
tree75320c971a1a3e393838a8db20781327073d6b48
parentc4634f60b5c6d67eedfedc02166499884e4d6625 (diff)
downloaddrakx-8faa57a8737a0e1a163fbd91d86065784ea5d44d.tar
drakx-8faa57a8737a0e1a163fbd91d86065784ea5d44d.tar.gz
drakx-8faa57a8737a0e1a163fbd91d86065784ea5d44d.tar.bz2
drakx-8faa57a8737a0e1a163fbd91d86065784ea5d44d.tar.xz
drakx-8faa57a8737a0e1a163fbd91d86065784ea5d44d.zip
rescue: add machined (and dbus as a dep) to the rescue.
This allows us to actually mount and run the system inside a container for more advanced debugging. I've successfully booted my systemd, logged in, had a fiddle and then powered it off again. There are some delays and it's requried to umount the /mnt/proc which seems to get automatically mounted before running nspawn. Also audit support has to be turned off in the kernel too to allow a full boot to work properly (otherwise the authentication in the container doesn't work. This is a known problem in the kernel and will be fixed eventually.
-rw-r--r--rescue/NEWS1
-rw-r--r--rescue/aliases2
-rw-r--r--rescue/list.xml15
-rwxr-xr-xrescue/make_rescue_img1
-rw-r--r--rescue/tree/etc/passwd1
5 files changed, 19 insertions, 1 deletions
diff --git a/rescue/NEWS b/rescue/NEWS
index 7f84b4b3e..cf8d6e3cf 100644
--- a/rescue/NEWS
+++ b/rescue/NEWS
@@ -1,4 +1,5 @@
- use systemd as init in the rescue system
+- allowing systemd-nspawn "booting" of a mounted /mnt (after umount /mnt/proc)
Version 1.46 - 20 October 2013 by Colin Guthrie
- adapt to a dracut based stage1
diff --git a/rescue/aliases b/rescue/aliases
index ebb5a462e..d92ea8ccf 100644
--- a/rescue/aliases
+++ b/rescue/aliases
@@ -2,3 +2,5 @@
/lib/modules /modules
/usr/sbin/init /usr/lib/systemd/systemd
/usr/lib/systemd/system/default.target rescue.target
+/usr/lib/systemd/system/rescue.target.wants/sockets.target ../sockets.target
+/usr/lib/systemd/system/dbus-org.freedesktop.machine1.service systemd-machined.service
diff --git a/rescue/list.xml b/rescue/list.xml
index fd5a829a2..29139f46d 100644
--- a/rescue/list.xml
+++ b/rescue/list.xml
@@ -273,6 +273,7 @@
systemd-fsck
systemd-udevd
systemd-journald
+ systemd-machined
systemd-sysctl
systemd-modules-load
systemd-vconsole-setup
@@ -281,6 +282,8 @@
<from dir="/usr/lib/systemd/system">
cryptsetup.target
+ dbus.service
+ dbus.socket
emergency.target
sysinit.target
basic.target
@@ -324,11 +327,13 @@
systemd-udev-settle.service
systemd-ask-password-plymouth.service
systemd-journald.service
+ systemd-machined.service
systemd-vconsole-setup.service
sysinit.target.wants/systemd-modules-load.service
sysinit.target.wants/systemd-ask-password-console.path
sysinit.target.wants/systemd-journald.service
+ sockets.target.wants/dbus.socket
sockets.target.wants/systemd-udevd-control.socket
sockets.target.wants/systemd-udevd-kernel.socket
sockets.target.wants/systemd-journald.socket
@@ -345,7 +350,15 @@
</from>
<from expand="binary">
- journalctl systemctl echo swapoff systemd-cgls systemd-tmpfiles systemd-nspawn
+ journalctl systemctl echo swapoff systemd-cgls systemd-tmpfiles systemd-nspawn dbus-daemon machinectl
+</from>
+
+<from>
+ /etc/dbus-1/system.conf
+ /etc/dbus-1/system.d/org.freedesktop.systemd1.conf
+ /etc/dbus-1/system.d/org.freedesktop.machine1.conf
+ /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service
+ /usr/share/dbus-1/system-services/org.freedesktop.machine1.service
</from>
<from dir="/usr/lib/udev">
diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img
index 50083d0b0..4b4301c55 100755
--- a/rescue/make_rescue_img
+++ b/rescue/make_rescue_img
@@ -34,6 +34,7 @@ _ "../tools/install-xml-file-list list.xml $tmp";
_ "sed 's/Mageia \\([0-9]*\\)/Mageia Rescue \\1/' /etc/os-release >$tmp/etc/os-release";
_ "ls -1 $tmp/etc | sed 's,\\(.*\\),/etc/\\1,' >>$tmp/usr/share/symlinks";
+_ "mkdir -p $tmp/usr/lib/systemd/system/rescue.target.wants";
my %keytable_conflicts;
my @less_important_keytables = qw(am_old am_phonetic no-dvorak de-latin1);
diff --git a/rescue/tree/etc/passwd b/rescue/tree/etc/passwd
index 06677c9bf..c0274a116 100644
--- a/rescue/tree/etc/passwd
+++ b/rescue/tree/etc/passwd
@@ -1 +1,2 @@
root::0:0::/root:/bin/bash
+messagebus:x:1:1::/:/sbin/nologin