From 8faa57a8737a0e1a163fbd91d86065784ea5d44d Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 2 Dec 2013 22:28:45 +0000 Subject: 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. --- rescue/NEWS | 1 + rescue/aliases | 2 ++ rescue/list.xml | 15 ++++++++++++++- rescue/make_rescue_img | 1 + rescue/tree/etc/passwd | 1 + 5 files changed, 19 insertions(+), 1 deletion(-) (limited to 'rescue') 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 @@ 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 @@ - journalctl systemctl echo swapoff systemd-cgls systemd-tmpfiles systemd-nspawn + journalctl systemctl echo swapoff systemd-cgls systemd-tmpfiles systemd-nspawn dbus-daemon machinectl + + + + /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 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 -- cgit v1.2.1