clr-installer icon indicating copy to clipboard operation
clr-installer copied to clipboard

live-server.yam iso image build fails: Building efiboot image [*failed*] / log: "no space left on device"

Open mk-rl opened this issue 2 years ago • 4 comments

Hello

Describe the bug I am trying to build an iso image with clr-installer using the live-server.yaml and it fails not fully silent. The img upfront build seems to have worked out fine.

As I cannot see any other disk running full, I would guess its this bug resurfacing? https://github.com/clearlinux/clr-installer/commit/1bdd4ec174995560095eb38691ed8f3b8b1e27ad ( @djklimes @fenrus75 )

@pixelgeek is this somehow related to https://github.com/clearlinux/distribution/issues/2914

To Reproduce

Building: time TMPDIR=/root/tmp clr-installer -l 4 -c live-server.yaml

Swupd auto-update set to off!
Running pre-install hooks [success]
Cleaning disk /dev/loop0 [success]
Writing partition table to: loop0 [success]
Updating partition table for: loop0 [success]
Setting boot partition: loop0p1 [boot] [success]
Rescanning media [success]
Writing vfat file system to loop0p1 '/boot' [success]
Writing swap file system to loop0p2 [success]
Writing ext4 file system to loop0p3 '/' [success]
Writing mount files [success]
Target OS: Downloading required manifests [success]
Target OS: Downloading required packs [success]
Target OS: Extracting required packs [success]
Target OS: Verifying installed files [success]
Target OS: Verifying staged files [success]
Target OS: Downloading missing files [success]
Target OS: Extracting missing files [success]
Target OS: Installing base OS and configured bundles [success]
Target OS: Running post-update scripts [success]
Offline Content: Downloading required manifests [success]
Offline Content: Downloading required packs [success]
Offline Content: Extracting required packs [success]
Offline Content: Verifying installed files [success]
Offline Content: Verifying staged files [success]
Offline Content: Downloading missing files [success]
Offline Content: Extracting missing files [success]
Disabling automatic updates [success]
Installing boot loader [success]
Running post-install hooks [success]
Saving the installation results [success]
Making temp directories for ISO creation [success]
Making squashfs of rootfs [success]
ISO Initrd: Downloading required manifests [success]
ISO Initrd: Downloading required packs [success]
ISO Initrd: Extracting required packs [success]
ISO Initrd: Verifying installed files [success]
ISO Initrd: Verifying staged files [success]
ISO Initrd: Downloading missing files [success]
ISO Initrd: Extracting missing files [success]
ISO Initrd: Installing base OS and configured bundles [success]
ISO Initrd: Running post-update scripts [success]
Installing the base system for initrd [success]
Creating and installing init script to initrd [success]
Building initrd image [success]
Building efiboot image [*failed*]
Cleaning up from ISO creation [success]
Installation completed [success]
Running post-image hooks [success]
Installation Steps Complete [success]

real	4m12.934s
user	13m56.543s
sys	0m25.179s

end of the log file:

2023/10/28 23:45:33 [DBG] main
2023/10/28 23:45:33 [INF] Building initrd image
2023/10/28 23:45:36 [INF] Building efiboot image
2023/10/28 23:45:36 [DBG] fallocate -l 124M /root/tmp/clrCdroot-3737497825/EFI/efiboot.img
2023/10/28 23:45:36 [DBG] Using default shellProxy.DefaultGetProxyValue
2023/10/28 23:45:36 [DBG] [Previous line repeated 4 times]
2023/10/28 23:45:36 [DBG] cmd.Env: []
2023/10/28 23:45:36 [DBG] mkfs.fat -n CLEAR_EFI /root/tmp/clrCdroot-3737497825/EFI/efiboot.img
2023/10/28 23:45:36 [DBG] Using default shellProxy.DefaultGetProxyValue
2023/10/28 23:45:36 [DBG] [Previous line repeated 4 times]
2023/10/28 23:45:36 [DBG] cmd.Env: []
2023/10/28 23:45:36 [DBG] mkfs.fat 4.2 (2021-01-31)
2023/10/28 23:45:36 [DBG] mount -t vfat -o loop /root/tmp/clrCdroot-3737497825/EFI/efiboot.img /root/tmp/clrEfi-935713910
2023/10/28 23:45:36 [DBG] Using default shellProxy.DefaultGetProxyValue
2023/10/28 23:45:36 [DBG] [Previous line repeated 4 times]
2023/10/28 23:45:36 [DBG] cmd.Env: []
2023/10/28 23:45:36 [DBG] cp -pr /root/tmp/install-2927492841/boot/. /root/tmp/clrEfi-935713910
2023/10/28 23:45:36 [DBG] Using default shellProxy.DefaultGetProxyValue
2023/10/28 23:45:36 [DBG] [Previous line repeated 4 times]
2023/10/28 23:45:36 [DBG] cmd.Env: []
2023/10/28 23:45:36 [DBG] cp -pr /root/tmp/clrEfi-935713910/. /root/tmp/clrCdroot-3737497825
2023/10/28 23:45:36 [DBG] Using default shellProxy.DefaultGetProxyValue
2023/10/28 23:45:36 [DBG] [Previous line repeated 4 times]
2023/10/28 23:45:36 [DBG] cmd.Env: []
2023/10/28 23:45:36 [INF] Cleaning up from ISO creation
2023/10/28 23:45:37 [ERR] 

Error Trace:
errors.Wrap()
     /builddir/build/BUILD/clr-installer-2.7.6/errors/errors.go:85
utils.CopyFile()
     /builddir/build/BUILD/clr-installer-2.7.6/utils/utils.go:145
 write /root/tmp/clrEfi-935713910/EFI/BOOT/initrd.gz: no space left on device
2023/10/28 23:45:37 [INF] Installation completed
2023/10/28 23:45:37 [INF] Umounting rootDir: /root/tmp/install-2927492841
2023/10/28 23:45:37 [DBG] Unmounted ok: /root/tmp/install-2927492841/sys
2023/10/28 23:45:37 [DBG] Unmounted ok: /root/tmp/install-2927492841/proc
2023/10/28 23:45:37 [DBG] Unmounted ok: /root/tmp/install-2927492841/dev
2023/10/28 23:45:37 [DBG] Unmounted ok: /root/tmp/install-2927492841/boot
2023/10/28 23:45:38 [DBG] Unmounted ok: /root/tmp/install-2927492841
2023/10/28 23:45:38 [INF] Removing rootDir: /root/tmp/install-2927492841
2023/10/28 23:45:38 [DBG] losetup -d /dev/loop1
2023/10/28 23:45:38 [DBG] Using default shellProxy.DefaultGetProxyValue
2023/10/28 23:45:38 [DBG] [Previous line repeated 4 times]
2023/10/28 23:45:38 [DBG] cmd.Env: []
2023/10/28 23:45:38 [INF] Running post-image hooks
2023/10/28 23:45:38 [INF] Installation Steps Complete

ls *iso ls: cannot access '*iso': No such file or directory

Expected behavior

  • creation of iso file
  • more verbose error that the iso failed (here it only states the efiboot failed, but no word of a failed iso)

Environment (please complete the following information):

  • Clear Linux OS Version: [swupd info]
 # swupd info
Distribution:      Clear Linux OS
Installed version: 40250
Version URL:       https://cdn.download.clearlinux.org/update
Content URL:       https://cdn.download.clearlinux.org/update

  • Installer Version [clr-installer -v]
# clr-installer -v
clr-installer: 2.7.6

mk-rl avatar Oct 28 '23 23:10 mk-rl

I can confirm that manually increasing this in a local build solved this issue. (Updated it from 124M to 150M).

willtoth avatar Nov 08 '23 16:11 willtoth

Just as a note the correct yamls for the server version can be found under the release directory (so for 40250: https://download.clearlinux.org/releases/40250/clear/config/image/live-server.yaml ) I would expect any of the 40XXX version to need at at least 150M in the boot partition. They do change over time (with a tendency to grow).

djklimes avatar Nov 08 '23 16:11 djklimes

Just as a note the correct yamls for the server version can be found under the release directory (so for 40250: https://download.clearlinux.org/releases/40250/clear/config/image/live-server.yaml ) I would expect any of the 40XXX version to need at at least 150M in the boot partition. They do change over time (with a tendency to grow).

So I was referring not to the space provided in the yaml, but the actual allocation that his hard coded into clr-intstaller as mentioned in https://github.com/clearlinux/clr-installer/commit/1bdd4ec174995560095eb38691ed8f3b8b1e27ad fixed for https://github.com/clearlinux/distribution/issues/2914. I would recommend reopening this issue to fix.

Specifically, I changed here in isoutils/isoutils.go

	cmds := [][]string{
		{"fallocate", "-l", "150M", tmpPaths[clrCdroot] + "/EFI/efiboot.img"},

willtoth avatar Nov 08 '23 19:11 willtoth

Just as a note the correct yamls for the server version can be found under the release directory (so for 40250: https://download.clearlinux.org/releases/40250/clear/config/image/live-server.yaml ) I would expect any of the 40XXX version to need at at least 150M in the boot partition. They do change over time (with a tendency to grow).

So I was referring not to the space provided in the yaml, but the actual allocation that his hard coded into clr-intstaller as mentioned in 1bdd4ec fixed for clearlinux/distribution#2914. I would recommend reopening this issue to fix.

Specifically, I changed here in isoutils/isoutils.go

	cmds := [][]string{
		{"fallocate", "-l", "150M", tmpPaths[clrCdroot] + "/EFI/efiboot.img"},

Ah yes, I see I need to release a new version of clr-installer and bump it (which I'm pretty sure is why I did it last time from 100 to 124... )

djklimes avatar Nov 08 '23 19:11 djklimes