执行 qemu-deboot 捆绑时无法安装到使用 noexec 或 nodev 挂载的目标中

Mar*_*tto 7 fstab mount virtualization chroot

我正在尝试在我的桌面 X64 系统上安装带有 qemu-deboot-strap 的 armel 版本的 Ubuntu,但我发现了这个错误:

$ mkdir precise

$ sudo qemu-debootstrap --arch=armel precise ./precise/
Run Code Online (Sandbox Code Playgroud)

I:运行命令:

 $ debootstrap --arch armel --foreign precise ./precise/
 /usr/sbin/debootstrap: 1280: /usr/sbin/debootstrap: cannot create  /media/ziomario/Nexus-10/Images/313/precise/test-dev-null: Permission denied

E: Cannot install into target '/media/ziomario/Nexus-10/Images/313/precise' mounted with noexec or nodev
Run Code Online (Sandbox Code Playgroud)

你知道怎么修吗?我的系统是这样的:

Linux ziomario-Macmini 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)

这是/etc/fstab文件的内容:

<file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0

/ was on /dev/sda5 during installation
UUID=c703f96e-42fd-4734-b622-15ba1dd5fc21 /               ext4    errors=remount-ro 0       1

swap was on /dev/sda6 during installation
UUID=1c2b872f-3be3-4c6c-b021-6cec3e8b77e2 none            swap    sw              0       0
Run Code Online (Sandbox Code Playgroud)

谢谢。

小智 6

exec用和重新安装dev是解决方案。如果你的文件系统是加密的,你还需要传递-imount。

 sudo mount -i -o remount,exec,dev /home/user
Run Code Online (Sandbox Code Playgroud)

在我的例子中,/home/user/我的加密主目录在哪里。之后 debootstrap 就没有任何问题了。

在超级用户上找到了这个答案,它对我有用。