I want to download Debian system using debootstrap (creating chroot environment) and when I run debootstrap stable ./dir $debian_ftp, debootstrap says:

E: debootstrap can only run as root

Why can't debootstrap be run without root permissions?


You need to be able to create a chroot when you use debootstrap. Plus if you plan on partitioning, or doing any mounts, etc. you will need root permissions.

If you check out the debootstrap manpage you should be able to use debootstrap with the --variant=fakechroot option to use fakechroot, which installs the packages without root privileges. An example in your case would be something along the lines of this:

debootstrap --variant=fakechroot stable ./dir $debian_ftp

Please read the Wiki for more information on how to use debootstrap.

  • 1
    Small addition: debootstap creates device nodes as well, which also requires root permissions, but that part can be faked by fakeroot. – Ferenc Wágner May 1 '19 at 8:05

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.