[SM-Discuss] UT2003's updater segfaults

Mads Laursen dossen+sgl at daimi.au.dk
Sat Nov 30 08:03:16 EST 2002


On 30/11/02 13.55, Mads Laursen wrote:
<snip> 
> - enter the directory via chroot, see the attached script for commands
>   and stuff to remember (getting the directories mounted over helps
>   the system alot).
<more snip> 

The script I promissed.

Note: This is NOT a secure chroot, there's much too much stuff in
there (a compiler toolchain, just for starters).

/dossen

-------------- next part --------------
#!/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



More information about the SM-Discuss mailing list