More ooo/chroot problems 

Newsgroups:  gmane.linux.debian.ports.amd64
Date:        Sun, 13 Mar 2005 12:19:37 +0000

I have pure64 running very smoothly on an Asus K8V-X motherboard with a 3400 processor. It has been acting as a cups print server for a usb printer for the rest of my network.

A couple of days ago I felt the need to try to get openoffice going with the chroot process described in the amd64 howto. All seems to be going quite well; when I type oowriter in a shell, an oowriter window comes up, complete with icons on the toolbars and a default frame. Unfortunately it doesn't display any fonts in the frame or windows.

Should I have an XF86Config-4 in the chroot, to set font paths? My limited understanding suggested that would be the job of X running outside the chroot. I have downloaded and installed only the packages suggested in the Howto.

Suggestions?

Angus Mackenzie

More ooo/chroot problems 

> Suggestions?

as of some months ago OpenOffice.org package is available in the pure64 system, without the need of the chroot. I've installed it and works fine.

Look for the howto somewhere on alioth or on this list.

Lorenzo Milesi

More ooo/chroot problems - solved 

My ia-32 chroot version of openoffice ran but had no fonts in the window

Lucien Saviot suggested I installed ttf-bitstream-vera in the chroot

That plus its dependencies solved the problem; ooo now seems to perform perfectly.

Angus Mackenzie

Printing from chrooted open office 

Newsgroups:  gmane.linux.debian.ports.amd64
Date:        Wed, 02 Mar 2005 18:08:05 -0500
> What should I do in order to print from open office which is installed in
> the chrooted environment.
>
> I.e., I think I should install the printing system (cups) in the 32bit
> chroot, then how about the ttf fonts, the defoma... to me the list can
> grow bigger and bigger as I proceed...

Well the fonts should only need to be available to the X server (64bit) and the print server (64bit) (in case it is doing postscript rendering), or Xprint if it uses that (also 64bit). I think all you should need is perhaps cupsys-client and/or cupsys-bsd client programs installed in the chroot so it can connect to the print server on port 631.

I haven't tried it myself, but I think it ought to work that way.

Len Sorensen

Printing from chrooted open office 

Well, I use LPRNG (rather than CUPS) and it works without any changes. That's because printing always goes over network connections, so the chroot client can talk directly to the non-chroot lprng server.

Alex Perry

running openoffice from chroot 

Newsgroups:  gmane.linux.debian.ports.amd64
Date:        Tue, 22 Feb 2005 10:25:42 +0100

Ted:

> I'm assuming you are using dchroot to run openoffice in the chroot?

Yes, that's exactly my setup, as described in the howto. But. I did not use the apostrophes. With the filename between apostrophes it does indeed work.

Clive:

> expert and can't guess what the problem may be.  Did you install amd64
> and then install the 32bit system in the chroot (as I did) or the other

I have a 64bit system, and a 32bit chroot inside of it. The only tricky business is that this weekend I reinstalled my 64 bit system, but without reinstalling the chroot. The chroot was in my /home which is on its own partition.

So in conclusion, is there any way to tell KDE to put apostrophes around filenames when it calls various programs?

Alex.

running openoffice from chroot 

> So in conclusion, is there any way to tell KDE to put apostrophes
> around filenames when it calls various programs?

Yes, but a better thing is to fix dchroot's / su's stupidity with a script (make this do_chroot):

#!/bin/bash

# Work around dchroot brain-deadness
ARGS=""
for i in "$@" ; do
         ARGS="$ARGS '$i'"
done

exec dchroot -c ia32 -d -q "`basename $0`" "$ARGS"

Much eaiser.

Adam

running openoffice from chroot 

>Yes, but a better thing is to fix dchroot's / su's stupidity with a
>script (make this do_chroot):
>
>I don't understand. What should I do with this script?

From the FAQ:

You can make things slightly simpler even than this. Write a small
shell script like the following, and place it in your PATH: eg.
/usr/local/bin/do_dchroot

Make it executable:

chmod 755 /usr/local/bin/do_dchroot

Now create a symlink to this script from each command you want to run inside the chroot to this shell script:

cd /usr/local/bin
ln -s do_dchroot openoffice
ln -s do_dchroot oowriter
ln -s do_dchroot oocalc

Now you can execute openoffice by simply typing openoffice or oowriter.

Peter

Debian chroot on Ubuntu? 

Newsgroups:  gmane.linux.debian.ports.amd64
Date:        Sun, 13 Mar 2005 17:48:05 -0700
> I'm getting ready to install a 32 bit chroot on an Ubuntu AMD64
> install. Do I need to stick with a 32 bit Ubuntu distro or can I go
> with a 32 bit Debian chroot?

Yes, Debian works fine. Follow the instructions in the Debian AMD64 HOWTO.

I don't use 32 bit anything on AMD64. I can chroot to some more 64 bit installations. This is what I do:

Either install debian from the Installer in a new partition or use debootstrap to build a debian in a new partition. Then mount the partitions as the HOWTO and then chroot to that partition. The big puzzle is getting the mounts setup and the bind mounts before trying to chroot.

Or boot the new debian and chroot to ubuntu.

Superuserman

bind mount in 32bit chroot 

Newsgroups:  gmane.linux.debian.ports.amd64
Date:        Thu, 03 Mar 2005 18:07:23 -0500
> The "bind mount" section in the faq is not clear. I still have things that
> I don't understand.
>
> I understand in the chroot environment, at least the following has to be
> bind mounted:
>
> /home
> /tmp
> proc
>
> The faq then goes on:
>
> ,-----
> | Then mount them:
> |
> | mount /var/chroot/sid-ia32/home
> | mount /var/chroot/sid-ia32/tmp
> | mount /var/chroot/sid-ia32/proc
> `-----
>
> This is not clear. Should I do it in the chroot environment, or out side
> it? If I should do it in the chroot environment, isn't that
>
> "mount /home", etc, much clearer?

You have to do it outside because from inside the chroot you cannot see —the external— /home. Therefore while outside the chroot you bind /home to /var/chroot/sid-ia32/home, as from outside you can see both mount points.

> Q2, how about devices, Shouldn't /dev be bind mounted?

Apparently not, your chroot should have the devices created. I don't know what the reason is though, so if somebody can enlighten us here we would both learn something new :)

> Q4: I have various volumes mounted below /lfs:
>
> /dev/sda13 on /lfs/cache11 type reiserfs (rw)
> /dev/sda14 on /lfs/cache12 type reiserfs (rw)
> /dev/sda15 on /lfs/cache13 type reiserfs (rw)
>
> To access them in 32bit chroot, should I bind-mount only one /lfs, or each
> volume individually?

You need to user "rbind" mounts if you wish to only mount /lfs and get all the submounts as well.

> Both "bind mount" and "chroot" are new to me. Please help.

So are to me. Fortunately they have really fine manpages/documentation.

Disclaimer: I haven't tested the rbind scenario, I'm just reading that part from the mount(8) manpage as I write.

Javier Kohen

bind mount in 32bit chroot 

> >Q2, how about devices, Shouldn't /dev be bind mounted?
>
> Apparently not, your chroot should have the devices created. I don't
> know what the reason is though, so if somebody can enlighten us here we
> would both learn something new :)

Several reasons to bind mount /dev:

  1. /dev does not contain only devices (unfortunately) it also contains some named pipe and some named sockets:

    %ls -l /dev  | grep '^[psd]'
    prw-r--r--    1 root     root            0 mar  4 01:18 gpmdata
    prw-------    1 root     root            0 jan 21 18:49 initctl
    srw-rw-rw-    1 root     root            0 jan 21 18:50 log
    prw-r-----    1 root     adm             0 mar  3 13:38 xconsole

    The named pipes in the chrooted /dev and in the base /dev are unrelated. (You can read on one what is written to the other.) However, you can mount —bind each pipes separatly instead of the whole /dev directory.

    For example if you run a 64 bit gpm repeater and a 32 bit Xserver, the Xserver will not be able to read the (non-chroot) /dev/gpmdata. Syslog will be broken in the chroot, etc.

  2. You would have to take care of mounting devpts on both /dev/pts.

  3. The tmpfs filesystems on both /dev/shm are unrelated. You will not be able to use shm for communicating between the chroot and the base.

  4. Some programs can create devices dynamically. In this case you will have to create them manually in the 'other' /dev.

  5. If you run the same debian release in the chroot and outside, using the same /dev will save you the trouble to take care of permissions and symlink, etc.

Bill Allombert

bind mount in 32bit chroot 

> > Q2, how about devices, Shouldn't /dev be bind mounted?
> I'm not sure about this, but I think this is processed when creating the
> chroot.

This is true, though I think there are 2 options:

  1. let the debian process create /$CHROOT/dev, then remove any junk you don't need (since it's eating inodes).

  2. let debian create the /$CHROOT/dev. Then, rm -rf /$CHROOT/dev and bind mount to the master /dev so 32-bit processes can, e.g., access USB and other hotplug devices.

Stephen Waters

How do I bind mount removable media to my 32 bit chroot 

Newsgroups:  gmane.linux.debian.ports.amd64
Date:        Wed, 16 Mar 2005 10:16:52 GMT
> I have openoffice running in a 32 bit chroot and things are working smoothly,
> except that it can't open files on removable media, because it only has bind
> mounts to /tmp and /home.
>
> I tried adding a bind mount for the directory in /media, but then I had
> trouble mounting and unmounting the removable media as an ordinary user.
>
> Any ideas - or is there something else I should be doing and not mucking about
> with this approach at all?

I had this problem running Cedega in a chroot, accesing CD-Roms etc.

What I did might work for you:

  1. comment out the mounts in /etc/fstab to do with whatever device you want mounted in the chroot. (and unmount if its already mounted)

  2. put entry similar to this in your /var/chroot/sid-ia32/etc/fstab (or whatever your chroot directory is):

    /dev/hdc        /mnt/cdrom      iso9660 ro,users,noauto 0       0

    ** make sure the mount point exists in the chroot (i.e. mine is /var/chroot/sid-ia32/mnt/cdrom )

  3. insert your media, and "mount /mnt/cdrom" when you're in your chroot (you should be able to do it as a user now, but you might need to set permissions of /dev/hdc and /mnt/cdrom — and I cant remember what these are.

Once you've done this, you should be able to mount/unmount from within the chroot fine. I used to have it set up as a bind, and it didnt work, but this worked for me.

James

How do I bind mount removable media to my 32 bit chroot 

> > Once you've done this, you should be able to mount/unmount from within
> > the chroot fine. I used to have it set up as a bind, and it didnt work,
> > but this worked for me.
>
> Maybe what you guys want is a rbind mount.

Thanks - rbind mount does the trick!

Robert King

Setting up 32-bit chroot? 

> I am a linux newbie, and I was just wondering if anyone would give me
> directions on how to set up and use a 32-bit chroot, on ubuntu-amd64, so
> that I can run apps that won't run natively on 64-bit?

Start from here, if you haven't, https://alioth.debian.org/docman/view.php/30192/21/debian-amd64-howto.html

Setting up 32-bit chroot? 

Here's another: http://www.ubuntuforums.org/showthread.php?t=2740&highlight=chroot

Dylanby

Setting up 32-bit chroot? 

Direct link for above

http://digital-conquest.ath.cx/wiki/index.php/Ubuntu#Building_a_clean_32bit_chroot_with_debbootstrap

valadil

32bit chroot usage 

http://www.ubuntuforums.org/showthread.php?t=9428

> To those people that are running a 32bit chroot on AMD64.
>
> Could you please post some examples on how you install native Linux games &
> apps into your chroot & then how you go about launching them?

You can type dchroot -d "command" and it executes that command in the chroot.

I have this script do_chroot in /usr/local/bin:

#!/bin/sh
/usr/bin/dchroot -d "`echo $0 | sed 's|^.*/||'` $*"

Then I create a symbolic link from that to the command I want to execute in the chroot, e.g.:

ln -s /usr/local/bin/do_chroot /usr/local/bin/firefox

which will execute firefox in the chroot environment when I launch it in my normal 64 bit environment. To launch my amd64 firefox I can type /usr/bin/firefox.

Instead if you want you can just create a script for launching the 32bit firefox e.g.:

#!/bin/bash
dchroot -d "firefox"

put it in /usr/local/bin and add it to the gnome menu.

If you're going to start a program that only works in 32bit, first type dchroot -d and you'll be in the 32 bit environment.

ahyden