[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Running a ia32 system on debian amd64 system



On Wed, Jul 15, 2009 at 07:53:58AM -0500, Kumar Appaiah wrote:
> On Wed, Jul 15, 2009 at 02:41:00PM +0200, Mathieu Malaterre wrote:
> > > Please try adding the following to your /etc/fstab
> > >
> > > /home   /mnt/lenny/home none    bind      0       0
> > > /tmp    /mnt/lenny/tmp  none    bind      0       0
> > > /dev    /mnt/lenny/dev  none    bind      0       0
> > > /proc   /mnt/lenny/proc none    bind      0       0
> > 
> > In my previous email I included the output of the 'mount' command
> > which showed that /dev was properly mounted. Again here it is with
> > only the chroot part:
> > 
> > $ mount | grep lenny32
> > /home on /mnt/lenny32/home type none (rw,bind)
> > /tmp on /mnt/lenny32/tmp type none (rw,bind)
> > /media/cdrom0 on /mnt/lenny32/media/cdrom0 type none (rw,bind)
> > /dev on /mnt/lenny32/dev type none (rw,bind)
> 
> Argh. Really sorry, I guess I'll have to take more time to read
> carefully before hitting reply! :-)
> 
> > 
> > Searching on internet I found the gentoo tutorial:
> > 
> > http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=2
> > 
> > Apparently on this tuturial both /dev AND /dev/pts are mounted:
> > 
> > ...
> > Code Listing 3.2: Mount virtual file systems
> > 
> > # mount -o bind /dev /mnt/gentoo32/dev
> > # mount -o bind /dev/pts /mnt/gentoo32/dev/pts
> > # mount -o bind /dev/shm /mnt/gentoo32/dev/shm
> > ...
> > 
> > Is there a chance that this turial is missing that ?
> 
> Possibly. Unfortunately, I am not near my schroot now, so I can't
> refer to my settings at the moment. If someone else doesn't diagnose
> your problem till quite a while, or you are unable to get things going
> perfectly (both unlikely), I'll share my settings with you when I get
> back to my machine.

One suggestion (from the author) is that you might want to check
the chroot type.  If you have type=plain, you won't get automatic
filesystem mounting.  If you change to type=directory, then you
will get /dev, /dev/pts, /home, /proc, /sys etc. automatically
mounted for you (but existing mounts won't be visible).

Check out /etc/schroot/mount-defaults and also
/etc/schroot/scripts-defaults to see which config files are being
used.

This doesn't explain why they filesystem appear mounted on the host
and yet aren't there when you enter the chroot.  This does not
make sense, since I use this setup with type=plain and it all works
fine.  Note that if type=directory, it mounts the filesystem with
--bind (not --rbind) so any other sub-mounts will not be visible.

To check what's going on here, run schroot to enter the chroot,
and then in another shell, check /proc/mounts to see what's
getting mounted.  Note for type=directory, you will be in
/var/lib/schroot/mount/<session-id> *not* your chroot location.
Your chroot is rebound under here, which is why the sub-mounts are
missing.  schroot /should/ be doing its own mounts under here in
any circumstances, so this doesn't explain why it's not working,
but may help to understand what is going on in some part.

I would recommend using type=directory, but type=plain will work
if you want to set everything up by hand.

Note you can run schroot with -v to get more detailed output
about the chroot setup, and (if you want all the detail) you
can add --debug=notice to get all the information there is
(but this is likely overkill).

BTW, if you have any suggestions for documentation improvements,
just let me know.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.


Reply to: