Live data from Hacker News

Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot

github.com

1–10 of 80 posts

Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot

#3
Somebody 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.

Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot

#4
Pretty 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 /dev of the rescue image with the real ones, and BAM you're back in business.

For details see threads like: http://superuser.com/questions/111152/whats-the-proper-way-t...

I know that for many of you this isn't rocket surgery, but for those who don't know you have to google for "chroot" when you boot into a rescue image and discover you can't do anything, you might just remember this post.

Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot

#5
post #4

Pretty 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…

I like the term rocket surgery, I will steal it from you for sure.

Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot

#6

I guess this could be really useful for installing distributions that are not available at some VPS providers.

There is a similar script on github somewhere that does some more work and can install arch over debian on a DigitalOcean host. It's beautiful.

Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot

#7
post #4

Pretty 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

Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot

#8
post #5
post #4

Pretty 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…

I like the term rocket surgery, I will steal it from you for sure.

If I'm not mistaken, credit goes to Chris Rock (who is not me).

Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot

#9

Somebody 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.

I feel like this is, on one hand, an amazing thing to be able to do because it removes the necessity to have IPMI to remotely re-install a system.

On the other hand, this seems like it would be an incredibly easy thing to screw up and potentially leave yourself with a corrupted or unbootable system.

Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot

#10
post #4

Pretty 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…

I recommend to copy a rescue disk iso image or/and network installation image to boot partition and add it to GRUB menu. This way it is possible to boot into working environment without risk to damage root partition.

https://wiki.archlinux.org/index.php/Multiboot_USB_drive

Post reply on HN