5

What is the recommended way to use chroot from Ubuntu Stable (in my case 11.04) with Ubuntu+1 (11.10)?

Linked (but probably separate) is "Is there anything special that I need to do in order to get Xorg working?"

Reason I ask is because I'd like to test a few GTK3 programs without losing my current (stable) Ubuntu, or having to get my data synced.

I thought about maybe running a SSH server from 11.10 and then using SSH's X forwarding, but that seems rather cumbersome.

4
  • Could you please tell us why exactly you are doing this? You can chroot, but all that will do is change your root to 11.10. init/kernel/kernel modules will still have run from 11.04, so you won't really be running 11.10. This could be useful if you're trying to install grub or something from 11.10, but otherwise it's just silly.
    – user606723
    Aug 11, 2011 at 13:48
  • @606723 Edited to explain.
    – jrg
    Aug 11, 2011 at 13:54
  • This would not be a valid test.. Just run the live cd/usb and then install the GTK3 apps you wish to test.. and run them that way..
    – user606723
    Aug 11, 2011 at 13:58
  • Or rather, what exactly are you trying to test? I suppose you could run Xorg :1, to get X running. but getting full gnome running seems like a bad idea.
    – user606723
    Aug 11, 2011 at 14:01

1 Answer 1

4

In order to chroot to do things like.. configure/install grub, do the following-

#first, mount new install to /mnt/oneiric
mount -t proc proc /mnt/oneiric/proc
mount -t sysfs sys /mnt/oneiric/sys
mount -o bind /dev /mnt/oneiric/dev

chroot /mnt/oneiric /bin/bash

I wouldn't try to start full gnome this way.
The only reason you should really be doing this is if you can't boot into the linux installation for some reason, but still need to run a few things from it. You can't just chroot over and change the distro you're running.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .