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!
To create ARM64 usable chroot you have to copy special QEMU static virtualization executable to it.
Use commands below:
and continue inside chroot.
Useful links to read: