maruos / blueprints

Container builder for Maru OS.
Apache License 2.0
15 stars 12 forks source link

Some questions about "lxc_templates". #10

Closed Aloento closed 6 years ago

Aloento commented 6 years ago

20180223144744

What are these changes? Maru on the left and LXC-2 on the right. @pdsouza If I want to build my own image, I need to modify the template file?

Aloento commented 6 years ago

However, I try to build Debian successfully using any of the templates, but I did not test it on my phone because at the moment, Maru does not seem to be able to meet the everyday needs of the Nexus 5X. Obviously, armhf (32bit) is outdated, the vast majority of software requirements ARM64 or AMD64 (Metasploit,OpenVAS,etc.). So I'm not ready to test Maru for my Nexus5.

Aloento commented 6 years ago

Can I download pre-compiled Ubuntu? Let "build.sh" treatment? http://cdimage.ubuntu.com/ubuntu-base/releases/16.04.3/release/ubuntu-base-16.04.3-base-arm64.tar.gz Because it seems Ubuntu does not allow me to build ARM64 rootfs under AMD64. http://gnu-linux.org/building-ubuntu-rootfs-for-arm.html @pdsouza I think, to build to Ubuntu, there are a lot of things to do.

Aloento commented 6 years ago

Enter the Ubuntu rootfs, you need: Now in the rootfs directory.

apt-get install qemu-user-static cp /usr/bin/qemu-aarch64-static usr/bin cp -b /etc/resolv.conf etc/

Otherwise it will error: chroot: failed to run command ‘/bin/bash’: No such file or directory

Aloento commented 6 years ago

First of all, do not allow Ubuntu to build ARM64 directly on AMD64. Second, QEMU can not emulate urandom, so you can only use official sources. qemu: Unsupported syscall: 278 Debian's software name contrast Ubuntu is still different. Maru must complete all the preparatory work in order to install Maru's DEB, or APT will not be able to use. But I have done a lot, the victory is in sight.

apt install gnome-menus desktop-file-utils mime-support libc6 xserver-xorg xserver-xorg-video-dummy xinit lightdm xfce4 tango-icon-theme sudo rsync maru-mflinger-client xfce4-terminal xfce4-screenshooter lxtask vim ristretto

Aloento commented 6 years ago

I have built an incomplete Ubuntu16.04 ARM64. Can not build SSH (No urandom), can not install deb package "install"( No SSH), but has installed the package "Maru" and other things needed. Logically, it can be lxc start. How to install SSH and install? I think, rootfs into Nexus5X direct chroot on it.

Aloento commented 6 years ago

!/system/bin/bash

function mnt() { echo "MOUNTING" mount -o bind /proc ${2}proc mount -o bind /sys ${2}sys mount -o bind /dev ${2}dev mount -o bind /dev/pts ${2}dev/pts
chroot ${2} /bin/su -l } function umnt() { echo "UNMOUNTING" umount ${2}proc umount ${2}sys umount ${2}dev/pts umount ${2}dev } if [ "$1" == "-m" ] && [ -n "$2" ] ; then mnt $1 $2 elif [ "$1" == "-u" ] && [ -n "$2" ]; then umnt $1 $2 else echo "" echo "Either 1'st, 2'nd or both parameters were missing" echo "" echo "1'st parameter can be one of these: -m(mount) OR -u(umount)" echo "2'nd parameter is the full path of rootfs directory(with trailing '/')" echo "" echo "For example: ch-mount -m /media/sdcard/" echo "" echo 1st parameter : ${1} echo 2nd parameter : ${2} fi

pdsouza commented 6 years ago

@soarteam Have you tried building arm64 debian if you need 64-bit capabilities? Just use ./build.sh -b debian -n jessie64 -- -a arm64

Yes, it appears that Ubuntu needs more work. Perhaps you can try a prebuilt image from one of our users who has it working on Maru? See https://groups.google.com/forum/#!topic/maru-os-dev/hY1oM930BkU.

pdsouza commented 6 years ago

Closing this due to inactivity. Feel free to re-open if you need.