Ubuntu Mate from scratch. How to?

I imagine the start of a Debian-based distro starts with debootstrap, which extracts the base files /bin, /lib, /usr, /etc. With a minimal base filesystem, then it's pretty much installing the packages, chroot style. Basic utilities like bash, nano, apt, but also things like the kernel, bootloader, libraries for networking, disks etc.

It'll be a separate process to create a "squashfs" image and build a bootable ISO. The Arch Linux 32 i486 (2022.12.01) CD is interesting/different, because the whole filesystem (/bin, /etc) is literally on the CD, read-only style (for low RAM PCs).

I learnt a bit from getting Arch Linux working in WSL (before it was officially an option) and building a custom ISO with archiso some years ago. It doesn't seem as complicated, since the concept of a base system, chrooting and "everything is a file" means it is possible to use run completely different distros :suse: :fedora: :arch: :ubuntu: :debian: on the same machine using containerisation tools like Docker. :whale:

If we were to go even further "from literally scratch", how do Debian/Ubuntu create the bootstrap? :package: No idea, but compilers would need compiling, to compile everything else.

Now, I don't actually know what system Ubuntu uses to generate images from scratch, but I imagine it'll be automated scripts, and the seeds per flavour as mentioned earlier.

:cd: Ubuntu MATE Remix ISO?

I'm not sure if Martin ever uploaded the script(s) that created the unofficial remix ISOs, or the PowerPC port. There is the Raspberry Pi build script, which might be more complex since it builds an image for a different architecture.

These could serve as an interesting one to study if they can be found.

:test_tube: Experiment

If you're wanting to play with the idea, you could mess with a lightweight distro like Arch Linux, since it's pretty well documented. Package wise, it starts with base depending on 28 packages - one of which is the filesystem, and the coreutils (see file list, it's the bare essentials like ls, echo, tty)

... or to stay within the Ubuntu world, bootstrap into a directory and chroot into it. I imagine it'll be like "Ubuntu Server" but extremely barebones. It has similar essentials provided in packages like base-files and coreutils

7 Likes