qemu and chroot
Erez D
erez0001 at gmail.com
Tue May 20 09:30:46 IDT 2014
On Tue, May 20, 2014 at 9:24 AM, Baruch Siach <baruch at tkos.co.il> wrote:
> Hi Erez,
>
> On Tue, May 20, 2014 at 09:14:16AM +0300, Erez D wrote:
> > I am using centos 6 and developing for an armel platform
> >
> > i created a rootfs using multistrap/debbootstrap
> >
> > i copied qemu-arm-static to rootfs/usr/bin/qemu-arm-static
>
> Is this QEMU built for your host (presumably x86) or your target (ARM)?
>
obviously for my host
>
> Do you really need to run QEMU on your target?
>
no, my target runs armel natively, my host uses qemu-arm for that
>
> > and i was astonished that doing just 'chroot rootfs' worked, without
> > explicitly telling 'chroot' to use qemu-arm-static - somehow it decided
> > automatically to run everything under qemu-arm-static without me telling
> it
> > to.
> >
> > after a restart of the server. rootfs does not work anymore
> automatically,
> > i get a "chroot: failed to run command `/bin/bash': Exec format error"
> > doing "chroot rootfs /usr/bin/qemu-arm-static /bin/bash" does chroot, but
> > i get : "bash: /bin/cat: cannot execute binary file" (although
> > rootfs/bin/cat is a perfectly ok armel binary, tested on the armel
> target).
> > i also checked the md5sum of the rootfs/qemu-arm-static binary, and it
> is ok
> >
> > i mounted the rootfs on the armel target using nfs, and chrooted from the
> > target, and it works perfectly, meaning there is nothing wrong with the
> > rootfs filesystem
>
> Chrooted from what target? Is it a hardware ARM system? QEMU?
>
my target is armel and it chrooted to rootfs dir and ran the armel code
natively,just to show that the rootfs a valid armel rootfs.
>
> baruch
>
> > as it wonderously worked, now it wonerously doesn't
> >
> > tryed googleling for it , but still cant find how to make it work
> >
> > any idea ?
>
> --
> http://baruch.siach.name/blog/ ~. .~ Tk Open
> Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
> - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20140520/11597e29/attachment.html>
More information about the Linux-il
mailing list