Difference between revisions of "Cluster: Sage Chroot"

From Earlham CS Department
Jump to navigation Jump to search
Line 1: Line 1:
 
In order to chroot the Sage notebook, I used a mix of steps from the following guides:
 
In order to chroot the Sage notebook, I used a mix of steps from the following guides:
  
* http://www.msri.org/about/computing/docs/sage/inst/node4.html
+
<!-- COMMENT: &#93; is for the right bracket HTML so that Mediawiki doesn't interpret it as the end of the link -->
* http://www.mail-archive.com/sage-support@googlegroups.com/msg01201.html
+
* [http://www.msri.org/about/computing/docs/sage/inst/node4.html MSRI SAGE Installation Guide: Running the SAGE Notebook Securely]
* http://groups.google.com/group/sage-support/msg/849e906146b41d28?pli=1
+
* [http://www.mail-archive.com/sage-support@googlegroups.com/msg01201.html [sage-support&#93; Re: How to run the notebook in the background]
* http://www.mail-archive.com/sage-devel@googlegroups.com/msg03545.html
+
* [http://groups.google.com/group/sage-support/msg/849e906146b41d28?pli=1 [sage-support&#93; chroot jail -- unable to mount image file]
 +
* [http://www.mail-archive.com/sage-devel@googlegroups.com/msg03545.html [sage-devel&#93; Re: SAGE in chroot]
  
 
== Chroot ==
 
== Chroot ==

Revision as of 11:26, 10 September 2009

In order to chroot the Sage notebook, I used a mix of steps from the following guides:

Chroot

The image itself is at /mounts/bobsced/sage_chroot.image (aka /cluster/bobscednew/sage_chroot.image). It gets mounted in the same directory as sage_chroot (it's an ext3 filesystem). The chroot needs to have /dev and /proc, so here's a copy of the relevant parts of /etc/fstab:

/mounts/bobsced/sage_chroot.image /mounts/bobsced/sage_chroot ext3 loop 0 0
/dev            /mounts/bobsced/sage_chroot/dev devpts  defaults        0 0
/proc           /mounts/bobsced/sage_chroot/proc proc   defaults        0 0

In order to get yum to install there, I had to edit /etc/yum.repos.d/CentOS-Base.repo and hard code $releasever to 3.5. I also commented out all the repositories except the top one. Then I was able to run:

yum --installroot=/mounts/bobsced/sage_chroot install bash fileutils sed which make gcc gcc-c++ m4 tar gzip bzip2 flex bison findutils yum rpm passwd perl diffutils

to set up the base install of the OS for the chroot. It also needs a copy of /etc/hosts for the localhost entry.

Sage Install

I downloaded the tar ball normally and then moved it into the chroot from the base filesystem. I untarred it from the base filesystem, too, then ran

make
make test
make install