// Hopefully not a double post, otherwise apologies in advance
Hi,
I learned about PRoot at FOSDEM and wanted to use it for a long time. Currently
I am using chroot, binfmt_misc, QEMU 2.2.0 (user mode) and Fedora 21 for
AArch64 rootfs. This allows me to build AArch64 RPMs without having a farm of
AArch64 machinery. I wanted to provide easy setup instructions for users to try
out/fix AArch64 software. PRoot came to my mind as it's a single static binary
and does not require root permissions. Simply put perfect.
My host is x86_64, Scientific Linux 6.6 (basically RHEL). QEMU 2.2.0
(statically built). PRoot nightly build (Jan 4th,
http://static.proot.me/proot-x86_64). Fedora 21 rootfs from
F21-20141216-server-RC7.
PRoot launch command: ./proot-x86_64 -S /data/davidlt/quemu22/rootfs/ -q
"/data/davidlt/quemu22/qemu-2.2.0/aarch64-linux-user/qemu-aarch64"
There are two things I noticed:
(1) Invisible mount though I am not using PROOT_DONT_POLLUTE_ROOTFS.
/host-rootfs and /data (external HDD) is available on quest rootfs, but
invisible. Is this expected without PROOT_DONT_POLLUTE_ROOTFS? Also does PRoot
makes NFS, AFS and custom networked file systems available on quest rootfs
automatically?
-sh-4.3# stat /data
File: ‘/data’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 811h/2065d Inode: 9969781 Links: 4
Access: (0700/drwx------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2015-01-04 05:36:27.000000000 -0500
Modify: 2015-01-04 05:32:38.000000000 -0500
Change: 2015-01-04 05:32:38.000000000 -0500
Birth: -
-sh-4.3# stat /host-rootfs
File: ‘/host-rootfs’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 811h/2065d Inode: 2 Links: 29
Access: (0555/dr-xr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2015-01-04 02:30:22.000000000 -0500
Modify: 2014-11-27 10:50:42.000000000 -0500
Change: 2014-11-27 10:50:42.000000000 -0500
Birth: -
-sh-4.3# ls /
bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
(2) Seems that root permissions aren't enough. I was not able to use yum to
update or install packages with PRoot. I couldn't create file or directory in
/var/run (symlink to ../run), which is fully in guest rootfs. Same with some
executables like `sudo'.
-sh-4.3# sudo
-sh: /bin/sudo: Permission denied
-sh-4.3# yum makecache
Loaded plugins: langpacks
Cannot open logfile /var/log/yum.log
Could not create lock at /var/run/yum.pid: [Errno 13] Permission denied: '/var/run/yum.pid'
Can't create lock file; exiting
-sh-4.3# id
uid=0(root) gid=0(root) groups=0(root),1399,1098336343
-sh-4.3# whoami
root
-sh-4.3# cd /var/run
-sh-4.3# pwd
/var/run
-sh-4.3# ls -la
total 8
drwxr-xr-x. 2 root root 4096 Dec 16 16:56 .
dr-xr-xr-x. 17 root root 4096 Dec 16 17:18 ..
-sh-4.3# mkdir a
mkdir: cannot create directory ‘a’: Permission denied
-sh-4.3# touch a
touch: cannot touch ‘a’: Permission denied
Is this expected?
Thanks,
david