chroot rpm -Uvh

Eric "Shubes" plug at shubes.net
Sat Jun 17 16:34:54 MST 2006


Jeremy C. Reed wrote:
> On Thu, 15 Jun 2006, Eric "Shubes" wrote:
> 
> 
> Use the mount command.
> 
> mount -t proc sebuhscire /proc
> 
> Something may need it later.
> 
> 
> 
>  Jeremy C. Reed
> 
That seems to be working pretty well, but I'm missing something.

After I
# mount -t proc /proc /opt/myjail/proc
/etc/mtab shows:
/proc /opt/qtms-sandbox/proc proc rw 0 0

When I
# ls /opt/myjail/proc
the result looks ok.

Then I
# chroot /opt/myjail
# ls proc
and the result still looks fine.

However, when rpm -Uvh runs from a script in the same chroot jail, it says:
error: failed to stat /opt/qtms-sandbox/proc: No such file or directory

I don't understand well enough how mount, mtab works.
I have an /opt/myjail/etc/mtab identical to /etc/mtab.

Do I need /opt/myjail/etc/mtab to not have the
/proc /opt/qtms-sandbox/proc proc rw 0 0
line? I'm just guessing, as that's the only place I can figure that rpm 
could be getting /opt/qtms-sandbox/proc from.

Can someone please tell me, how do I mount /proc at /opt/myjail/proc so 
that rpm behaves properly when run inside the jail?

-- 
-Eric 'shubes'


More information about the PLUG-discuss mailing list