multilib or virtual machines - pro's and con's

Other talk about Salix
User avatar
jpg153
Donor
Posts: 449
Joined: 23. Oct 2009, 15:43
Location: Krefeld/NRW/BRD/EU

Re: multilib or virtual machines - pro's and con's

Post by jpg153 »

Hi,

I have made screen shots of the output:

http://s7.directupload.net/file/d/2768/hnb77vjk_png.htm

http://s1.directupload.net/file/d/2768/mmfyapt5_png.htm

http://s7.directupload.net/file/d/2768/r89ebdn6_png.htm

No idea if there is anything to detect...

Sorry, next time I will use other server for images... :!:
Regards Gruß
jpg
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: multilib or virtual machines - pro's and con's

Post by Shador »

This is probably some X server access stuff. Never quite got the time and devotion to properly understand that. What do xauth list and xauth info say in both host and chroot?

I guess it works here cause I share the home partition. But probably it works too for you if you copy the .Xauthority file from the host to the chroot or if you allow connections from the chroot through xauth and/or xhost. The latter is probably the better solution.
Image
User avatar
jpg153
Donor
Posts: 449
Joined: 23. Oct 2009, 15:43
Location: Krefeld/NRW/BRD/EU

Re: multilib or virtual machines - pro's and con's

Post by jpg153 »

ok,

here we go:

Code: Select all

jpg[~]$ xauth list
jpg153salix/unix:0  MIT-MAGIC-COOKIE-1  eeb2d22d22ae759672819e6e312f5649
localhost.localdomain/unix:0  MIT-MAGIC-COOKIE-1  eeb2d22d22ae759672819e6e312f5649
jpg[~]$ xauth info
Authority file:       /home/jpg/.Xauthority
File new:             no
File locked:          no
Number of entries:    2
Changes honored:      yes
Changes made:         no
Current input:        (argv):1
and

Code: Select all

jpg[~]$ switch32
(salix32) jpg[~]$ xauth list
xauth:  file /home/jpg/.Xauthority does not exist
(salix32) jpg[~]$ xauth info
xauth:  file /home/jpg/.Xauthority does not exist
Authority file:       /home/jpg/.Xauthority
File new:             yes
File locked:          no
Number of entries:    0
Changes honored:      yes
Changes made:         no
Current input:        (argv):1
From what I see above, it seems your idea is right. Honestly, I dont understand that. I probably was toooo long DOS-OS/2-User to understand the graphic subsystem in Linux...
Thanks for further hints, tipps and help.

If I could get this to run, I could install softmaker office and so at least could work on some files stored in softmaker format.
If printing would run, it would be perfect. If not, I could still produce PDFs I hope.
Regards Gruß
jpg
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: multilib or virtual machines - pro's and con's

Post by Shador »

It seems like there are two solutions. Either you copy the .Xauthority file to every users home directory you want to have access from (or you only explicitly export some cookies from there). Alternatively, you can also just allow any user from that machine to access your display by doing xhost +localhost or possibly xhost +<hostname>.

I guess one should be fairly careful with these values as the server is by default listening on port 6000 or similar. At least here this is the case. I'm not sure whether this is actually needed though. You can check that with netstat -nap | grep X
Her you can have a look at the authentication system, which is necessary as the X server is implemented as a multi-user network server: man Xsecurity
Image
User avatar
jpg153
Donor
Posts: 449
Joined: 23. Oct 2009, 15:43
Location: Krefeld/NRW/BRD/EU

Re: multilib or virtual machines - pro's and con's

Post by jpg153 »

ok, thanks.

I decided to copy .Xauthority to the salix32 environment, since it is just me using this machine (as far as I can see :lol: ).

After that there was an error message about a missing machine-ID in /var/lib/dbus . I have copied this from the 64bit system into the 32bit system.
Now evince ran!

Other apps produced some errors but continued.

I installed softmaker office in salix32 via terminal and all was fine.

Using textmaker with

Code: Select all

switch32 -c textmaker
produces an error because of a missing file

Code: Select all

locate: fatal error: Could not find user database '/var/lib/slocate/slocate.db':  No such file or directory
however it runs!

:!: :geek: :!: Fantastic! :D :D :D

Big THANK you! :!: :!: :!:

I just need to fiddle a bit for the right directories to share files between both environments, but this can be managed by a small script, I hope.

Thank you again!
Regards Gruß
jpg
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: multilib or virtual machines - pro's and con's

Post by Shador »

Cronjobs are of course never run, because no services from the chroot system are setup. You could setup hooks in your host cron daemon or selectively start services in the chroot, which would introduce some imo unecessary overhead.
But to make that specific error go away you just need to run updatedb as root in the chroot.

I recommend you just mount your home-partition to the home of the chroot. Like this all data is shared and actually that's what the script more or less expects, as it tries to change to the same directory in the chroot.
In case it's a partition, you can use:

Code: Select all

mount /dev/sda6 /media/salix32/home
Or what always works and probably is done in the first case too internally:

Code: Select all

mount --bind /home /media/salix32/home
Of course you can also add according entries to the fstab for the latter case it would be:

Code: Select all

/home /media/salix32/home none bind 0 0
That would have prevented the issues with X in the first place too for non-root users.

Edited my initial instructions accordingly.
Image
User avatar
jpg153
Donor
Posts: 449
Joined: 23. Oct 2009, 15:43
Location: Krefeld/NRW/BRD/EU

Re: multilib or virtual machines - pro's and con's

Post by jpg153 »

Sh..t :cry: :cry: :cry:

After fiddling the fstabs, the chroot doesnot work as it should.
When trying to start textmaker, I receive this:

Code: Select all

jpg[~]$ switch32
(salix32) jpg[~]$ textmaker
Invalid MIT-MAGIC-COOKIE-1 key./textmaker: Zeile 3:  4753 Speicherzugriffsfehler  "/home/jpg/office2010"/textmaker "$@"
I think I have messed up some paths/mount points...

sdb is boot device and hosts the 64bit system and the 64bit home
sda is the device hosting the 32bit system, including the home and sda5 is home2

Yesterday all was fine after I copied .Xauthority from 64bit/home to 32bit/home (and some other stuff).

Here the fstab of the 64bit system:

Code: Select all

/dev/sdb6        swap             swap        defaults         0   0
/dev/sdb1        /                xfs         noatime,defaults 1   1
/dev/sdb5        /home            xfs         defaults         1   2
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
#/dev/fd0         /mnt/floppy      auto        noauto,users,rw,umask=00 0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
/dev/sda5        /home2           xfs         defaults         1   2
/dev/sda1        /media/salix32   xfs         defaults         1   2
this is fstab of the 32bit system:

Code: Select all

/dev/sdb6        swap             swap        defaults         0   0
/dev/sda1        /                xfs         noatime,defaults 1   1
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
#/dev/fd0         /mnt/floppy      auto        noauto,users,rw,umask=00 0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
Let me know what other details you are missing...

I am just too puzzled...sorry.
I am pretty sure its just a small error in here but I am stuck.

Thank you!
Regards Gruß
jpg
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: multilib or virtual machines - pro's and con's

Post by Shador »

You need these lines for the chroot, if you want to share the home directory which I recommend:

Code: Select all

/dev/sda1        /media/salix32   xfs         defaults         1   2
/dev/sdb5        /media/salix32/home            xfs         defaults         1   2
This gives you for the host environment:

Code: Select all

/dev/sdb6        swap             swap        defaults         0   0
/dev/sdb1        /                xfs         noatime,defaults 1   1
/dev/sdb5        /home            xfs         defaults         1   2
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
#/dev/fd0         /mnt/floppy      auto        noauto,users,rw,umask=00 0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
/dev/sda1        /media/salix32   xfs         defaults         1   2
/dev/sdb5        /media/salix32/home            xfs         defaults         1   2
The fstab inside the chroot is never used unless you run some mount command from inside there.

So previously nothing was mounted on your /home path probably, you were writing to the root partition. So I recommend you ensure nothing is mounted on /home, delete its content or back it up, then change the fstab as suggested and finally run mount -a.
Image
User avatar
jpg153
Donor
Posts: 449
Joined: 23. Oct 2009, 15:43
Location: Krefeld/NRW/BRD/EU

Re: multilib or virtual machines - pro's and con's

Post by jpg153 »

:D
You saved my day! :mrgreen:
Thank you again!

I decided to uninstall smoffice first, then applied the changes to fstab and ran mount -a.
After a new install of smoffice its even smoother and better integrated than before!

Perfect! 8-)
Regards Gruß
jpg
Post Reply