Hold my hand... GUI program in 32 bit chroot on 64 bit host

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Hold my hand... GUI program in 32 bit chroot on 64 bit host

Postby morgano » Apr 30th, '12, 22:22

This is my first adventure in chroot land
I need someone to tell me if what i try to do is possible, and if so give a hint on how...

There are two problematic underdeveloped programs i need that only is available in 32 bit.
One is for banking somewhat complicated setup alrady on an 32 bit linux system
The other is bricscad that need many 32 bit libs, and proprietary driver.. and still crash for me anyway...
I have tried installing 32 bit libs etc in my 64 bit system but gave up, like most other users of same programs.
But lets leave the detalis on that trials there: viewtopic.php?f=8&t=2307
I decided to instead mange a 32 bit chrooted environment.

Thaks to the great urpmi and instructions at https://wiki.mageia.org/en/Chroot,
I have come so far as i can start a GUI program in the chrooted environment into a window in the host environment.
But two problems so far:

1) even when i run the host window full screen, the program only use less than 1/4 of the screen, top left
I guess i should look up settings for Xephyr? But any hint would help, especially how to make programs use really full screen.

2) the important program must have nvidia proprietary driver
I tried to in chroot use mcc>hardware>graphics and it suggested the right driver downloaded and failed.
I guess it is becayse it wants to install the 32 bit driver, but the kernel it runs on actually is the 64 bit host one.
Is that possible to solve?

3) Is it possible to start the whole KDE environment in chroot environment?
I tried to log out of host KDE and from a text terminal (Ctrl-Alt-F2) enter chroot and startx, but it failed on permissions (i do not remember details.)
It would be very nice to run a chrooted complete kde on one full desktop screen on host.


Here is what i have done so far, condensated:
(that 192.168.0.12 is local urpmi-proxy which i love more and more for all install trials)
Code: Select all
# mkdir -p /mnt/chroot/mageia
# urpmi.addmedia --distrib --urpmi-root /mnt/chroot/mageia http://192.168.0.12/mageia/distrib/cauldron/i586/
# urpmi  --urpmi-root /mnt/chroot/mageia basesystem urpmi locales-sv task-kde firefox nano kdiff3
# cp /etc/resolv.conf /mnt/chroot/mageia/etc/resolv.conf
# mount -o bind /proc /mnt/chroot/mageia/proc
# mount -o bind /home /mnt/chroot/mageia/home
# urpmi x11-server-xephyr


Open window in normal session as normal user
(take the whole screen, and i can change to other screens like normal by Ctrl-Alt-F{1..4})
$ Xephyr -ac :1 -fullscreen

In terminal, change to chroot and start program
# chroot /mnt/chroot/mageia
# mcc - and it displays in enter of the full screen Xephyr window 8-)
I added user, set locale, added more programs

# su myuser
$ kwrite (or whatever) it displays in part of screen only from top left
$ su
# mcc (tried installing nvidia proprietary driver, failed)
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1475
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Hold my hand... GUI program in 32 bit chroot on 64 bit h

Postby doktor5000 » May 1st, '12, 00:20

Why don't you stuff into a virtual machine? There's also video hardware acceleration available in there.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18015
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Hold my hand... GUI program in 32 bit chroot on 64 bit h

Postby morgano » May 1st, '12, 02:03

OK i will try. But it is not as sexy ;)
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1475
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Hold my hand... GUI program in 32 bit chroot on 64 bit h

Postby morgano » May 1st, '12, 23:19

doktor5000 wrote:There's also video hardware acceleration available in there.

I only found hardware accelerated mouse pointer, in the settings of Virtualbox virtual graphics card.
Is there a better driver available?
I have installed guest additions.
Anyhow, when trying anything 3D Bricscad crash with the infamous Redsdk error that it probably throws on any linux system which donot have a proprietary Nvidia driver. (known bug)
I tried installing the nvidia driver but of course Xorg puked on it at boot. drakX11 saved me back.

I guess it is likewise impossible to install nvidia driver in the chroot?

Then only option is to boot real 32-bit system until bricsys get their things together.
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1475
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Hold my hand... GUI program in 32 bit chroot on 64 bit h

Postby doktor5000 » May 2nd, '12, 19:21

If it really depends on the nvidia proprietary driver, then you're out of luck, it seems. You could still try to run bricscad on your x86_64 system via prepending linux32 to the command you want to run. For the general problem with the graphics card/driver, f.ex. xen supports passthrough of pci devices to the guest systems, but i don't know whether xen is compatible with nvidia driver, but google will probably tell you ;)

For virtualbox, you can enable 2d video and 3d hardware acceleration via virtualbox manager -> change -> display
For details, check https://www.virtualbox.org/manual/ch03. ... gs-display
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18015
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Hold my hand... GUI program in 32 bit chroot on 64 bit h

Postby morgano » May 3rd, '12, 21:33

Did not know the linux32 trick - thanks doktor, will try soon!
Xen... well for now i have lost fighting steam to try yet another route... maybe in future
Yes virtualbox 3D hardware acc is enabled in virtualbox guest settings, but i do not know if guest see it or it is just used from virtualbox to the card.
(And i do not know much about how graphic command are relayed or anytning like that...)
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1475
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Hold my hand... GUI program in 32 bit chroot on 64 bit h

Postby morgano » May 3rd, '12, 23:59

Unfortunately Prefixing linux32 to bricscadv12 did not help against segmentation fault in 3D draw.
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1475
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron