My introduction

Hello Ubuntu Community!

My name is Aneesh Lingala!

I am currently at my ARM Chromebook running Ubuntu Unity to write this.

I started using Ubuntu when I was 8. The first version I used is Focal Fossa. I am now 11 years old.

I want to get Ubuntu to all kinds of computers, from random laptops, to ARM Chromebooks.

If anyone has a spare ARM Mediatek MT8183 Chromebook that they can test Ubuntu Unity on, please reply to the topic Ubuntu Unity ARM Chromebook Port v22.04.

5 Likes

This looks amazing! I’m certain you’ll find testers in the Ubuntu Unity Telegram group. Once a few users have tested it on other hardware, I’ll make sure to add links to your repo on ubuntuunity.org :slight_smile: It’s great to see young people like you continuing to join the Ubuntu community.

I inspected the images you’re using as the base (https://github.com/hexdump0815/imagebuilder), and hacked together a tiny little builder you could adapt. I hope of this is of help to you. You’ll need to choose between using a chroot or systemd-nspawn for making changes to the root filesystem, and I’ve provided examples for both (so just comment out the other one). I recommend using systemd-nspawn as it should take care of all the mounts for you.

This should remove the need for you to build images by hand, and should produce ready-to-use images without the need for multiple stages.

# $MNT should be set to any temporary directory for mounting the root filesystem.
# Similarly, $IMAGE should be set to the path to the original image (.img) you're building upon.

mkdir -p $MNT
OFFSET=$(parted "$IMAGE" unit b print | grep "btrfs" | awk '{ print substr($2,0,length($2)-1) }')
mount -o loop,offset="$OFFSET" "$IMAGE" "$MNT"

########################################
# Option 1: use chroot (not recommended)

mount -t proc /proc "${MNT}/proc/"
mount --rbind /sys "${MNT}/sys/"
mount --rbind /dev $MNT/dev/
mount --rbind /run $MNT/run/

chroot "${MNT} /bin/sh" <<EOF
# Any commands go here.
echo "Hello from  chroot!"
EOF

umount $MNT/proc
umount -l $MNT/sys
umount -l $MNT/dev
umount -l $MNT/run

########################################

########################################
# Option 2: use systemd-nspawn (recommended)

systemd-nspawn --bind "/etc/resolv.conf" -D "$MNT" -- echo -n "Hello"
systemd-nspawn --bind "/etc/resolv.conf" -D "$MNT" -- echo -n "world!"

########################################

# Image generation.

cd $CURRENT_DIR
umount -l $MNT
rmdir $MNT
mv $IMAGE "ubuntu-unity-chromebook.img"
md5sum "ubuntu-unity-chromebook.img" > "ubuntu-unity-chromebook.img.md5sum"
rm -f "ubuntu-unity-chromebook.img.xz" && xz -k "ubuntu-unity-chromebook.img.img"
md5sum "ubuntu-unity-chromebook.img.xz" > "ubuntu-unity-chromebook.img.xz.md5sum"
1 Like

Thanks for the builder! I am currently getting it adjusted to my needs.

1 Like

I was not able to get the builder working good, however, I have adjusted my current builder at https://github.com/chromebook-unity/create-usb, by adding a script to upgrade to the latest LTS or LTS Devel (23.04, 23.10, etc.) release

And also, please reply to this page, Ubuntu Unity ARM Chromebook Port, not this page, from now on.

Thanks!

1 Like