arch-chroot: montagens duplicadas após montar uma pasta com a opção --bind

0

Estou fazendo chrooting em uma chamada de sistema em arco:

sudo arch-chroot -u ctag:ctag .

Após esta chamada, posso ver as montagens criadas pelo arch_chroot:

38,56d37
< /dev/nvme0n1p6 on /home/remi/dev_tools/ti/ccs/ccs_root type ext4 (rw,relatime,data=ordered)
< proc on /home/remi/dev_tools/ti/ccs/ccs_root/proc type proc (rw,nosuid,nodev,noexec,relatime)
< proc on /home/remi/dev_tools/ti/ccs/ccs_root/proc type proc (rw,nosuid,nodev,noexec,relatime)
< sys on /home/remi/dev_tools/ti/ccs/ccs_root/sys type sysfs (ro,nosuid,nodev,noexec,relatime)
< sys on /home/remi/dev_tools/ti/ccs/ccs_root/sys type sysfs (ro,nosuid,nodev,noexec,relatime)
< efivarfs on /home/remi/dev_tools/ti/ccs/ccs_root/sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
< efivarfs on /home/remi/dev_tools/ti/ccs/ccs_root/sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
< udev on /home/remi/dev_tools/ti/ccs/ccs_root/dev type devtmpfs (rw,nosuid,relatime,size=16392576k,nr_inodes=4098144,mode=755)
< udev on /home/remi/dev_tools/ti/ccs/ccs_root/dev type devtmpfs (rw,nosuid,relatime,size=16392576k,nr_inodes=4098144,mode=755)
< devpts on /home/remi/dev_tools/ti/ccs/ccs_root/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
< devpts on /home/remi/dev_tools/ti/ccs/ccs_root/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
< shm on /home/remi/dev_tools/ti/ccs/ccs_root/dev/shm type tmpfs (rw,nosuid,nodev,relatime)
< shm on /home/remi/dev_tools/ti/ccs/ccs_root/dev/shm type tmpfs (rw,nosuid,nodev,relatime)
< run on /home/remi/dev_tools/ti/ccs/ccs_root/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
< run on /home/remi/dev_tools/ti/ccs/ccs_root/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
< tmp on /home/remi/dev_tools/ti/ccs/ccs_root/tmp type tmpfs (rw,nosuid,nodev)
< tmp on /home/remi/dev_tools/ti/ccs/ccs_root/tmp type tmpfs (rw,nosuid,nodev)
< /dev/nvme0n1p4 on /home/remi/dev_tools/ti/ccs/ccs_root/etc/resolv.conf type ext4 (rw,relatime,data=ordered)
< /dev/nvme0n1p4 on /home/remi/dev_tools/ti/ccs/ccs_root/etc/resolv.conf type ext4 (rw,relatime,data=ordered)

Por que proc e outros são montados duas vezes?

Eu fiz um outro teste, antes de fazer o chrooting, fiz uma montagem de bind:

sudo mount --bind /home/remi /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/

Eu chrooted e aqui estão os pontos de montagem:

37a38,76
> /dev/nvme0n1p6 on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi type ext4 (rw,relatime,data=ordered)
> /dev/nvme0n1p6 on /home/remi/dev_tools/ti/ccs/ccs_root type ext4 (rw,relatime,data=ordered)
> /dev/nvme0n1p6 on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root type ext4 (rw,relatime,data=ordered)
> proc on /home/remi/dev_tools/ti/ccs/ccs_root/proc type proc (rw,nosuid,nodev,noexec,relatime)
> proc on /home/remi/dev_tools/ti/ccs/ccs_root/proc type proc (rw,nosuid,nodev,noexec,relatime)
> proc on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/proc type proc (rw,nosuid,nodev,noexec,relatime)
> proc on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/proc type proc (rw,nosuid,nodev,noexec,relatime)
> sys on /home/remi/dev_tools/ti/ccs/ccs_root/sys type sysfs (ro,nosuid,nodev,noexec,relatime)
> sys on /home/remi/dev_tools/ti/ccs/ccs_root/sys type sysfs (ro,nosuid,nodev,noexec,relatime)
> sys on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/sys type sysfs (ro,nosuid,nodev,noexec,relatime)
> sys on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/sys type sysfs (ro,nosuid,nodev,noexec,relatime)
> efivarfs on /home/remi/dev_tools/ti/ccs/ccs_root/sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
> efivarfs on /home/remi/dev_tools/ti/ccs/ccs_root/sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
> efivarfs on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
> efivarfs on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
> udev on /home/remi/dev_tools/ti/ccs/ccs_root/dev type devtmpfs (rw,nosuid,relatime,size=16392576k,nr_inodes=4098144,mode=755)
> udev on /home/remi/dev_tools/ti/ccs/ccs_root/dev type devtmpfs (rw,nosuid,relatime,size=16392576k,nr_inodes=4098144,mode=755)
> udev on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/dev type devtmpfs (rw,nosuid,relatime,size=16392576k,nr_inodes=4098144,mode=755)
> udev on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/dev type devtmpfs (rw,nosuid,relatime,size=16392576k,nr_inodes=4098144,mode=755)
> devpts on /home/remi/dev_tools/ti/ccs/ccs_root/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
> devpts on /home/remi/dev_tools/ti/ccs/ccs_root/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
> devpts on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
> devpts on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
> shm on /home/remi/dev_tools/ti/ccs/ccs_root/dev/shm type tmpfs (rw,nosuid,nodev,relatime)
> shm on /home/remi/dev_tools/ti/ccs/ccs_root/dev/shm type tmpfs (rw,nosuid,nodev,relatime)
> shm on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/dev/shm type tmpfs (rw,nosuid,nodev,relatime)
> shm on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/dev/shm type tmpfs (rw,nosuid,nodev,relatime)
> run on /home/remi/dev_tools/ti/ccs/ccs_root/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
> run on /home/remi/dev_tools/ti/ccs/ccs_root/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
> run on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
> run on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
> tmp on /home/remi/dev_tools/ti/ccs/ccs_root/tmp type tmpfs (rw,nosuid,nodev)
> tmp on /home/remi/dev_tools/ti/ccs/ccs_root/tmp type tmpfs (rw,nosuid,nodev)
> tmp on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/tmp type tmpfs (rw,nosuid,nodev)
> tmp on /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/tmp type tmpfs (rw,nosuid,nodev)

Ainda há montagens duplicadas, mas outras montagens são montadas anteriormente em /home/remi/dev_tools/ti/ccs/ccs_root/home/ctag/host_files_remi/dev_tools/ti/ccs/ccs_root/

Como podemos explicar isso?

Depois de sair do chroot, esses pontos de montagem são desmontados.

    
por rem 15.12.2017 / 12:16

0 respostas