Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] Multiple SGML on one pc

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Mads Laursen <dossen+sgl AT daimi.au.dk>
  • To: SM-Discuss <SM-Discuss AT lists.ibiblio.org>
  • Subject: Re: [SM-Discuss] Multiple SGML on one pc
  • Date: Wed, 11 Dec 2002 01:46:08 +0100

On 11/12/02 13.19, Duane Macolm wrote:
> Dufflebunk wrote:
>
[snip]
> >At least one person has set up test systems in a chroot. There is some
> >info on this on the wiki. Again, can anyone else fill in the limits of
> >such a chrooted system?
> >
> I have seen the chroot stuff in the wiki, this is where I got the idea
> that I may be able to use it.

Since I happen to have played around a bit with chroot, I might as
well add a few comments.

First of all, it is perfectly possible to have a sourcemage system
working in chroot. I have one running glibc-2.2.5 (it makes some
update scripts for Loki games happy).
(pts/2)root@leela:~# ls /
1 glibc-2.2.5-chroot root
bin home sbin
boot lib swapfile
dev locale tex
devices mnt tmp
etc opt usr
fonts proc var
(pts/2)root@leela:~# my-chroot /glibc-2.2.5-chroot/
root@leela:/# ls
bin dev etc lib opt proc sbin tmp var
boot devices home mnt override-grimoire root setup~ usr

The chroot environment was built by unpacking a sufficiently old iso,
chrooting to it, getting the sorcery up to date (quite easy when you
do not need to worry about fucking your system up), fixing the a few
things (like getting an old glibc spell, and makeing sure it is in a
local grimoire, before the sorcery one) and rebuilding.

Changing to the chroot is done using this script (the mounts may
differ depending on your needs (but entries like proc, dev and devices
might be a good idea):

(pts/2)root@leela:~/bin$ cat my-chroot
#!/bin/bash
ROOT=$1;

mount --bind /proc $ROOT/proc
mount --bind /devices $ROOT/devices
mount --bind /dev $ROOT/dev
mount --bind /var/spool/sorcery/ $ROOT/var/spool/sorcery/
mount --bind /root $ROOT/root
mount --bind /home $ROOT/home

chroot $ROOT /usr/bin/env -i HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login

umount $ROOT/proc
umount $ROOT/devices
umount $ROOT/dev
umount $ROOT/var/spool/sorcery/
umount $ROOT/root
umount $ROOT/home

/dossen




Archive powered by MHonArc 2.6.24.

Top of Page