Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
running gentoo and ubuntu simultaneasuly using chroot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
tanis1234
n00b
n00b


Joined: 08 Aug 2005
Posts: 8

PostPosted: Sun Aug 14, 2005 3:09 pm    Post subject: running gentoo and ubuntu simultaneasuly using chroot Reply with quote

i was just installig gentoo from my ubuntu installation.
this idea came to me.
is it possible to have a fully functionall gentoo installation run from under ubuntu.
i thinking along the lines of starting a new user.
chrooting to make the /mnt/gentoo root (like for installing)
starting X from there.
to me who is so used to ubuntu it would offer the best of both.
the compile from source and keep everything updated gentoo
running alongside the stable just working ubuntu
both not messing each other up.
is this a workable idea.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55248
Location: 56N 3W

PostPosted: Sun Aug 14, 2005 4:11 pm    Post subject: Reply with quote

tanis1234,

Its possible but untidy - which kernel would you use?

Share /boot and <swap> between all your distros and /tmp if its a shmfs.
Put all their kernels in the one /boot and choose the distro you will use at boot time.
That way they all get to run op top of their own kernels.

You may be able to share /home too but that wants more care as different distros have different versions of apps and some apps save setup information there.

Be careful when cross mounting other root partitions to get at the /home for other distros.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
tanis1234
n00b
n00b


Joined: 08 Aug 2005
Posts: 8

PostPosted: Sun Aug 14, 2005 4:41 pm    Post subject: Reply with quote

i don't want it to be that complicated.
when i chrooted into the mnt/gentoo dir i saw everything as if ' / ' was that dir.
i figure i could make a new swap and use that .
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55248
Location: 56N 3W

PostPosted: Sun Aug 14, 2005 6:55 pm    Post subject: Reply with quote

tanis1234,

There is no need to make a new <swap>. You can only run one kernel at a time and swap belongs to the kernel.
The content of swap is discarded at shut down, so there is no confusion with shared swap.

When you chroot, as you say, everything appears as it it would in the running system.
In this case, appearances are deceptive. Its not running the gentoo kernel.
What does
Code:
uname -a
tell you?

Do you want to use the gentoo or ubuntu kernel ?

The other complication is X. You will not be able to run X inside and outside the chroot at the same time.
Having two sets of software trying to control one piece of hardware at the same time is always a Bad Thing(tm).
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
tanis1234
n00b
n00b


Joined: 08 Aug 2005
Posts: 8

PostPosted: Mon Aug 15, 2005 4:32 am    Post subject: Reply with quote

oh well then sorry to bother you
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Mon Aug 15, 2005 4:53 am    Post subject: Reply with quote

the apps in the gentoo chroot can be configured to use ubuntu's X or gentoo's X can be started on localhost:1

The former is better. Sharing /home will facilitate this....

1) for simplicity, make your gentoo user have the same username and UID as your ubuntu user

2) clear the directory /mnt/gentoo/home

try chrooting with a script like this:

Code:
#!/bin/bash
mount -t proc proc /mnt/gentoo/
mount -t sys sys /mnt/gentoo/sys
mount --bind /dev /mnt/gentoo/dev
mount --bind /home /mnt/gentoo/home
chroot /mnt/gentoo /bin/bash -l


(save to e.g. /usr/local/bin/gentoo and run chmod 755 on it)

Run it as root from a ubuntu terminal, then test one of gentoo's X programs such as an xterm:
Code:
export DISPLAY=:0.0
xterm &

_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum