Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253681 - sys-apps/portage-2.1.6.4: (un)merging gives "openpty failed:" for chrooted env -- /dev needs to be mounted via `-R -o bind`
Summary: sys-apps/portage-2.1.6.4: (un)merging gives "openpty failed:" for chrooted en...
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Installation Handbook (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: nm (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-04 11:12 UTC by Toralf Förster
Modified: 2011-03-16 07:50 UTC (History)
5 users (show)

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


Attachments
Patch for gentoo-x86-quickinstall-stage.xml (gentoo-x86-quickinstall-stage.patch,981 bytes, patch)
2010-09-14 13:07 UTC, Sven Vermeulen
Details | Diff
Patch for gentoo-x86-tipsntricks.xml (gentoo-x86-tipsntricks.patch,773 bytes, patch)
2010-09-14 13:08 UTC, Sven Vermeulen
Details | Diff
Patch for hb-install-mips-system.xml (hb-install-mips-system.patch,760 bytes, patch)
2010-09-14 13:08 UTC, Sven Vermeulen
Details | Diff
Patch for hb-install-ppc-bootloader.xml (hb-install-ppc-bootloader.patch,1001 bytes, patch)
2010-09-14 13:08 UTC, Sven Vermeulen
Details | Diff
Patch for hb-install-system.xml (hb-install-system.patch,1.06 KB, patch)
2010-09-14 13:09 UTC, Sven Vermeulen
Details | Diff
Patch for migration-to-2.6.xml (migration-to-2.6.patch,828 bytes, patch)
2010-09-14 13:09 UTC, Sven Vermeulen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2009-01-04 11:12:20 UTC
Upgrading that package to 2.11.9.4 and BTW unmerging 2.11.9.3 gives within my chrooted UML image:

...
>>> Unmerging dev-db/phpmyadmin-2.11.9.3...
openpty failed: 'out of pty devices'
...

However unmerging was done succdessful AFAICS.
 

Reproducible: Always
Comment 1 Toralf Förster gentoo-dev 2009-01-04 11:19:08 UTC
B/c the same happended for glibc too:

...
>>> Emerging (1 of 1) sys-libs/glibc-2.6.1
openpty failed: 'out of pty devices'
...

I changed summary to portage
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2009-01-05 16:40:08 UTC
Did you `mount --bind /dev' and `mount -t proc none' into that chroot?
Comment 3 Toralf Förster gentoo-dev 2009-01-05 18:55:03 UTC
(In reply to comment #2)
> Did you `mount --bind /dev' and `mount -t proc none' into that chroot?
> 

Yes, the 2nd I did (I mounted proc, b/c w/o that emerge of mysql failed) - however I didn't mount /dev into that chroot -probably that's the issue ?
Comment 4 Toralf Förster gentoo-dev 2009-01-06 10:20:28 UTC
Although I closed this bug I observed this a minute ago within the chrooted UML image :

>>> Unmerging dev-util/unifdef-1.20...
openpty failed: 'out of pty devices'

However I mounted both /proc and /dev (furthermore some more dirs to share7save disk space) :

tfoerste@n22 ~ $ mount | grep loop

/dev/loop0 on /mnt/loop type ext3 (rw)
none on /mnt/loop/proc type proc (rw)
/dev on /mnt/loop/dev type none (rw,bind)

/usr/portage on /mnt/loop/usr/portage type none (ro,bind)
/usr/local/portage on /mnt/loop/usr/local/portage type none (ro,bind)
/var/tmp/ccache on /mnt/loop/var/tmp/ccache type none (rw,bind)
/mnt/uml/var/tmp/portage on /mnt/loop/var/tmp/portage type none (rw,bind)
Comment 5 Toralf Förster gentoo-dev 2009-01-06 10:21:30 UTC
And FWIW within the chrooted env this dir is empty :

/dev/pts/
Comment 6 Patrick Lauer gentoo-dev 2009-01-07 18:11:49 UTC
you have to bind-mount /dev/pts too if you wish to avoid this issue. Bindmounting /dev alone is not enough in this case.

(I've hit this bug often enough in the past :) )
Comment 7 Marc Arens 2009-05-30 11:23:28 UTC
What about adding the additional info about bind-mounting /dev/pts to the handbook? 
Comment 8 Juanlu Pérez 2009-10-15 17:02:13 UTC
I solved this with: mount --rbind /dev /path/dev
Comment 9 Timo A. Hummel 2010-09-04 13:48:06 UTC
This is clearly a documentation issue. The documentation should make clear that mount --rbind should be used (if it works - didn't test it myself so far).

I don't have permission to reassign or reopen the bug - please change it to "Documentation" and reopen it.
Comment 10 Toralf Förster gentoo-dev 2010-09-04 14:03:46 UTC
re-opened per request
Comment 11 Toralf Förster gentoo-dev 2010-09-04 14:19:03 UTC
(In reply to comment #8)
> I solved this with: mount --rbind /dev /path/dev
> 

BTW this doesn#t work for me, b/c unmounting wasn't possible - I had to reboot the host system.
Comment 12 Nirbheek Chauhan (RETIRED) gentoo-dev 2010-09-14 10:22:24 UTC
@docs-team: The handbook needs this to be added wherever /dev (or other directories which have multiple mounts inside them) are bind-mounted into a chroot.

I don't know the proper procedure to get this done, but since it seems straight-forward enough, I thought I'd assign it to you (I'm CCed now).
Comment 13 Sven Vermeulen 2010-09-14 13:07:50 UTC
Created attachment 247246 [details, diff]
Patch for gentoo-x86-quickinstall-stage.xml
Comment 14 Sven Vermeulen 2010-09-14 13:08:09 UTC
Created attachment 247248 [details, diff]
Patch for gentoo-x86-tipsntricks.xml
Comment 15 Sven Vermeulen 2010-09-14 13:08:29 UTC
Created attachment 247249 [details, diff]
Patch for hb-install-mips-system.xml
Comment 16 Sven Vermeulen 2010-09-14 13:08:48 UTC
Created attachment 247251 [details, diff]
Patch for hb-install-ppc-bootloader.xml
Comment 17 Sven Vermeulen 2010-09-14 13:09:08 UTC
Created attachment 247253 [details, diff]
Patch for hb-install-system.xml
Comment 18 Sven Vermeulen 2010-09-14 13:09:28 UTC
Created attachment 247254 [details, diff]
Patch for migration-to-2.6.xml
Comment 19 Sven Vermeulen 2010-09-14 13:10:22 UTC
BTW, quite a few guides in the proj/en location also use the standard bind-mounts. I don't know if those are managed by docs-team as well nowadays or not.
Comment 20 Jeroen Roovers (RETIRED) gentoo-dev 2011-03-15 17:32:45 UTC
*** Bug 358041 has been marked as a duplicate of this bug. ***
Comment 21 Arne Babenhauserheide 2011-03-16 06:03:13 UTC
Changing to --rbind also solves bug 358041. 

I can now only umount it with 

    sudo umount -l gentooxo-1.1/dev

though.

@Jeroen Roovers: Sorry. You were right: It is a duplicate. Thanks for tracking it!
Comment 22 Arne Babenhauserheide 2011-03-16 06:05:57 UTC
$ sudo mount --rbind /dev gentooxo-1.1/dev 
Passwort: 
$ sudo umount gentooxo-1.1/dev 
umount: /home/arne/Dokumente/eigenes/Programme/GentooXO/gentooxo-updating/gentooxo-1.1/dev: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
$ lsof gentooxo-1.1/dev
$ fuser gentooxo-1.1/dev
$ sudo umount -l gentooxo-1.1/dev 
$
Comment 23 nm (RETIRED) gentoo-dev 2011-03-16 07:50:08 UTC
Fixed in CVS. Thanks to swift for the patches!