unable to list/access files inside schroot from a `mount --bind`
0
votes
1
answer
240
views
I created the chroot with
schroot
following these instructions: https://wiki.winehq.org/Building_Wine#Chroot
Then to test it I did:
$ sudo mkdir /TestA
$ echo abc |sudo tee /TestA/tst.txt
$ cat /TestA/tst.txt
abc
$ ls -ld /TestA /TestA/tst.txt
drwxr-xr-x 2 root root 4096 Sep 17 03:02 /TestA
-rw-r--r-- 1 root root 4 Sep 17 03:02 /TestA/tst.txt
$ sudo mkdir /srv/chroot/ubuntu_i386/TestB/
$ sudo mount -o bind /TestA/ /srv/chroot/ubuntu_i386/TestB/
$ mount |grep Test
/dev/mapper/MyLvmGroup-something on /srv/chroot/ubuntu_i386/TestB type ext4 (rw,relatime,errors=remount-ro)
$ schroot -c ubuntu_i386 -u root
$ ls -ld /TestB /TestB/tst.txt
ls: cannot access '/TestB/tst.txt': No such file or directory
drwxr-xr-x 2 root root 4096 Sep 17 06:10 /TestB
$ ls -l /TestB
total 0
I tried it also in a non LVM partition as the bind source, and it did not work.
What is happening? everywhere ppl saying it works, why it is not working here? what am I missing?
ubuntu 20.04
Asked by Aquarius Power
(4537 rep)
Sep 17, 2020, 06:24 AM
Last activity: Sep 17, 2020, 06:50 AM
Last activity: Sep 17, 2020, 06:50 AM