termux / proot

An chroot-like implementation using ptrace.
https://wiki.termux.com/wiki/PRoot
Other
761 stars 160 forks source link

How can I back up proot rootfs using tar? #124

Open Root-voidX opened 3 years ago

Root-voidX commented 3 years ago

Hello,

I am using an ubuntu rootfs which was done using andronix scripts. I want to back my ubuntu install using tar. However from termux, tar throws an error saying it cannot access certain directories within the ubuntu-rootfs folder (namely /dev, /bin and /sbin). Is there anyway to back my rootfs up so I can copy them between devices?

Thanks

kcubeterm commented 3 years ago

Just requires fakeroot to access that, try proot -0 and now use tar.

michalbednarski commented 3 years ago

Sometimes rootfs contain directories readable by nobody (chmod 000, although root still can access them, proot -0 temporary chmods them so they can be accessed)

I think this can be fixed with following command (after that you should be able to use tar normally, although I haven't tested extensively if this won't cause breakage)

find . -type d -exec chmod u+rx {} \;