update
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
> 嗯, 用户想问的似乎是如何使用
|
||||
>
|
||||
> - `qemu-user-static`
|
||||
> - `qemu-user-static-binfmt`
|
||||
>
|
||||
> 通过
|
||||
>
|
||||
> ```bash
|
||||
> sudo systemd-nspawn -M {{ rootfs-name }}
|
||||
> ```
|
||||
>
|
||||
> 运行从
|
||||
>
|
||||
> ```bash
|
||||
> wget https://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
|
||||
> ```
|
||||
>
|
||||
> 下载且通过
|
||||
>
|
||||
> ```bash
|
||||
> sudo mkdir -p /var/lib/machines/{{ rootfs-name }} && \
|
||||
> sudo bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C /var/lib/machines/{{ rootfs-name }}
|
||||
> ```
|
||||
>
|
||||
> 解压的 aarch64 架构的 archlinux rootfs. 但要不要提醒用户应该取消注释 `cat /etc/pacman.conf` 中的
|
||||
>
|
||||
> ```conf
|
||||
> [options]
|
||||
> #DisableSandboxFilesystem
|
||||
> #DisableSandboxSyscalls
|
||||
> ```
|
||||
>
|
||||
> 以禁用在 systemd-nspawn 中默认不可用的下载沙盒, 并且应该避免运行需要 setuid 的程序 (如 sudo), 因为 `/proc/sys/fs/binfmt_misc/qemu-aarch64` 中的 `flags` 缺失 `C` (Credentials) 标志, 导致可执行文件的 `s` 权限位被忽视? 不过如果真的需要 setuid 的话, 也可以通过
|
||||
>
|
||||
> ```bash
|
||||
> sudo cp /usr/lib/binfmt.d/qemu-aarch64-static.conf /etc/binfmt.d/
|
||||
> ```
|
||||
>
|
||||
> 复制一份并在末尾加上 C, 要不要一并告诉用户?
|
||||
>
|
||||
> 算了, 反正用户什么也不懂, 即使问题解决也只会原地消失, 一句感谢也不说.
|
||||
|
||||
_Baked for 27s._
|
||||
Reference in New Issue
Block a user