Posts Tagged ‘chroot’

Chroot to Debian

Tuesday, April 14th, 2009 by hejian

Chroot into debian root:

chroot /path/to/debian

Mount /proc and /dev/pts

mount -t proc proc /proc
mount -t devpts -o rw,gid=5,mode=620 none /dev/pts

Make the /dev

cd /dev; /sbin/MAKEDEV generic;

32-bit chroot jail on 64-bit CentOS

Saturday, February 14th, 2009 by hejian

Install a 32-bit chroot jail on 64-bit CentOS/Fedora is very easy, because CentOS/Fedora already provide the mock package to make things easy:

yum install mock
ln -sf /etc/mock/centos-4-i386.cfg /etc/mock/default.cfg
mock init
mock shell

Install package into chroot jail:

/usr/sbin/mock-helper yum --installroot /var/lib/mock/centos-5-i386/root install xxx

chroot to fedora

Wednesday, June 18th, 2008 by hejian

1. chroot to fedora root partition

sudo /usr/sbin/chroot /mnt/fedora

2. make /proc filesystem available

mount /proc

3. make /sys filesystem available

mount /sys

4. make devices available in /dev

start_udev

5. share home partition

mount /home

6. change user from root to me

su - hejian

Wordpress template made by HeJian