0

I am trying to set up a chroot and I ran

sudo qemu-debootstrap --arch=amd64 stretch /srv/chroot/focal-amd64

during the second stage i realized that I wanted focal, not stretch. Copy & paste error.
So I hit ctrl + c and wanted to try again.

sudo rm -rf /srv/chroot/focal-amd64/*

however i get spammed with

rm: cannot remove '/srv/chroot/focal-amd64/proc/[...]': Operation not permitted

I tried setting write permissions to directories with

find -type d | xargs chmod +rwx

with the same errors. No matter what I try to do it seems like I can't delete the folder anymore to try again.

Before, when I let the chroot creation finish, I was able to delete the directory without any problems afterwards, it's only after I interrupted this one that this happens.

1
0

As suggested in the comments, this solution might help.

I managed by unplugging the hard drive and putting it into another machine and deleting the folder there without any issues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.