Þann Föstudagur 9. september 2005 19:44 skrifaði Lennart Sorensen:
> On Fri, Sep 09, 2005 at 07:32:10PM +0200, Gudjon I. Gudjonsson wrote:
> >    I have set up a sarge amd64 system in a chroot on my computer to run
> > matlab and cadence there. I tried to add /var/chroot/sarge-amd64/.../lib
> > into ld.so.conf and not so surprisingly, nothing worked after ldconfig.
> > Does anyone know how to avoid library conflict in this case?
>
> If you run 64bit normal system and 64bit chroot, yeah that could cause
> problems.  The ld.so.conf stuff is only for mixing 32/64 together.
>
> >    Matlab wants to access some device on my computer. Is it ok to mount
> > the /dev directory into chroot with bind?
> >    Hope my questions are not too silly.
>
> bind mounting /dev and /home is generally a good idea for the chroot.
> mounting /proc is also required (no bind needed of course).
> /tmp may also make sense to bind mount since some things use sockets in
> /tmp.
>
> Len Sorensen
Thanks for the answer. Now matlab starts halfway and exits with the following 
commands:
[EMAIL PROTECTED]:~$ dchroot -c amd64 -d matlab
(amd64) matlab
??? MATLAB was unable to open a pseudo-tty: No such file or directory [2,1]
The unix() and ! commands will not work in this MATLAB session.  Other
commands which depend upon unix() and ! will also fail.  Your system may
be running low on resources.  If the problem persists after a reboot,
check with your system administrator and confirm that your pty subsystem
is properly configured.

 Failed to start the Desktop: Unable to register Command Window
dchroot: Child exited non-zero.
dchroot: Operation failed.

I searched for pseudo-tty and found the following email:
http://lists.debian.org/debian-user/1997/07/msg00312.html
and from that I did the following
for i in /dev/pty* ; do fuser -v $i ; done
The result in sarge-amd64 is:
mve035:/home/gudjon# chroot /var/chroot/sarge-amd64/
mve035:/# for i in /dev/pty* ; do fuser -v $i ; done
/var/chroot/sid-ia32/home: No such file or directory
/var/chroot/sid-ia32/home: No such file or directory
/var/chroot/sid-ia32/home: No such file or directory.......
and so on
but in sid-ia32 it is
mve035:/home/gudjon# chroot /var/chroot/sid-ia32/
mve035:/# for i in /dev/pty* ; do fuser -v $i ; done
/var/chroot/sarge-amd64/home: No such file or directory
/var/chroot/sarge-amd64/tmp: No such file or directory
/var/chroot/sarge-amd64/dev: No such file or directory
/var/chroot/sarge-amd64/proc: No such file or directory
/var/chroot/sarge-amd64/home: No such file or directory
/var/chroot/sarge-amd64/tmp: No such file or directory.......

My /etc/fstab looks the following way:
proc            /proc           proc    defaults        0       0
/dev/sda6       /               ext3    defaults,errors=remount-ro 0       1
/dev/sdb1       /home           ext3    defaults        0       2
/dev/sda5       none            swap    sw              0       0
/dev/hdc        /media/cdrom0   iso9660 ro,user,noauto  0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
/dev/sdc1       /media/usb0     auto    rw,user,noauto  0       0
# ia32 chroot
/home           /var/chroot/sid-ia32/home none  bind            0       0
/home           /var/chroot/sarge-amd64/home none  bind            0       0
/tmp            /var/chroot/sid-ia32/tmp none   bind            0       0
/tmp            /var/chroot/sarge-amd64/tmp none   bind            0       0
/dev            /var/chroot/sarge-amd64/dev none   bind            0       0
proc            /var/chroot/sid-ia32/proc proc  bind        0       0
proc            /var/chroot/sarge-amd64/proc proc  bind        0       0

I tried to comment sid-ia32 out of fstab but it did not help. The change is 
that 
mve035:/home/gudjon# chroot /var/chroot/sarge-amd64/
mve035:/# for i in /dev/pty* ; do fuser -v $i ; done
does not give any output but matlab crashes as before.

Thanks
Gudjon

Reply via email to