Install apps using zypper from within chroot?

Primary/Host openSUSE 12.3, KDE 4.10
Guest openSUSE 12.3

Attempting to build a chroot guest.
Have successfully setup the chroot and installed some basic apps including rpm, zypper, wget, vi.

Curiously,
From outside the chroot I can install apps into the chroot but when I attempt to run zypper from inside the chroot I’m getting the following error immediately after verifying the install. An example follows, I’ve bold the error. So far I’ve been able to do everything else with zypper… se, wp, lr, mr, ar

Apparently the warnings can be ignored.

TIA,
TSU


zypper in lynx
warning: Failed to read auxiliary vector, /proc not mounted?
warning: Failed to read auxiliary vector, /proc not mounted?
warning: Failed to read auxiliary vector, /proc not mounted?
warning: Failed to read auxiliary vector, /proc not mounted?
warning: Failed to read auxiliary vector, /proc not mounted?
warning: Failed to read auxiliary vector, /proc not mounted?
warning: Failed to read auxiliary vector, /proc not mounted?
warning: Failed to read auxiliary vector, /proc not mounted?
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW packages are going to be installed:
  libncurses6 lynx xli 

3 new packages to install.
Overall download size: 1.8 MiB. After the operation, additional 7.2 MiB will be used.
Continue? [y/n/?] (y): **Cannot read input: bad stream or EOF.**
If you run zypper without a terminal, use '--non-interactive' global
option to make zypper use default answers to prompts.


/proc not mounted?

Yup, that was it, thx.

Also took a closer look to see what actually was initially deployed.Seems although all usual mount points are created, proc, sys and dev aren’t populated by default.

TSU

On 2013-03-26 15:46, tsu2 wrote:
>
> zerum;2541076 Wrote:
>>>
> Code:
> --------------------
> > > /proc not mounted?
> --------------------
>>>
>
> Yup, that was it, thx.
>
> Also took a closer look to see what actually was initially
> deployed.Seems although all usual mount points are created, proc, sys
> and dev aren’t populated by default.

No, you have to bind mount them from the host.

You may also need care with “/etc/mtab” and resolv.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Those directories are virtual files they don’t exist on the disk only in a running system.

You need to do a bind on them for the to work from a chroot environment. ie link them from the running file system.into the chroot system.