Skip to content

ock-forge can create corrupt qcow2 images #10

@dkrasins

Description

@dkrasins

On rare occasions, ock-forge can produce an image which can boot far enough to get to the initramfs but fails to make progress from there due to timeouts in "move-gpt-header.service". The timeout occurs because the service is unable to find a partition labelled "root". Typically when this is seen, the primary disk does not report having any partitions.

[  OK  ] Started Ignition (kargs).
[FAILED] Failed to start Fix Root Disk GPT Headers.
See 'systemctl status move-gpt-header.service' for details.
[DEPEND] Dependency failed for Ignition Complete.
[DEPEND] Dependency failed for Initrd Default Target.
[  OK  ] Stopped target Timers.
[  OK  ] Stopped Ignition (fetch-offline).


:/# journalctl -u move-gpt-header.service | cat
-- Logs begin at Thu 2025-02-20 17:27:58 UTC, end at Thu 2025-02-20 17:28:19 UTC. --
Feb 20 17:27:58 localhost systemd[1]: Starting Fix Root Disk GPT Headers...
Feb 20 17:27:58 localhost move-gpt-header[382]: + ROOT=./dev/disk/by-label/root
Feb 20 17:27:58 localhost move-gpt-header[392]: ++ /usr/sbin/partition-info ./dev/disk/by-label/root
Feb 20 17:27:58 localhost move-gpt-header[392]: + udevadm trigger
Feb 20 17:27:58 localhost move-gpt-header[392]: + udevadm settle --timeout=300
Feb 20 17:27:58 localhost move-gpt-header[392]: + ROOT=./dev/disk/by-label/root
Feb 20 17:27:58 localhost move-gpt-header[392]: + ROOT_DEVICE=
Feb 20 17:27:58 localhost move-gpt-header[392]: + i=0
Feb 20 17:27:58 localhost move-gpt-header[392]: + '[' 0 -le 20 ']'
Feb 20 17:27:58 localhost move-gpt-header[392]: + '[' -L ./dev/disk/by-label/root ']'
Feb 20 17:27:58 localhost move-gpt-header[392]: + (( i++ ))
...
Feb 20 17:28:18 localhost.localdomain move-gpt-header[392]: + sleep 1
Feb 20 17:28:19 localhost.localdomain move-gpt-header[392]: + '[' 21 -le 20 ']'
Feb 20 17:28:19 localhost.localdomain move-gpt-header[392]: + '[' 21 -eq 20 ']'
Feb 20 17:28:19 localhost.localdomain move-gpt-header[1721]: ++ cat /partition
Feb 20 17:28:19 localhost.localdomain move-gpt-header[1721]: cat: /partition: No such file or directory
Feb 20 17:28:19 localhost.localdomain move-gpt-header[392]: + PARTITION=
Feb 20 17:28:19 localhost.localdomain move-gpt-header[382]: + DEVICES=
Feb 20 17:28:19 localhost.localdomain systemd[1]: move-gpt-header.service: Main process exited, code=exited, status=1/FAILURE
Feb 20 17:28:19 localhost.localdomain systemd[1]: move-gpt-header.service: Failed with result 'exit-code'.
Feb 20 17:28:19 localhost.localdomain systemd[1]: Failed to start Fix Root Disk GPT Headers.
Feb 20 17:28:19 localhost.localdomain systemd[1]: move-gpt-header.service: Triggering OnFailure= dependencies.


:/# ls /dev/sda*
/dev/sda

It's not clear how this is even possible. Clearly the disk has at least an EFI and boot partition, otherwise boot would not be able to get this far.

This issue has been noticed in the past. What appeared to be the root cause was an issue syncing the filesystem cache to the disk image. Those cases were remedied with liberal use of "sync" in the image creation scripts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions