Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 296073 - x86 Handbook Sec. 6a (Chrootrooting): mount -o bind /dev /mnt/gentoo/dev is inadequate
Summary: x86 Handbook Sec. 6a (Chrootrooting): mount -o bind /dev /mnt/gentoo/dev is i...
Status: RESOLVED INVALID
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Installation Handbook (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Docs Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-07 13:21 UTC by Alan Mackenzie
Modified: 2009-12-07 16:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Mackenzie 2009-12-07 13:21:25 UTC
The recipe:

    # mount -o bind /dev /mnt/gentoo/dev

fails to make subdirectories of /dev available in the chrooted environment.  In particular, it fails to make /dev/pts available.  When I set up sshd in the chrooted environment, I was unable to ssh into it because of the lack of /dev/pts.

I think this part of the recipe should be modified to read:

    mount --rbind /dev/ /mnt/gentoo/dev

.  At least, it worked for me in the sense I was able to ssh into it.  Please consider amending this manual.

Thanks!

-- 
Alan Mackenzie (Nuremberg, Germany)

Reproducible: Always

Steps to Reproduce:
1. Read the fine manual
2. Do what it says.
3.

Actual Results:  
See description

Expected Results:  
sshd should work.
Comment 1 nm (RETIRED) gentoo-dev 2009-12-07 16:53:08 UTC
I can't reproduce your error, as it works for me as written.

You are supposed to setup sshd *before* you enter a chrooted environment, otherwise yeah, you might be missing some things later on. Re-read these parts of the handbook:

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=2#doc_chap3_sect4
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=2#doc_chap3_sect6