• Rabeeh Khoury's avatar
    Different method to install ubuntu rootfs · 914af8a1
    Rabeeh Khoury authored
    Previously multistrap was used to download and create an ubuntu rootfs;
    but multistrap failed under docker build since it required binfmt
    installed.
    
    This technique of installing ubuntu rootfs is totally different method,
    takes more time to build but works under the native runme.sh script and
    under docker build.
    
    The method idea is -
    1. Build a simple rootfs with a kernel that can be booted via
    qemu-system-aarch64.
    2. Install an initi script called S99bootstrap-ubuntu.sh under
    /etc/init.d.
    3. Run a qemu-system-aarch64 virtual machine with 1GByte of system
    memory and use cortex-a57 which is the closed to cortex-a72,
    virtualization wise and has the buildroot rootf as initrd and the
    destination ubuntu-core.ext4 partition as a drive.
    4. The VM would boot the kernel, mount the rootfs and run the
    S99bootstrap-ubuntu.sh script
    5. The script would download an ubuntu base image and then 'apt install'
    in a virtual chrooted environment the reset of the packages to make this
    rootfs to be bootable.
    6. Use 'reboot' in the VM which triggers the '-no-reboot' flag for qemu
    that makes the vm exit; and thus installation is continued.
    7. ubuntu-core.ext4 partition is now ready to be used further on for
    imaging and installations.
    Signed-off-by: default avatarRabeeh Khoury <rabeeh@solid-run.com>
    914af8a1
runme.sh 17.8 KB