Home Linux Community Forums Software Installation Using debootstrap for install X86 -> ARM

Using debootstrap for install X86 -> ARM

Link to this post 09 Feb 10

Hi all!

At work they gave me the following task (and i need some help from you guys!):

At work we have a normal PC running Ubuntu 9.10 (32-bit), which works good.
We also have a LaCie Ethernet Disk Mini v2, which runs embedded Linux (RedHat), but is so trimmed down, you can't use the disk we would like to use it.

The task is this: On the X86 machine, make a bootable image for the ARM architecture and write it to a harddisk (which fits the LaCie offc.) so it can boot off it.

Now i have done some investigation, but don't know how to combine it all:

- I can use debootstrap to create a minimal Debian system, but there comes the problem, you can't chroot into a foreign created system (i.e. X86 cannot chroot into ARM system).
- I can use QEMU, which can emulate a ARM processor, but can i use the image that QEMU uses as a normal image for a harddisk, so it would boot off it (when using dd to write it to a real harddisk)?
- Current kernels support the LaCie hardware (Marvell chipset)
- I know how to use tools such as dd, so if the image is generated i can write it to disk and have the LaCie boot from it.

The LaCie box has the following:
1 ARM9 ARMv5TEJ (266 MHz) CPU with 64 Mb RAM, Gigabit network controller and 1 usb host port, internal there is a sata port obviously.

The only thing i want at the moment is to have the LaCie boot Debian and i can SSH into it, from there the rest is easy as pie.

Is someone willing to help me accomplish this task? It would seriously mean and help alot!

If all goes well and if i get all things up and running i would like to make a Howto of it and place that here, maybe it will be of some use !

Link to this post 10 Feb 10

Is this what you want to do?

Otherwise, you may want to consider a smaller distro, like Angstrom ( or you'll have to compile a cross compiling tool chain and build your own packages and distribution essentially using something akin to OpenEmbeded.

Link to this post 10 Feb 10

Thanks for your reply!

It looks very useful, but i have a question about it:

The device does not have a screen or keyboard to attach to it, but i've read the EmDebian howto and it's focussed on the fact that the device should boot from NFS, which i think the LaCie box does not support, or am i getting something wrong?

I've set up the first stage of debootstrap, which leaves me with a folder with basic Debian installed, i need to copy it over and do a chroot, but i can't chroot on the LaCie box, since it has not that utility, so there i am stuck again :(.

The howto speaks of QEMU, however, nowhere in the tutorial it is being used.

Should i create a ARM VM in QEMU and then run the processes again?

Link to this post 12 Feb 10

That is exactly how I would approach this. I would build the entire thing on the x86 machine first, using QEMU to run and test the ARM code. Once you have successfully created a working installation, then I would go ahead and copy it over to the lacie. Unfortunately, I've never used a LaCie, but I have done something similar in the past with other headless hardware.

Link to this post 12 Feb 10

Ok, I read up a bit mroe about the device you have. I think you're not facing a trivial task :(
I foudn this article where someone essentially had to remove the disk from the unit and mount it in their pc to be bale to make modifications:
If you are OK with voiding the warranty, this is the way to go, since there doesn't seem to be a serial port on the boar (again I don't have one of my own to examine). So, essentially, do the debbootstrap thing, and start to build an image on youe x86 w/ apps for ARM. you should be able to get away w/ not having to cross compile everything, since Debian support arm, and has binary packages. Once you have *most* of it working, you'll need to create a disk image and copy your new system into that disk image. The image will essentially just be a file holding a partition. If you don't know how to do this, let me know, and I'll explain. Then, you will need to use that disk image as a disk for QEMU if you want to test it first. The only thing I'm fuzzon on is the boot loader. You want to examine the first 512 bytes of the disk that shipped with the device to see if you can determine what boot loader it uses. If it's grub, you should be able to install it into your created disk image using QEMU. If it's not, well, things can get a little more tricky.

good luck, and keep me posted. I'm curious.

Link to this post 12 Feb 10

one more thing. In the ubuntu repository, there is the following package that might be of help you, too:

qemu-arm-static - - static qemu-arm binary that enables to use arm chroots

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Linux Training / Board

/** BC-056 Ameex changes to add tracking code - 2016-01-22 **/ ?>