I don’t like changed distributions by hosting companies, even if one motd, so the first thing I decided to install is a clean Debian distribution, downloaded via debootstrap, raised the server on another port in the chroot ssh, and then connected to ssh in chroot, completely untied from the main root, lost I started the disk with dd and started fdisk with help, but after trying to save everything I posted I received a message stating that the device is busy.
I foresaw this and tried to disconnect the disk with the echo 1 > /sys/block/vda/device/delete but then I realized that this is not suitable for virtual devices.
Tell me how to free up the disk for subsequent markup without rebooting?
|
1 answer
On an opennet, quite recently, a method of similar reinstallation was described in detail .
I think that you forgot to kill all the processes of the base system and unmount the disk. And yes, for this purpose chroot needs to be done beyond the limits of the base FS, in the above method - in tmpfs.
- 1. The script does not work well (the path to the binary facings is not correct, it did not mount the disk in old_root) 2. Corrected, it’s the same thing all the time, the disk is busy, there’s no need to mark the disk, only to replace its contents, but I need to mark it Vitaly Karpenko
|