alpinelinux / alpine-chroot-install

Install Alpine Linux in chroot with a breeze. Build ARM on Travis CI or any other x86_64 CI.
MIT License
290 stars 59 forks source link

Warn against rm -rf'ing directory created by script #26

Open haileys opened 3 years ago

haileys commented 3 years ago

alpine-chroot-install mounts several filesystems into the created chroot directory - even before it's actually chrooted into.

It appears that the destroy script takes care to unmount these filesystems before removing the chroot, however it is not immediately clear that the destroy script is the only safe way to remove the chroot.

I have just hosed a running Linux system due to making this mistake. I believe only transient state has been affected and a reboot will fix things, but a warning about this pitfall would be very much appreciated.

intjelic commented 3 years ago

Same happened to me.