Skip to content

Commit 0a91fa6

Browse files
committed
cidata: modify user-data to mount rosetta before systemd-binfmt.service starts.
Explicitly set `fs_passno` to `0` in the mount entry for rosetta to ensure it is mounted earlier. The default value was `2`, which delayed the mount. Without this change, ubuntu with `qemu-user-static` records error in clout-init.log: > [FAILED] Failed to start systemd-binfmt.ser…- Set Up Additional Binary Formats. ```console $ sudo systemctl status systemd-binfmt.service × systemd-binfmt.service - Set Up Additional Binary Formats Loaded: loaded (/usr/lib/systemd/system/systemd-binfmt.service; static) Active: failed (Result: exit-code) since Tue 2024-07-30 15:41:08 JST; 1min 34s ago Docs: man:systemd-binfmt.service(8) man:binfmt.d(5) https://docs.kernel.org/admin-guide/binfmt-misc.html https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems Main PID: 285 (code=exited, status=1/FAILURE) CPU: 5ms Jul 30 15:41:08 lima-docker systemd[1]: Starting systemd-binfmt.service - Set Up Additional Binary Formats... Jul 30 15:41:08 lima-docker systemd-binfmt[285]: /usr/lib/binfmt.d/rosetta.conf:1: Failed to add binary format 'rosetta': No such file or directory Jul 30 15:41:08 lima-docker systemd[1]: systemd-binfmt.service: Main process exited, code=exited, status=1/FAILURE Jul 30 15:41:08 lima-docker systemd[1]: systemd-binfmt.service: Failed with result 'exit-code'. Jul 30 15:41:08 lima-docker systemd[1]: Failed to start systemd-binfmt.service - Set Up Additional Binary Formats. ``` Signed-off-by: Norio Nomura <[email protected]>
1 parent 18e18af commit 0a91fa6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cidata/cidata.TEMPLATE.d/user-data

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ package_reboot_if_required: true
1414
{{- if or .RosettaEnabled (or (eq .MountType "9p") (eq .MountType "virtiofs")) }}
1515
mounts:
1616
{{- if .RosettaEnabled }}{{/* Mount the rosetta volume before systemd-binfmt.service(8) starts */}}
17-
- [vz-rosetta, /mnt/lima-rosetta, virtiofs]
17+
- [vz-rosetta, /mnt/lima-rosetta, virtiofs, defaults, "0", "0"]
1818
{{- end }}
1919
{{- if .Mounts }}
2020
{{- range $m := $.Mounts}}

0 commit comments

Comments
 (0)