I'm trying to create a file system in Ubuntu with the command:

sudo debootstrap --foreign --no-check-gpg --include=ca-certificates --arch=armhf testing rootfs http://debian.raspbian.com/debian

but it got the following error:

/usr/sbin/debootstrap: 1294: /usr/sbin/debootstrap: cannot create /home/.../rootfs/test-dev-null: Permission denied
E: Cannot install into target '/home/.../rootfs' mounted with noexec or nodev

can anyone help me here? Thanks!

  • What are the permissions on rootfs? – terdon Jul 15 '13 at 13:33

Find out which filesystem the path /home/.../rootfs resides in (might be a dedicated partition or an LVM, you don't give specifics), and, as root (or using sudo) remount it with exec and dev options.

# mount -o remount,exec,dev /home

Here, /home is an example that assumes a separated partition or dedicated logical volume.


Remounting with exec and dev is the solution. If your filesystem is encrypted, you also need to pass -i to mount.

 $ sudo mount -i -o remount,exec,dev /home/user

Where in my case /home/user/ is my encrypted home directory. After that debootstrap had no issues any more.

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.