running mint in parallel with another distro using schroot

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

running mint in parallel with another distro using schroot

Postby lofty00 on Fri Nov 21, 2008 7:14 pm

I've been experimenting with running mint inside a chroot in parallel to my debian testing system, and I have just figured out how to do it. This is different from using a virtual machine like virtualbox or Xen - the kernel is the same as the host system but everything else comes from the distro you are chrooting (in this case mint). The advantage is it should run a bit quicker than with virtualbox, and you can switch between the two using ctrl-alt-f8/f7.

First you need to create a free partition on your disk and install mint to it as normal. This is the one step that could be dangerous for your host system, so back everything up first. Ask in this thread if you need help with this step.

Next you need to open a root terminal and mount all the necessary drives and directories (replace /dev/sdxx with the proper kernel name of the partition you have mint on.)
Code: Select all
# as root:
mount /dev/sdxx /mnt
mount /dev /mnt/dev -o rbind
mount proc -t proc /mnt/proc

Next you enter the chroot:
Code: Select all
# still as root:
chroot /mnt

This creates a protected environment inside the chroot, where all the programs think that /mnt is the root directory. Most of mint should run fine inside this chroot, but if you get any problems it's best to check whether it's the fault of the chroot by rebooting and choosing it at boot time.

Now start X:
Code: Select all
# still as root:
/etc/init.d/gdm start


This should start a new X session running inside the chroot, which you can log in to as normal. You can switch back to your host system by pressing ctrl-alt-f7, and return to mint with ctrl-alt-f8

Let me know here if you have any problems.

andy
lofty00
Level 1
Level 1
 
Posts: 19
Joined: Fri Nov 21, 2008 1:38 pm
Location: UK

Linux Mint is funded by ads and donations.
 

Re: running mint in parallel with another distro using schroot

Postby lofty00 on Fri Nov 21, 2008 7:42 pm

A couple of extra things:
- You can use the home directory from your host system by doing:
Code: Select all
# do this on the host system not in the chrooted mint.
mount /home /mnt/home -o bind

- There seems to be a problem with removable drives when you use this method - I'll post back if I find a cure.
lofty00
Level 1
Level 1
 
Posts: 19
Joined: Fri Nov 21, 2008 1:38 pm
Location: UK

Re: running mint in parallel with another distro using schroot

Postby piratesmack on Sat Nov 22, 2008 4:02 am

Awesome I was actually wondering how to do this for a while
piratesmack
Level 5
Level 5
 
Posts: 710
Joined: Mon May 26, 2008 3:08 pm

Re: running mint in parallel with another distro using schroot

Postby lofty00 on Sat Nov 22, 2008 4:42 am

glad you've found it helpful :)
lofty00
Level 1
Level 1
 
Posts: 19
Joined: Fri Nov 21, 2008 1:38 pm
Location: UK


Return to Tutorials / Howtos

Who is online

Users browsing this forum: tkocou and 14 guests