binpash / try

Inspect a command's effects before modifying your live system
MIT License
5.21k stars 68 forks source link

Try mounting `/` once #90

Open ezrizhu opened 1 year ago

ezrizhu commented 1 year ago

via merger/unionfs

ezrizhu commented 7 months ago

we have good progress on this with root.

root@pashsn3:~# unshare --mount --user --pid --fork /bin/sh
((do gidmapping here # gidmapper 67195 0 0 65535 0 0 65535))
$ pwd
/root
$ mkdir overlay
$ cd overlay
$ mkdir low up merged work
$ mergerfs / low
$ mount -t overlay overlay -o userxattr -o lowerdir=low,upperdir=up,workdir=work merged
$ chroot merged /bin/bash
root@pashsn3:/# touch x
root@pashsn3:/# echo z > x
root@pashsn3:/#

Can not reproduce this with out running as root. Getting EOVERFLOW

ezrizhu commented 7 months ago

Progress also made by @SleepyMug on https://github.com/binpash/try/commit/06213751c4349575c6b53e021126916c9c66049b