[buildd-tools-devel] Not Multi-Arch-able?

Thorsten Glaser t.glaser at tarent.de
Tue May 21 15:40:24 UTC 2013


On Tue, 21 May 2013, Thorsten Glaser wrote:

> I’m running an amd64 kernel on an i386 system so that I can
> virtualise amd64 machines, but the amount of RAM allocatable
> cannot be raised to the necessary value.

Got a workaround. I was actually surprised it works.

/etc/schroot/schroot.conf (partial):
-----BEGIN cutting here may damage your screen surface-----
[sid-amd64]
description=Debian sid/amd64 (unstable)
type=directory
directory=/home/AMD64
root-users=libvirt-qemu,tglase,root
#personality=linux64
command-prefix=linux64,eatmydata
setup.fstab=fstab.qemu
-----END cutting here may damage your screen surface-----
Note how schroot has a linux32 personality but no linux64 one…
but it works like this, uname -p in the chroot is x86_64 while
i686 outside (correctly).

/etc/schroot/fstab.qemu ⇒ /etc/schroot/default/fstab plus:
-----BEGIN cutting here may damage your screen surface-----
/var/lib/libvirt /var/lib/libvirt none  rw,bind         0       0
-----END cutting here may damage your screen surface-----

/usr/local/bin/qemu-in-chroot (chmod +x):
-----BEGIN cutting here may damage your screen surface-----
#!/bin/sh
exec schroot -c sid-amd64 -u root -- qemu-system-x86_64 "$@"
-----END cutting here may damage your screen surface-----

And, in the Domain XML:
-----BEGIN cutting here may damage your screen surface-----
  <devices>
    <emulator>/usr/local/bin/qemu-in-chroot</emulator>
-----END cutting here may damage your screen surface-----


And in case someone wants my wonderful setup with an amd64
kernel on an otherwise *working* i386 system:

sudo dpkg-divert --local --rename \
    --divert /sbin/init.real --add /sbin/init

/sbin/init (chmod +x) is then:
-----BEGIN cutting here may damage your screen surface-----
#!/bin/mksh-static
exec /usr/bin/linux32 /sbin/init.real "$@"
-----END cutting here may damage your screen surface-----

And in /etc/init.d/libvirt-bin just prepend “linux64”
before every (not really needed, but safe) invocation
of “start-stop-daemon”.


HTH & HAND,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-314
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Boris Esser, Sebastian Mancke



More information about the Buildd-tools-devel mailing list