Netbooting the live server installer

Hi, our corporation uses the legacy netboot image for Focal. Recently something changed because the computers refuses to boot PXE with SecureBoot enabled.

After updating grubx64.efi & bootx64.efi the computers now boot into PXE menu but our entries have stopped working:

menuentry 'Deploy Ubuntu 20.04 LTS Desktop' {
                gfxmode $linux_gfx_mode
                linux /images/ubuntu/focal-20211013/amd64/linux $vt_handoff toram netcfg/choose_interface=enp0s31f6 url=http://pxe01.example.com/dev/pxe-boot/preseed/focal.seed auto=true hostname=unassigned nomodeset ---
                initrd /images/ubuntu/focal-20211013/amd64/initrd.gz
        }

We are using the initrd.gz & linux from the legacy netboot image. Are these no longer being updated? Is that why we get this error message:

error: /images/ubuntu/focal-20211013/amd64/linux has invalid signature.
error: you need to load the kernel first.

Any help would be appreciated. Not sure how we can use the live server image with a preseed file. Can’t find any documentation on that. I tried creating a entry for the live server image without a seed file. But then it wouldn’t download the 900MB ISO, it stalled at 405MB.

menuentry 'Ubuntu 20.04 Liveserver' --id ubuntu-server_1804 {
 linuxefi /images/ubuntu/focal-live-20220317/amd64/vmlinuz  ethdevice-timeout=30 ip=dhcp url=http://pxe01.example.com/dev/pxe-boot/focal-live-server-amd64.iso boot=casper ide=nodma debian-installer/language=de console-setup/layoutcode?=de
  initrdefi /images/ubuntu/focal-live-20220317/amd64/initrd
}

Error message:

(initramfs) focal-live-server-am 31% ####### | 405M 0:00:14 ETA
wget: read error: Connection reset by peer

In one of most frequent use-case, IT does not allow to run anything that does pxe/dhcp, or usually the server is the first server in a remote datacenter that is shipped without an OS. So dhcp/netboot is out of the question. I am half-away across the globe to setup a server. What works for me is a small netboot image that boots up and then downloads and install everything from the internet.

Have you guys ever tried to mount a 900mb iso on a 250ms latency link via idrac just to get the loading screen and select the nearest mirror ?

1 Like

Have you guys ever tried to mount a 900mb iso on a 250ms latency link via idrac just to get the loading screen and select the nearest mirror ?

I’m pretty sure they haven’t :frowning: I’m currently trying to boot the 22.04 server ISO via iLO over a link with 20 ms latency. The boot started about an hour ago and it’s still scanning the ISO (it’s at the step “A start job is running for casper-md5check Verify Live ISO checksums”) :man_facepalming:

3 Likes

I did this just this week (booting the ISO over a BMC using virtual media) with 22.04 on a couple machines ( not a production DC but in a lab remotely ). Because my connection is so bad (ADSL 20Mb/s down & 1.5Mb/s up), I have to set up an nfs or http source inside the lab, pull the ISOs in there and then add them as virtual media in the BMC to boot from.

Interestingly, I did that with a Lenovo XClarity controller and it was fairly fast and painless, but then did it with a Cisco CIMC and it mirrored what marianrh experienced, over an hour, maybe closer to 2 hours to boot, and then a lot longer to get through the installer due to the latency issues.

That was done on different days though, so it could well be that I just happened to hit a bad day when I did the Cisco one. And to be fair, almost all (like pretty much every one) of my installs are done using MAAS though, I was doing this to test a couple subiquity features on actual server hardware that I don’t have local to me.

2 Likes

Hi @vorlon!
Thank you for explaining why and how the new netboot images setup will differ from the previous method.
Do you know if the new netboot images for 22.04 are now released (and where)?

Hi, I’m about to start work on publishing the netboot artefacts more sensibly and just pasted the spec for the work here: [spec] Publishing netboot artifacts (after a bit of raging at discourse syntax). Please comment there with any thoughts about the contents!

1 Like

So, the basic idea is that now with 22.04…

  • every time we PXE, we have to download a 1.4GB file
  • we lost the well known preseed format for the debian installer
  • …so we now need to re-adapt/re-write every preseed file we ever used; edit: oh, and it behaves completely different in regards to interactive parts
  • …and if we have systems that automatically generate preseeds, we’ll have to re-write everything

This seems such a downgrade.

I’m struggling to understand how subiquity is in any way better than the old legacy installer.

2 Likes

Hi @vorlon,

We are trying to install Ubuntu 22.04 desktop on thousands of computers.

We are testing PXE to boot the live ISO for Ubuntu desktop. It works ok with a virtual machine that has 5GB of RAM. We boot the live ISO and install Ubuntu manually without problems.

But when tried on the same virtual machine with 4GB of RAM it errors with the message:
“Out of memory: Killed process 179 (system-udevd) total-vm:12144kB, anon-rss:1360kB, file-rss:2672kB, shmem-rss:0kB, UID:0 pgtables:56kB oom_score_adj:0”

It seems that with the Ubuntu 22.04 desktop ISO being 3.5GB in size, there is no RAM available to boot and load the ISO with just 4GB of RAM.

We can boot the server ISO with 4GB of RAM and then install ‘ubuntu-desktop’ as a package, but I suppose that this is not supported.

Is there any solution to install Ubuntu desktop 22.04 using PXE in computers with 4GB of RAM?

The approach we’re taking is to use the Ubuntu Server ISO to automate the install and in the cloud-init file, at the end run the following late command:

  • curtin in-target --target=/target – apt-get install -y ubuntu-desktop plymouth-theme-ubuntu-logo grub-gfxpayload-lists

The Ubuntu Server ISO is much smaller.

Minimum requirements for Ubuntu is:
Ubuntu Desktop Edition is:
2 GHz dual core processor
4 GiB RAM (system memory)
25 GB (8.6 GB for minimal) of hard-drive space (or USB stick, memory card or external drive but see LiveCD for an alternative approach)
VGA capable of 1024x768 screen resolution
Source: https://help.ubuntu.com/community/Installation/SystemRequirements

It seems that the desktop installer, even being based on the server installer (subiquity), has no autoinstall option by now:

https://github.com/canonical/ubuntu-desktop-installer/issues/16

A bit confusing, because in this page (https://www.molnar-peter.hu/en/ubuntu-jammy-netinstall-pxe.html) it says: " While Canonical announces autoinstall as a server installer, it can be used to install both server and desktop systems ."

So, the only way to autoinstall Ubuntu 22.04 by now seems to be (awkwardly!) using the server ISO.

2 Likes

The Ubuntu 22.04 LTS desktop installer is not based on subiquity. Automated installs with the desktop ISO continue to use the previous preseed configuration format.

2 Likes

Sorry @vorlon, I’m really confused.

This is the first phrase about the “Ubuntu Dektop Installer” at https://github.com/canonical/ubuntu-desktop-installer:

“This project is a modern implementation of the Ubuntu Desktop installer, using subiquity as a backend and Flutter for the UI.”

Perhaps this is a new installer that is not being used by now?

That is a next-generation installer which is not the installer used in 22.04.

1 Like

Thanks, @vorlon, for clarifying my confusion about the new desktop installer.

Another question. Is there any way to reduce the size of the desktop ISO?

We can not afford to ditch computers with 4GB of RAM. I’m thinking about opening the ISO and removing unused packages from the squashfs file using the information at https://help.ubuntu.com/community/LiveCDCustomization#Extract_the_Desktop_system

Is that a viable option?

1 Like

Reducing the size of the desktop ISO would be unsupported and out of scope for this forum.

1 Like

Then installing “ubuntu-desktop” from the server ISO is our only hope for computers with 4GB of RAM.

Is that option supported @vorlon?

2 Likes

Sorry to insist. I know this discourse page is for “Netbooting the live server installer”.

But the download page for Ubuntu Desktop has the “Alternative Downloads” link (https://ubuntu.com/download/alternative-downloads) that sends to this discourse page for the instructions for the “Network Installer”

With these instructions, the computers are supposed to netboot from a 3.5GB ISO, but that is not feasible with the 4GB of RAM that is the “recommended system requirement” for Ubuntu Desktop.

We have thousands of computers to install and usually do that remotely via netboot.

As tinkering to reduce the Desktop ISO size is not supported, the only way for us to continue using ubuntu is to install the desktop system from the server ISO.

Is that option supported?

2 Likes

It is July now… where would I find the PXEboot related files for 22.04 along with a clear explanation of how things have changed now and how to revise my pxeboot menus in order to install 22.04? What would be especially nice is if notes were included for the case where the DHCP/tftpd are provided from an 18.04 server (eg, would I be installing various packages into this? many examples seem to start off with a provisioning server that is 20.04 or later!)

Many thanks. I’m getting dizzy with my googlefu today o.O

3 Likes

I’ll try to be useful here, not just critical. Though, critical will come first.

Issue here is that this new way is escalating quickly. We started with 800MB ISO image just a “few” releases ago, and still working netboot image. Now we’re at 1.7GB ISO with 22.10 and no netboot image at all, just a link that eventually leads back here. After following this for 2 years I don’t understand where Canonical is going with this.

Now, to be helpful as well, for those that don’t like having 4GB PCs becoming obsolete, there is a know workaround, and I don’t know why there’s no mention of it here. It’s booting contents of the ISO via nfsroot.

EDIT: to make it clear, I’m talking about extracting or mounting ISO on NFS server, then serve the contents itself, which goes around the requirement of keeping whole ISO in RAM plus additional RAM to do the booting and installation procedure. Example, on local server in your network:

mkdir -p /mnt/ubuntu-22.10-live-server-amd64-iso-nfs/
mount /var/www/html/ubuntu-22.10-live-server-amd64.iso /mnt/ubuntu-22.10-live-server-amd64-iso-nfs/
nano /etc/exports
	/mnt/ubuntu-22.10-live-server-amd64-iso-nfs 10.10.1.1/24(ro,sync,no_subtree_check)
exportfs -a
systemctl restart nfs-kernel-server

I’ve been doing that with 20.04 and 20.10, and I tried that with 22.10 today and I get to installer, seeing subiquity lines and all. I tested with 2GB VM net-booting as well, and it gets to subiquity (didn’t bother to wait till end).

 LABEL UbuntuServer-22.10-auto-nfs
  MENU LABEL Ubuntu 22.10 Live Auto Installer from NFS
  KERNEL http://10.10.1.1/ubuntu-server-22.10/vmlinuz
  INITRD http://10.10.1.1/ubuntu-server-22.10/initrd
  APPEND netboot=nfs ip=dhcp nfsroot=10.10.1.1:/mnt/ubuntu-22.10-live-server-amd64-iso-nfs autoinstall ds=nocloud-net;s=http://10.10.1.1/ubuntu-server-22.10/

Anyway, I’m still in process of doing what I actually plan, that’s booting custom squashfs with PXE, something I did with 20.04/20.10, I do wonder though if I’ll be able to do that with 22.10. But I’m starting to think that switching to another distro would be less demanding task.

Hope my comment helps at least someone, I’m sure it won’t change the Canonical path anyway.

Another edit: Doing this from NFS will still download ~1.7GB from NFS server unfortunately, so if you’re booting 100’s or 1000’s of PCs it will still strain your network and your NFS server.

3 Likes