你说的“debian context”可能指以下几种情况之一,我分别说明,你可以对照看看是哪一种:
Debian 默认不启用 SELinux,如果你是自己启用的:
sestatus
sudo apt purge selinux-basics selinux-policy-default
sudo apt autoremove
然后编辑:
sudo nano /etc/default/grub
确认没有:
security=selinux
更新 grub:
sudo update-grub
重启即可。
Debian 默认使用 AppArmor。
sudo systemctl stop apparmor
sudo systemctl disable apparmor
sudo apt purge apparmor
sudo apt autoremove
重启后生效。
sudo machinectl list
sudo machinectl terminate 容器名
直接退出 chroot 后删除目录即可:
exit
sudo rm -rf /path/to/debian-root
sudo apt purge debootstrap
sudo apt autoremove
请补充以下信息之一:
| 含义 | 卸载方式 |
|---|---|
| SELinux context | apt purge selinux-* |
| AppArmor context | apt purge apparmor |
| systemd 容器 | machinectl terminate |
| chroot/debootstrap | 删除目录 |
如果你愿意,可以把 具体报错或命令输出贴出来,我可以精确告诉你该怎么做。