Score:3

how to make ubuntu install iso file for arm64 machine on x86-64 machine?

za flag

I'm trying to install ubuntu 18.04 on a qemu virtual machine which is a modified version of qemu's arm virt machine. I checked that I can install ubuntu 18.04 on arm virt machine as directed here, a very helpful page.
But when I try to install it on a modified machine, it fails, so I wanted to debug (follow) the ubuntu install procedures, if it's possible.
I thought I need to access the source code or scripts data for ubuntu install and found this interesting page for making ubuntu .iso file. (If I can compile some executable in debug mode and follow it, I might be able to see where the problem is.)
It tells me to use debootstrap command to extract all the bootstrap files to a directory. The command is below.

sudo debootstrap --arch=$ARCH $RELEASE chroot

I tried extracting for ubuntu 20.04 (focal fosa) because my ultimate goal is to install 20.04 on my virtual machine. So I tried sudo deboostrap --arch=arm64 focal chroot and it extracts the bootstrap data to directory chroot. The guide instructs me to install futher packages inside the chroot directory by entering bash with command sudo chroot chroot. But soon I found the bash executable inside the chroot directory is for arm64 when my host is amd64. I'm almost sure I need to do the job of installing ubuntu packages inside the chroot directory using an arm64 computer (whch I have one really) that can execute the bash and other arm64 binaries in the chroot file system. Is my understanding correct? And this page looks very old (talking about versions from 2011 or 2012). Can anyone direct me to a more up-to-date information? Thank you!

Score:2
zw flag

To create ARM64 usable chroot you have to copy special QEMU static virtualization executable to it.

Use commands below:

sudo apt-get install debootstrap binfmt-support qemu-user-static

sudo debootstrap --arch=arm64 focal chroot
sudo cp -av /usr/bin/qemu-aarch64-static chroot/usr/bin
sudo chroot chroot

and continue inside chroot.


Useful links to read:

za flag
That works like a charm! Thank you! I'll read your links.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.