From d023b1c1b448a178f674931bfafda38c818b51f0 Mon Sep 17 00:00:00 2001 From: HugoPoi Date: Sat, 20 Mar 2021 20:13:01 +0100 Subject: [PATCH] wip commit final script --- README.md | 1 - prepare_switch_root.sh => example_to_prepare_switch_root.sh | 0 switch_root.sh | 3 ++- 3 files changed, 2 insertions(+), 2 deletions(-) rename prepare_switch_root.sh => example_to_prepare_switch_root.sh (100%) diff --git a/README.md b/README.md index e931e61..efe8253 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,5 @@ systemctl switch-root /tmp/tmproot/ `mount none /sys -t sysfs` `mount none /dev/pts -t devpts` -Fuck I need sshd `wget -O - https://github.com/YunoHost/arm-images/releases/download/v2020.10/internetcube_4.0.8_v2020.10_lime2.img.gz | gzip -cd | dd iflag=fullblock bs=1M oflag=direct status=progress of=/dev/mmcblk0` diff --git a/prepare_switch_root.sh b/example_to_prepare_switch_root.sh similarity index 100% rename from prepare_switch_root.sh rename to example_to_prepare_switch_root.sh diff --git a/switch_root.sh b/switch_root.sh index 286f1cd..41d7beb 100755 --- a/switch_root.sh +++ b/switch_root.sh @@ -17,4 +17,5 @@ sudo swapoff -a sudo mkdir -p /sysroot sudo mount --rbind /tmp/sys /sysroot sudo touch /etc/initrd-release - +# it will stop all other services (isolate) and call systemctl switch-root /sysroot +sudo systemctl --no-block isolate initrd-switch-root