Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 105646 - bootstrapping fails when features contain usersandbox
Summary: bootstrapping fails when features contain usersandbox
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Xavier Neys (RETIRED)
URL:
Whiteboard:
Keywords:
: 105647 105969 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-11 17:30 UTC by Albert Holm
Modified: 2006-01-19 13:49 UTC (History)
5 users (show)

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


Attachments
outside chroot /dev (dev-layout-outside-chroot.txt,20.14 KB, text/plain)
2005-10-02 13:22 UTC, Michael Stewart (vericgar) (RETIRED)
Details
inside chroot (dev-layout-inside-chroot.txt,265.95 KB, text/plain)
2005-10-02 13:23 UTC, Michael Stewart (vericgar) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Holm 2005-09-11 17:30:36 UTC
Bootstrapping a new system, even bootstrap.sh gave sandbox errors. So did every 
package that I tried to merge while I used usersandbox. The example of emerging 
sandbox might work as a better example. The live cd gave me sandbox-1.2.11 and 
upgrading to sandbox-1.2.12 did not fix the problem. When I give FEATURES="-
userpriv" and the non-usersandbox is used it works as expected.

Reproducible: Always
Steps to Reproduce:
1. FEATURES="-userpriv" emerge sandbox (to upgrade to latest version)
2. emerge sandbox

Actual Results:  
1. sandbox upgraded to sandbox-1.2.12, this works
2. emerge failed with
ACCESS DENIED  open_wr:   /newroot/dev/vc/1
ACCESS DENIED  open_wr:   /newroot/dev/vc/1
>>> Unpacking source...
>>> Unpacking sandbox-1.2.12.tar.bz2 to /var/tmp/portage/sandbox-1.2.12/work
 * Unpacking sandbox for ABI=default...
>>> Source unpacked.
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-sys-apps_-_sandbox-1.2.12-27696.log"

open_wr:   /newroot/dev/vc/1
open_wr:   /newroot/dev/vc/1
--------------------------------------------------------------------------------


Expected Results:  
Sandbox should have been re-emerged.

Gentoo Base System version 1.6.13
Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r1, 2.6.
12-gentoo-r6 i686)
=================================================================
System uname: 2.6.12-gentoo-r6 i686 Celeron (Coppermine)
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.59-r6
sys-devel/automake:  1.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   [Not Present]
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -mfpmath=sse -mmmx -msse -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/
config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -mfpmath=sse -mmmx -msse -O2 -pipe -fomit-frame-
pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache collision-protect distlocks sandbox sfperms strict 
userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.gentoo.se http://distfiles.gentoo.org http://www.
ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 apm arts avi bash-completion berkdb bitmap-fonts crypt cups eds emacs 
emboss encode foomaticdb gdbm gif gpm gstreamer gtk2 imlib jpeg libg++ libwww 
mad mikmod motif mp3 mpeg ncurses nls nptl nptlonly ogg oggvorbis pam pdflib 
perl png python quicktime readline sasl sdl spell ssl tcpd threads threadsonly 
truetype truetype-fonts type1-fonts unicode userlocales vorbis xml2 xmms xv zlib 
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-09-11 17:52:02 UTC
*** Bug 105647 has been marked as a duplicate of this bug. ***
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2005-09-11 23:34:02 UTC
It is because /newroot/dev/ is not in the write allow list.  Usually you bind
mount /dev to the chroot before you chroot, so not sure what you are doing.
Comment 3 Albert Holm 2005-09-11 23:52:08 UTC
Could that be some part of the installation guide that I have missed? I don't 
remember reading anything about having to do it manually atleast.
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2005-09-12 00:25:22 UTC
Oh, well, they changed things a lot from when I last read it I guess.  Any idea
where the '/newroot/dev', especially the /newroot comes into the chroot ?
Comment 5 Albert Holm 2005-09-12 01:34:15 UTC
I found a forum post that seems relevant: <http://forums.gentoo.org/viewtopic-t-
370904.html>. Posts in that thread says unmounting /proc enables building. A 
link to wiki that talks about userpriv and ccache problems, bug #99120. Though, 
I did not have ccache installed when I bootstrapped.
Comment 6 SpanKY gentoo-dev 2005-09-14 10:28:28 UTC
*** Bug 105969 has been marked as a duplicate of this bug. ***
Comment 7 Ruben Jenster 2005-09-14 12:09:28 UTC
Sorry for the dup.  
   
Binding the /dev folder of the liveCD to the /dev folder of the croot  
environment 'mount -o bind /dev /mnt/gentoo/dev' solves the problem for me.  
  
  
Regards   
  
Ruben  
Comment 8 Chris Gianelloni (RETIRED) gentoo-dev 2005-09-15 06:40:23 UTC
Should this be assigned to the GDP for them to update the Handbook?
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2005-10-02 13:00:30 UTC
I think so, yes.
Comment 10 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-10-02 13:22:28 UTC
Created attachment 69749 [details]
outside chroot /dev

`ls -lR /dev` from outside the chroot on a system where this problem showed up
Comment 11 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-10-02 13:23:10 UTC
Created attachment 69750 [details]
inside chroot

And the same for inside the chroot
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2005-10-02 13:36:16 UTC
Not really showing anything.  'ls -lR /prog | grep newroot' before the bind
mount maybe ?
Comment 13 Chris Gianelloni (RETIRED) gentoo-dev 2005-10-03 05:14:05 UTC
GDP:  It looks like we need to add the bind mount for /dev back into the Handbook.
Comment 14 Sven Vermeulen (RETIRED) gentoo-dev 2005-10-04 10:53:57 UTC
What architectures? Does this apply for all methods or only bootstrap? Is this
also true for installations made with Gentoo stages but unofficial installation
CDs? What's the end result after the installation? No change or will we miss a
few device files we need? When is the bind-mounting required? Just before the
chrooting?
Comment 15 Chris Gianelloni (RETIRED) gentoo-dev 2005-10-04 14:25:31 UTC
(In reply to comment #14)
> What architectures?

All.

> Does this apply for all methods or only bootstrap?

This would appear to only be necessary for stage1 installations.

> Is this  also true for installations made with Gentoo stages but unofficial
installation CDs?

I cannot answer this, as it would be dependent on the design of the CD.  I would
say it is likely.

> What's the end result after the installation?
> No change or will we miss a few device files we need?

This is a good question.  Would me miss the device creation in baselayout with
this method?  I honestly don't know the answer to that.  Adding base-system to
CC to see if they can give us an answer.

> When is the bind-mounting required?
> Just before the chrooting?

Correct.

I think we'll need to hold off on actually doing anything with this until we can
determine the possible implications of adding this into the Handbook.  Does
anyone know why it was removed in the first place?

Comment 16 Martin Schlemmer (RETIRED) gentoo-dev 2005-10-04 15:50:50 UTC
(In reply to comment #15)

> > When is the bind-mounting required?
> > Just before the chrooting?
> 
> Correct.
> 
> I think we'll need to hold off on actually doing anything with this until we can
> determine the possible implications of adding this into the Handbook.  Does
> anyone know why it was removed in the first place?
> 

Might be because not using devfs anymore ?  It should not have any implications,
just strange that it happens .. ie, what changed with the /newroot magic since
it last worked ?

Comment 17 Martin Schlemmer (RETIRED) gentoo-dev 2005-10-04 15:51:54 UTC
(In reply to comment #16)
> (In reply to comment #15)
> 
> > > When is the bind-mounting required?
> > > Just before the chrooting?
> > 
> > Correct.
> > 
> > I think we'll need to hold off on actually doing anything with this until we can
> > determine the possible implications of adding this into the Handbook.  Does
> > anyone know why it was removed in the first place?
> > 
> 
> Might be because not using devfs anymore ?

This bit is to the why we not doing it anymore question.

> It should not have any implications,
> just strange that it happens .. ie, what changed with the /newroot magic
> since it last worked ?
> 

The implications and possible why question ...

Comment 18 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-10-04 15:54:25 UTC
(In reply to comment #15)
> This would appear to only be necessary for stage1 installations.

I was doing a stage3 install when I ran into the bug and az had me post my /dev
above.
Comment 19 Sven Vermeulen (RETIRED) gentoo-dev 2005-11-05 09:32:37 UTC
I can't seem to find why it was removed or inserted (I can track it with
annotate in CVS, but the bind-mounting has moved across various files so it
would take some time). I do know that every time it was changed, we got a report
about a situation where it didn't work.

It mostly was regarding Knoppix usage though which is why we moved the Knoppix
instructions to the alternative installation guide.
Comment 20 Chris Gianelloni (RETIRED) gentoo-dev 2005-12-21 06:34:43 UTC
If I were to venture a guess, it would be because Knoppix uses a 2.4 kernel and we are using 2.6 kernels.  We also are using udev versus Knoppix using devfs, which means the device nodes would all be named differently, causing failures for users using Knoppix.
Comment 21 Jan Kundrát (RETIRED) gentoo-dev 2006-01-18 10:44:18 UTC
(In reply to comment #20)
> If I were to venture a guess, it would be because Knoppix uses a 2.4 kernel and
> we are using 2.6 kernels.  We also are using udev versus Knoppix using devfs,
> which means the device nodes would all be named differently, causing failures
> for users using Knoppix.

Newer versions of knoppix use the 2.6 kernels by default. WORKSFORME?

Comment 22 Chris Gianelloni (RETIRED) gentoo-dev 2006-01-18 12:29:23 UTC
I think the bind mount instructions need to be added back, then this should be resolvable.
Comment 23 Xavier Neys (RETIRED) gentoo-dev 2006-01-19 13:49:38 UTC
mount -o bind /dev... is back