Updating Initramfs Configuration - Installation Failure

I have created the following partitions for an AdGuard virtual machine:

  • /boot: 2GB
  • /: 6GB
  • /var: 12GB
  • /var/log: 3GB
  • /var/log/audit: 500MB
  • /var/tmp: 500MB
  • /tmp: 5GB
  • /home: 3GB

Kernel version installed: 5.15.0-56-generic (only one kernel present in /boot partition)
SHA256 checksum and ISO image used: 10f19c5b2b8d6db711582e0e27f5116296c34fe4b313ba45f9b201a5007056cb *ubuntu-22.04.1-live-server-amd64.iso

Note that the /boot partition is NOT FULL. 20MB of disk space were taken up by only a single Linux kernel out of 2GB of total disk space for the /boot partition and the installer does not install multiple kernels, so my search online turned up nothing for me.

Steps to take in order to chroot into my server:

sudo -i # to gain as root (no password)
mount -o bind /dev /target/dev
mount -o bind /proc /target/proc
mount -o bind /sys /target/sys
chroot /target /bin/bash

After I chroot into the target root partition, I then executed the following:

update-initramfs -u -k 5.15.0-56-generic

The output is as follows:

update-initramfs: Generating /boot/initrd.img-5.15.0-56-generic
cpio: write error: no space left on device
E: mkinitramfs failure cpio 2
update-initramfs: failure for /boot/initrd.img-5.15.0-56-generic with 1

I typed this out manually from the output console of Proxmox VM.

Pardon me if I am trolling here, but do I really need at least 5GB of disk space for /boot in order for the Subuiquity installer to generate an initial RAM disk image? I have never had any problems like this in Debian.

Update: I do not know if this is relevant, but when I did a search for the following on StartPage:

linux update-initramfs no space left on device installer “single kernel”

My findings lead me to this article:

I followed the instructions at the top by adding MODULES=dep to /etc/initramfs-tools/conf.d/modules followed by update-initramfs -u -k 5.15.0-56-generic and it worked! My total disk space for /boot is now 73MB. I’m going to give my Ubuntu Server a reboot (although I might have to add a password for the root user). Here’s hoping…

Update 2: The installation is not complete. Looks like I may have to install the GRUB bootloader into the virtual hard drive. (sigh)

Update 3: OK! It worked! I had to remount all the partitions that I created during the installation and install the GRUB bootloader. Once I’ve done that, I can now boot into the Ubuntu Server installation. Not pretty, but I felt like I did this “The Arch Way” and it worked! Now I just need to create a new user that the installer did not create and I am good to go.

Update 4: Also, I’ve had to edit the /etc/locale.gen and /etc/locale.conf files for language selection and that went okay. Plus, I’ve had to remove the CD-ROM repository and the /etc/apt/source.list become empty. Even then, I am able to update all the packages, reboot the server, and everything is working. And that’s what I call it “The Arch Way.” :smiley: