6

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!

axel
  • 61

2 Answers2

7

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.

dawud
  • 1,518
2

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.

q9f
  • 1,192