# chroot terminal problem - not enough ptys [SOLVED]

## roboguy

Hi all,

I'm having a bit of a chroot problem. If I chroot into my 32bit environment, change to my user and try to open another xterm I get the following error: 

```

james@athos james $ xterm 

xterm: Error 32, errno 2: No such file or directory 

Reason: get_pty: not enough ptys 

james@athos james $ 

```

I am using the following script to log into my chroot enviroment: 

```

#!/bin/sh 

# mount 32 bit folders 

mount -t proc none              /mnt/gentoo32/proc/ 

mount -o bind /dev/             /mnt/gentoo32/dev/ 

mount -o bind /tmp/             /mnt/gentoo32/tmp/ 

mount -o bind /home/            /mnt/gentoo32/home/ 

mount -o bind /usr/portage/     /mnt/gentoo32/usr/portage/ 

mount -o bind /usr/share/       /mnt/gentoo32/usr/share/ 

# start & configure 32Bit env 

linux32 chroot /mnt/gentoo32/ /bin/bash --login 

env-update 

source /etc/profile 

```

The thing is I can open new xterms as a normal user from my x86_64 environment no problem so I don't think it's anything to do with my kernel. I'm pretty sure it has something to do with being inside the chroot. 

I'm using devfs (haven't gotten round to upgrading to udev). Could that be the problem? 

Cheers,

James

Sorry to double post this but I only got one response under the AMD64 section and on reflection this was probably a better place for it.

----------

## roboguy

*bump* anyone? I could really use some help!

----------

## wll

I'll bet that the mount of /dev in the chroot won't include /dev/pts, 

which is a separate filesystem. Check it out.

----------

## roboguy

 *wll wrote:*   

> I'll bet that the mount of /dev in the chroot won't include /dev/pts, 
> 
> which is a separate filesystem. Check it out.

 

You legend! I didn't realise pts was a whole seperate filesystem. 

I added the following line to my script:

```

mount -t devpts devpts          /mnt/gentoo32/dev/pts

```

And all of a sudden everything works   :Very Happy: 

Now I can start using the debugger in monodevelop which was really the whole point of this exercise!

Cheers,

Roboguy

----------

## wll

Glad to be of help!

Now let's see if my "legendary" abilities will enable me to

successfully boot Gentoo on this remote RedHat server.

Hmm, maybe I'll browse the forums some more...

----------

