How is the Lubuntu system created?

I’ve been wondering about this for a while How do you create the complete lubuntu system from the packages, to the theming to the custom installer. Do you use something like cubic? Or is there another way?

I’ll just provide some thoughts…

Lubuntu is an official flavor of Ubuntu, thus really it’s a Ubuntu system, created by Ubuntu infrastructure, built by the same identical process as builds Ubuntu Desktop & other Ubuntu products.

Our seed file is what determines what packages are included on the Lubuntu ISO.

eg. https://ubuntu-archive-team.ubuntu.com/seeds/lubuntu.noble/desktop

You’ll note that the included packages differ to say a Ubuntu Desktop seed - https://ubuntu-archive-team.ubuntu.com/seeds/ubuntu.noble/desktop

I’ve greatly simplified this, as there is more than single seed file involved, but you can explore yourself using those URLs anyway to get a feel.

Our dailies are created automatically, but if we need to spin up a new daily to test a change that may fix a problem we have, we just login to the appropriate Ubuntu site & click the ISO we want to rebuild & Request a rebuild. This is all done on sites that are often referenced by myself & others on various support sites (& esp. this site); however few will see those Administration options as the login used determines what is shown (and most people aren’t logged in when they view sites used as reference, let along having the permissions for those options)

Seed files (and changes) can be examined on launchpad (eg. https://git.launchpad.net/~lubuntu-dev/ubuntu-seeds/+git/lubuntu_ ) or our own infrastructure (eg. Lubuntu/seed - seed - Lubuntu Git), but it’s Launchpad that Ubuntu uses for many of its tasks.

A ~reasonable link maybe https://phab.lubuntu.me/w/release-team/iso-building/ but that page isn’t public anymore, and I don’t have a link on lubuntu-wiki - Lubuntu Git that will help sorry. It was written by u/tsimonq2 and I could move it to this site or to our newer infrastructure



ISO Building

This page is meant to fully document all current knowledge about the Lubuntu ISO, including how it’s built, what the ISO is made of, and what tooling to look at to make changes if needed. Please add new information as you come across it.

ISO Build Process

The ISO build process is handled by several pieces of tooling. ubuntu-cdimage is the tooling which triggers the entire process. It interacts with Launchpad, handles ISO publishing, etc. livecd-rootfs is what handles the creation of the squashfs, and this is done on Launchpad itself. debian-cd, as forked by Ubuntu, is what handles wrapping up the squashfs and adding metadata. This section breaks down each part and their role.

Nusakan vs Launchpad

A common point of confusion is where the ISOs are actually built. The ISO images and the building of the final ISO is done on a machine called Nusakan, named after the second brightest star in the Corona Borealis. Canonical employees have direct SSH access to this machine and can use it to manually trigger builds, as well as doing final publishing.

The only thing Launchpad is used for is the building of the squashfs using livecd-rootfs. We very rarely trigger builds using Launchpad, but we do use it to view the logs of the livefs build.

Nusakan outputs its ISO building logs to https://people.canonical.com/~ubuntu-archive/cd-build-logs/ - here you can also find links to the livefs build within each respective build log. https://launchpad.net/~ubuntu-cdimage/+livefs/ubuntu/CODENAME/lubuntu/ will always give you the latest output of the livefs builds if you do not want to find the Nusakan logs first.

ubuntu-cdimage

What ubuntu-cdimage specifically handles is the creation of the index pages for each published ISO, and triggering of each build. The code can be found here, and if you ever need someone with direct SSH access to tweak something, file a bug against the project here. One example where we had to do this was updated CSS after our custom CSS was deployed.

debian-cd

Ubuntu’s fork of debian-cd takes the produced squashfs and wraps it up in an ISO file. The code can be found here.

In tools/boot/CODENAME/boot-ARCH is where you can find the boot parameters and entries for the ISOs. Of note are two boot parameters; maybe-ubiquity and only-ubiquity. Ubiquity then intercepts this and can act accordingly, however, they are fairly useless for us until Calamares gains that functionality.

In data/CODENAME/ you can find the theming for the boot menu on BIOS systems for the live CD. We recently customized this when the logo changed.

livecd-rootfs

livecd-rootfs handles the actual creation of the squashfs. This squashfs is not only the one that is used on the live CD, it is the initial image that is installed on the system prior to customization. You can find the code here.

Using livecd-rootfs, you can install files which are not in any package, and add customization scripts that are also not in any package.

Casper’s Role

Casper is a middle ground between customization done directly on the squashfs and ISO-level customization done by debian-cd. It is a set of scripts ran immediately after the ISO is booted which affects the squashfs only when viewed on the ISO and not on the installed system. This is where the live user is created, among other modifications. You can find the code here.

That paste from https://phab.lubuntu.me/w/release-team/iso-building/ was last edited 28-Sept-2019 so maybe a little dated

5 Likes

Thanks!

I’ve been trying to figure out how distributions are made, so this is useful!

1 Like

My provided thoughts make an assumption that everything we include is already in Ubuntu repositories; after all the Ubuntu ISO builders will only use Ubuntu repository packages!

Some useful links are

etc.

Thus the developers of Lubuntu (of which I’m not!) need upload rights. Being a flavor of Ubuntu, Lubuntu specific packages are found in universe or the community repository.

A Lubuntu developer can make changes to Lubuntu packages, a step above that is MOTU which allows uploads to universe packages, another step beyond that is Core-Dev etc. This link may provide additional helpful detail, though for Lubuntu specific advice, our modern wiki can be found here.

6 Likes