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

Re: cross install 64bit target from 32bit host



On Fri, May 27, 2016 at 07:50:05PM +0200, Sven Joachim wrote:
> On 2016-05-27 13:28 -0400, Haines Brown wrote:
> 
> > I'm doing a cross installation. The host system is Wheezy 32 bit, and
> > the target is Jessie 64 bit. So I run this:
> >
> >   # debootstrap --no-check-gpg --arch=amd64 --foreign jessie /mnt/debian ...
> >
> > This sucessfully installed first stage files. Then I go to chroot into
> > the target disk and get:
> >
> >   # LANG=C.UTF-8 chroot /mnt/debian /bin/bash
> >   chroot: failed to run command `/bin/bash': Exec format error
> >
> > I gather the problem is that I'm trying to run 64bit bash code with a
> > 32bit chroot application. How does one then do a cross install a 64 bit
> > operating system with a 32-bit host machine? I did not find help in the
> > chroot manual.
> 
> If possible, install and boot a 64-bit kernel (you don't need the
> --foreign option for debootstrap then).  If your current processor is
> not capable of that, try qemu-user-static.

Thanks, Sven. The bottom line seems to be that it cannot be done without
rebooting the system. I suppose my CPU (Core i7-4790K) can handle an
installation of a 64-bit kernel in a new bootable primary partition
created for that purpose (if that is what you meant), but that still
involves rebooting. If I have to reboot I might as well simply install
the 64 bit system directly to the target disk from a netboot ISO.

Haines


Reply to: