æ¢ã«ã¯ãªã¹ãã¹ã«ãªã£ã¦ã¾ãããããã¯Gentoo Advent Calendarã®4æ¥ç®ã§ããã²ã§ããªä¿ºã
Gentooã®ã¤ã³ã¹ãã¼ã«ä¸ã«chrootãã¦å®ç°å¢ãæ§ç¯ãããã§ã¼ãºã§ã/devã¨/procããã¦ã³ãããæé ãHandbookã§ç´¹ä»ããã¦ãã¾ãã
mount -o bind /dev /mnt/gentoo/dev mount -t proc none /mnt/gentoo/proc chroot /mnt/gentoo /bin/bash
ããããå ´åã¯/sysããã¦ã³ããã¦ããã¨ããã¨æãã¾ãã
mount -o bind /dev /mnt/gentoo/dev mount -t proc none /mnt/gentoo/proc mount -o bind /sys /mnt/gentoo/sys chroot /mnt/gentoo /bin/bash
ããã«ããã°ãbindã ãã ã¨/dev/ã/sys/é ä¸ã«ãµããã¦ã³ãããããã¡ã¤ã«ã·ã¹ãã ã¯ãã¦ã³ããããªãã®ã§ã--rbindã§ãã¦ã³ããã¾ãããã
mount --rbind /dev /mnt/gentoo/dev mount -t proc none /mnt/gentoo/proc mount --rbind /sys /mnt/gentoo/sys chroot /mnt/gentoo /bin/bash
ãã ãã--rbindã§ãã¦ã³ãããå ´åã¯ç´ ç´ã«umountã§ãã¾ããã
# umount /mnt/gentoo/dev umount: /mnt/gentoo/dev: device is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1))
ãã®å ´åã¯-lãªãã·ã§ã³ã§lazy unmountã使ãã¨ã¢ã³ãã¦ã³ãã§ãã¾ãã
# umount -l /mnt/gentoo/dev # umount /mnt/gentoo/proc # umount -l /mnt/gentoo/sys