Default /boot size is too small on xgene/uboot systems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
New
|
Undecided
|
Unassigned | ||
linux-signed-hwe-5.8 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Issue found on ARM64 moonshot nodes
Steps to reproduce:
1. Deploy Focal on a moonshot ARM64 node
2. Enable proposed, install linux-generic-
3. Install udev package from proposed
It will fail with:
$ sudo apt install libudev1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
udev
The following packages will be upgraded:
libudev1 udev
2 upgraded, 0 newly installed, 0 to remove and 43 not upgraded.
Need to get 1390 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://
Get:2 http://
Fetched 1390 kB in 2s (872 kB/s)
(Reading database ... 112340 files and directories currently installed.)
Preparing to unpack .../udev_
Unpacking udev (245.4-4ubuntu3.6) over (245.4-4ubuntu3.5) ...
Preparing to unpack .../libudev1_
Unpacking libudev1:arm64 (245.4-4ubuntu3.6) over (245.4-4ubuntu3.5) ...
Setting up libudev1:arm64 (245.4-4ubuntu3.6) ...
Setting up udev (245.4-4ubuntu3.6) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for systemd (245.4-4ubuntu3.5) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for initramfs-tools (0.136ubuntu6.4) ...
update-initramfs: Generating /boot/initrd.
flash-kernel: installing version 5.8.0-51-generic
Generating kernel u-boot image... done.
Taking backup of uImage.
Installing new uImage.
WARNING: e4defrag of file //boot/uImage failed.
WARNING: Try freeing up disk space in /boot and retrying flash-kernel.
Generating initramfs u-boot image... done.
Taking backup of uInitrd.
Installing new uInitrd.
mv: error writing '//boot/uInitrd': No space left on device
run-parts: /etc/initramfs/
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned er
ror exit status 1
Errors were encountered while processing:
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
If you watch the df -h output closely, you will see the /boot filled up gradually until it's full:
/dev/sda1 488M 460M 0 100% /boot
This issue does not exist on other ARM64 nodes (wright / starmie) but just Moonshots. Nor on AMD64 KVM.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-
ProcVersionSign
Uname: Linux 5.8.0-50-generic aarch64
ApportVersion: 2.20.11-
Architecture: arm64
CasperMD5CheckR
Date: Wed Apr 28 11:52:50 2021
SourcePackage: linux-signed-
UpgradeStatus: No upgrade log present (probably fresh install)
description: | updated |
description: | updated |
I don't see any evidence that this is an issue with udev itself. Rather, udev upgrades cause update-initramfs to run, which triggers flash-kernel to generate u-boot-bootable files (uImage, uInitrd), which will also create a backup of the existing boot files (uImage->uImage.bak and uInitrd- >uInitrd. bak) for recovery purposes. I'm guessing you have enough kernels installed that there just isn't room for these .bak files in /boot.
Some suggestions:
1) Assuming you don't require a fallback kernel, remove /boot/uImage.bak and /boot/uInitrd.bak before installing new kernels. This will give flash-kernel more space to work with.
2) If you have more than 2 kernels installed (current + next), try removing older kernels before installing new ones.
3) Create a larger /boot partition.