installing software in the chroot

540 views
Skip to first unread message

Trevor Gale

unread,
Jul 28, 2015, 2:11:44 PM7/28/15
to ware...@lbl.gov
Hello all,

I noticed that the command “wwmngchroot” does not exist anymore (or at least I don’t have it when I installed WW). What is the best way to install software in my chroot? Is there a way to use yum and just tell it to install it in the chroot?

Thanks,
Trevor

Lew Robbins

unread,
Jul 28, 2015, 2:24:04 PM7/28/15
to ware...@lbl.gov
It depends on what I'm doing, but I you can either  'chroot' into the chroot area and perform any work, or if just installing a pkg, you can point yum to your chroot.

Assuming the WW chroot is /data/chroots/rhel6

To point yum at the chroot:
yum --config=/data/chroots/rhel6/root/yum-ww.conf --installroot=/data/chroots/rhel6 install <pkgname>

To chroot into the area:
chroot /data/chroots/rhel6 /bin/bash

--Lew


--
You received this message because you are subscribed to the Google Groups "Warewulf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to warewulf+u...@lbl.gov.
To post to this group, send email to ware...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/warewulf/A1D648E1-2CA3-4C83-82F8-295E1AF48DF1%40snowhaven.com.
For more options, visit https://groups.google.com/a/lbl.gov/d/optout.

Trevor Gale

unread,
Jul 28, 2015, 2:28:31 PM7/28/15
to ware...@lbl.gov
Ok thanks!

When I change root to the chroot I no longer have the yum program, is this normal?

Thanks,
Trevor

Lew Robbins

unread,
Jul 28, 2015, 2:33:38 PM7/28/15
to ware...@lbl.gov
I don't recall if yum was part of the default WW chroot or if I added it after the fact. Does /usr/bin/yum exist in your WW chroot?

Trevor Gale

unread,
Jul 28, 2015, 2:35:57 PM7/28/15
to ware...@lbl.gov
No it does not. I can easily just do most of my installs from outside but it would be way more convenient to just have yum.

Thanks,
Trevor

Lew Robbins

unread,
Jul 28, 2015, 2:55:49 PM7/28/15
to ware...@lbl.gov
You can try doing a yum install of yum to your WW chroot.
Something like:
yum --config=/data/chroots/rhel6/root/yum-ww.conf --installroot=/data/chroots/rhel6 install yum.noarch

Michael Jennings

unread,
Jul 28, 2015, 2:56:47 PM7/28/15
to ware...@lbl.gov
I tried to add packages to the default setup so that the VNFSs would be self-sufficient, but those changes were reverted.  Just do "yum --installroot=/path/to/vnfs install yum rpm" and that will suffice so long as your management node OS version matches your VNFS.  (If not, you have to convert.)

Once you have yum and rpm inside the VNFS, you can manage everything from within the VNFS using "chroot" or similar utility.  Or you can do as I've been doing lately and manage it all with Docker.

Michael





--
Michael Jennings <m...@lbl.gov>
Senior HPC Systems Engineer
High-Performance Computing Services
Lawrence Berkeley National Laboratory
Bldg 50B-3209E        W: 510-495-2687
MS 050B-3209          F: 510-486-8615

Trevor Gale

unread,
Jul 28, 2015, 3:06:23 PM7/28/15
to ware...@lbl.gov
Awesome thank you all very much!

-Trevor

Tim Copeland

unread,
Jul 28, 2015, 7:47:46 PM7/28/15
to ware...@lbl.gov
The wwmngchroot was a proof of concept that was never fully implemented.
It may have made its way into a few nightly builds but I don't believe
ever made it into any of the releases. If you had success with it in the
past or don't mind working with experimental code, it can still be found
in the source tree for download. Just keep in mind this code is not
being supported at this time, and is a "Use At Your Own Risk".

With that said, I too find it very useful, look forward to
continuing its development somewhere down the road, and welcome
all feedback on its use.

Cheers
Tim


Reply all
Reply to author
Forward
0 new messages