Google
 
Web www.bloodpet.tk
phreakfish.blogspot.com emans.blogspot.com

20050714

Slackware + Debian using chroot

Because of the chroot tips, i decided not to remove my Slackware installation. I made a Slackware+Debian system using chroot.
I run all the important (servers, databases, software projects) in Slackware and all the frontend stuff (GUI, browser, mail client, players, games, et al) in Debian.
Here's what i did in Slackware's /etc/inittab:

c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:12345:respawn:/sbin/agetty 38400 tty2 linux
c3:12345:respawn:/sbin/agetty 38400 tty3 linux
c4:12345:respawn:/sbin/agetty 38400 tty4 linux
c5:124:respawn:/sbin/agetty 38400 tty5 linux
c6:124:respawn:/sbin/agetty 38400 tty6 linux
d5:35:respawn:/usr/sbin/chroot /mnt/deb /sbin/getty 38400 tty5 linux
d6:35:respawn:/usr/sbin/chroot /mnt/deb /sbin/getty 38400 tty6 linux
d8:35:respawn:/usr/sbin/chroot /mnt/deb /sbin/getty 38400 tty8 linux
d9:35:respawn:/usr/sbin/chroot /mnt/deb /sbin/getty 38400 tty9 linux
d13:35:wait:/usr/sbin/chroot /mnt/deb /root/bin/chroot
x1:4:wait:/etc/rc.d/rc.4
x2:5:wait:/etc/rc.d/rc.5
There's a script in /mnt/deb/root/bin/chroot (/root/bin/chroot in Debian) that runs in runlevel 3 & 5. This mounts partitions that i find necessary.
The rc.4 file is for Slackware's X and rc.5 is for Debian's X.
To see how i made Debian's X run, here's a part of /etc/rc.d/rc.5 in Slackware:
# Try to use KDE's kdm session manager:
if [ -x /mnt/deb/etc/init.d/kdm ]; then
exec /usr/sbin/chroot /mnt/deb /etc/init.d/kdm start
fi

# Not there? OK, try to use GNOME's gdm session manager:
if [ -x /mnt/deb/etc/init.d/gdm ]; then
exec /usr/sbin/chroot /mnt/deb /etc/init.d/gdm start
fi
Then, i attached the lines from /etc/rc.d/rc.4 to go to the X of Slackware (in case something happens to Debian).

0 Comments:

Post a Comment

<< Home