clearlinux / clr-installer

Clear Linux* OS Installer
GNU General Public License v3.0
92 stars 42 forks source link

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

Open mk-rl opened 10 months ago

mk-rl commented 10 months ago

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

Environment (please complete the following information):

 - Installer Version [clr-installer -v]

clr-installer -v

clr-installer: 2.7.6

willtoth commented 10 months ago

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

djklimes commented 10 months ago

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).

willtoth commented 10 months ago

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"},
djklimes commented 10 months ago

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... )