cannot use kargs to select bootCD default systemd target - this would
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Sat, 9 Feb 2013 07:03:35 +0000 (08:03 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Sat, 9 Feb 2013 07:03:35 +0000 (08:03 +0100)
apply to hdd boots as well; symlink default.target instead

build.sh
prep.sh

index 51ba813..b6fff0b 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -337,8 +337,9 @@ EOF
     KERNEL_ARGS="$KERNEL_ARGS biosdevname=0"
     # making sure selinux is turned off - somehow this is needed with lxc/f14
     KERNEL_ARGS="$KERNEL_ARGS selinux=0"
-    # set default target for systemd
-    KERNEL_ARGS="$KERNEL_ARGS systemd.unit=pl_boot.target"
+# cannot use this mecahnism to set systemd default target because this applies to kexec boots as well
+#    # set default target for systemd
+#    KERNEL_ARGS="$KERNEL_ARGS systemd.unit=pl_boot.target"
     # output more systemd-related messages on the console
     KERNEL_ARGS="$KERNEL_ARGS systemd.log_level=debug systemd.log_target=kmsg"
     [ -n "$KERNEL_ARGS" ] && echo "$KERNEL_ARGS" > $OVERLAY/kargs.txt
diff --git a/prep.sh b/prep.sh
index 0c6989a..59b80aa 100755 (executable)
--- a/prep.sh
+++ b/prep.sh
@@ -97,6 +97,8 @@ if [ -d $bootcd/etc/systemd/system ] ; then
     for file in pl_boot.service pl_boot.target ; do
        install -D -m 644 systemd/$file $bootcd/etc/systemd/system
     done
+    # select pl_boot target this way instead of using kargs, as kargs apply to kexec boot as well
+    ln -sf /etc/systemd/system/pl_boot.target $bootcd/etc/systemd/system/default.target
 fi
 
 # Install fallback node configuration file