It is necessary to mount the disk partition in another directory. Suppose we have a partition / dev / sda1, which is mounted on / boot. How can I mount this partition, for example, in / mnt / tmp. Option: mount --bind / boot / mnt / tmp is not suitable, since when mounting only the partition name is known. Thank you in advance!

  • And simlink will not work? - Vladimir Martyanov

1 answer 1

just mount, that's all. demonstration:

$ mount | grep sda1 /dev/sda1 on /boot type ext2 (rw,relatime,block_validity,barrier,user_xattr,acl,stripe=4) $ mkdir /tmp/boot $ sudo mount /dev/sda1 /tmp/boot $ mount | grep sda1 /dev/sda1 on /boot type ext2 (rw,relatime,block_validity,barrier,user_xattr,acl,stripe=4) /dev/sda1 on /tmp/boot type ext2 (rw,relatime,block_validity,barrier,user_xattr,acl,stripe=4) $ $ ls /boot /tmp/boot /boot: config-4.9.0-3-amd64 initrd.img-4.9.0-3-amd64 System.map-4.9.0-3-amd64 grub lost+found vmlinuz-4.9.0-3-amd64 /tmp/boot: config-4.9.0-3-amd64 initrd.img-4.9.0-3-amd64 System.map-4.9.0-3-amd64 grub lost+found vmlinuz-4.9.0-3-amd64