Hacker News new | ask | show | jobs
by megous 84 days ago
Instead of applying some sense to the problem, and using a solution that actually allows you to kill all running processes of the original distro at runtime, incl. getting rid of the original init process, to be able to pivot_root somewhere else amd umount the original system's filesystems and free the block device for re-installation, this ridiculous approach gets promoted to a front page, lol.
1 comments

I did learn about systemctl switch-root after finishing my kexec solution, but I think if you're at the point of reimaging a server over the network, you probably don't care enough to shut it down correctly :)
Actually you do, bacause you can't re-image safely while kernel is also writing to your target block device via fs driver. And if original server has nything more complex going on, like md/lvm you're in even more trouble.