Gentoo Forums
Gentoo Forums
Quick Search: in
Running another distro (with X) in a chroot [solved]
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
tobr
Guru
Guru


Joined: 29 May 2006
Posts: 330

PostPosted: Wed Nov 14, 2007 9:16 am    Post subject: Running another distro (with X) in a chroot [solved] Reply with quote

Hello.

At the moment I’m playing with chroots and I’d be interested to run another distro (and perhaps later a 32bit Gentoo, as I’m on amd64) in a chroot. I’d like to use my main Gentoo desktop at the same time as the desktop of the other distro.

So I installed debian (via dev-util/debootstrap) into /srv/chroots/debian, installed KDE, chrooted into it and did /etc/init.d/kdm start. This worked, X started on :1 and I could log in. But the sound doesn’t work, there’s no 3D accel (I have an Intel i965) and I can’t start konsole/xterm (something about no permissions to create a pty). I mounted my main /dev, /proc and /sys into the chroot but it made no difference. My user is in the video/audio/cdrom/plugdev groups, so I don’t think that’s the problem. So I wanted to ask if there’s something else to do or if it is impossible to do this. Has somebody done this before? I couldn’t find any howtos/docs but perhaps I searched for the wrong things.

Thanks in advance for any info.
_________________
Please add [SOLVED] to your message title if your problem is solved.

Death to all blobs!


Last edited by tobr on Sun Jan 20, 2008 7:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hopeless
Veteran
Veteran


Joined: 05 Aug 2004
Posts: 3041
Location: Ariel

PostPosted: Wed Nov 14, 2007 9:46 am    Post subject: Reply with quote

For the pty issue I think you might actually need to mount --bind /dev/pts in the chroot as well as /dev.

Also, if you want to start some x app within the chroot but using the running "host" X server you need to --bind /tmp as well.
_________________
"They took Christmas away
Came downstairs for the shiny presents
They took the tree and the stockings, nothing left but coal
Dont look in the closet either, its greedy
Its not in the spirit of the holiday"
Back to top
View user's profile Send private message
tobr
Guru
Guru


Joined: 29 May 2006
Posts: 330

PostPosted: Wed Nov 14, 2007 10:05 am    Post subject: Reply with quote

Hopeless wrote:
For the pty issue I think you might actually need to mount --bind /dev/pts in the chroot as well as /dev.

That worked, thank you :D

Quote:
Also, if you want to start some x app within the chroot but using the running "host" X server you need to --bind /tmp as well.

Yes, I tried that before but it was not entirely satisfying to me. I want to check out some other desktops.
_________________
Please add [SOLVED] to your message title if your problem is solved.

Death to all blobs!
Back to top
View user's profile Send private message
tobr
Guru
Guru


Joined: 29 May 2006
Posts: 330

PostPosted: Sun Jan 20, 2008 7:14 pm    Post subject: Reply with quote

Just for reference I solved all my problems.

For the audio: It was a problem with permissions in /dev and wrong group<->gid mapping in the chroot.

For the video: 3D accel is possible in a chroot but only one X server seems to able be able to claim this feature (so stop the Gentoo one if you need 3D in the chroot). The problem was also a permission one and my Debian install missed libgl1-mesa-dri, so be sure to install it if you want to try the same.
_________________
Please add [SOLVED] to your message title if your problem is solved.

Death to all blobs!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT - 5 Hours
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