Seeing if I understand what this is doing: this keeps running the same Linux kernel and kernel modules, but swaps out absolutely everything else up to and including the init system - is that right?
Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
21–30 of 80 posts
Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#22Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#23Somebody correct if I am wrong, but this script somehow allows the session to live in the RAM. Once the OS is running directly from the RAM, the hard drive can be wiped and a new OS can be installed. The system is then booted to run off of the hard drive.
Look up the chroot-install method for Debian/Ubuntu, as an example of this in a user-accessible manner. The process uses debootstrap, but as I understand was originally developed via a chroot shell on a running system and either partition or ramdisk-based bootstrapping of a new system.
Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#24Earlier quoted context omitted.
Pretty sure the conflation has been around ever since rocket science and brain surgery have been used as a comparison. :)
I don't tend to link youtube videos on HN, particularly of the comedic type, but I'm just going to leave this here for anyone who wants a good laugh for their morning. https://www.youtube.com/watch?v=THNPmhBl-8I
Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#25removed. No delete on HN comments? interesting
Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#26Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#27removed. No delete on HN comments? interesting
Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#28Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#29Pretty cool, although I'm pretty sure I would never use something like this. What has saved my skin on a number of occasions is the ability to boot remote servers into rescue mode and chroot into the broken system. That way you can use package managers, all your diagnostic tools, and everything else the boot image doesn't provide. Basically you just mount the different partitions and then chroot just swaps /proc /sys…
Haha yes, this is the default install procedure for Gentoo! :D
I do this because I know it works and there's no guesswork involved in what the OS installer does. They aren't really intended for installing beside another system and the default partitioning options aren't always that great (RAID, LVM, crypto, etc).
Basically you only need 3 things to run Linux: kernel, initramfs and rootfs.
Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#30Earlier quoted context omitted.
Haha yes, this is the default install procedure for Gentoo! :D
Something like this has been my default way of installing Linux for years - and I've installed Debian, Ubuntu (with debootstrap), Gentoo and Arch this way. Typically I just create another partition to my LVM volume group, chroot and install over there and then reboot without removing the old OS install and I run the install procedure from the old OS (instead of booting from a Live CD / usb stick). I do this because I…
I think it's even possible to embed the initrd in the kernel binary itself, but I've never really investigated that.