takeover.sh
takeover.sh copied to clipboard
Tried this on debian 10
rm -rf takeover
rm systemrescue.iso
wget https://downloads.sourceforge.net/project/systemrescuecd/sysresccd-x86/11.01/systemrescue-11.01-amd64.iso -O systemrescue.iso
mount systemrescue.iso /mnt/
unsquashfs -f -d takeover/ /mnt/sysresccd/x86_64/airootfs.sfs
umount /mnt
rm systemrescue.iso
wget https://raw.githubusercontent.com/fivethreeo/takeover.sh/master/fakeinit.c -O takeover/fakeinit.c
wget https://raw.githubusercontent.com/fivethreeo/takeover.sh/master/takeover.sh -O takeover/takeover.sh
wget https://www.busybox.net/downloads/binaries/1.35.0-x86_64-linux-musl/busybox -O takeover/busybox
chmod u+x takeover/busybox
cp /etc/resolv.conf takeover/etc/
gcc takeover/fakeinit.c -o takeover/fakeinit
systemctl isolate rescue-ssh.target
sh takeover/takeover.sh
But I get
Init takeover successful
Pivoting root...
pivot_root: (null): Resource busy
Chrooting and running init...