Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run mkosi on ubuntu on unexcepted failed on ubuntu-22.04 #28629

Closed
Zheaoli opened this issue Aug 1, 2023 · 1 comment
Closed

Run mkosi on ubuntu on unexcepted failed on ubuntu-22.04 #28629

Zheaoli opened this issue Aug 1, 2023 · 1 comment

Comments

@Zheaoli
Copy link

Zheaoli commented Aug 1, 2023

systemd version the issue has been seen with

249

Used distribution

Ubuntu 22.04

Linux kernel version used

Linux kernel-dev-1 5.15.0-78

CPU architectures issue was seen on

x86_64

Component

systemd

Expected behaviour you didn't see

No response

Unexpected behaviour you saw

When I try to run mkosi command by following the hack guide, the exception has been raised with the following message

Unit /root/systemd/.mkosi.tmp6cgq_lyz/root/lib/systemd/system/cryptdisks-early.service is masked, ignoring.
Unit /root/systemd/.mkosi.tmp6cgq_lyz/root/lib/systemd/system/rc.service is masked, ignoring.
Unit /root/systemd/.mkosi.tmp6cgq_lyz/root/lib/systemd/system/x11-common.service is masked, ignoring.
Unit /root/systemd/.mkosi.tmp6cgq_lyz/root/lib/systemd/system/cryptdisks.service is masked, ignoring.
Unit /root/systemd/.mkosi.tmp6cgq_lyz/root/lib/systemd/system/rcS.service is masked, ignoring.
Unit /root/systemd/.mkosi.tmp6cgq_lyz/root/lib/systemd/system/hwclock.service is masked, ignoring.
Removed /root/systemd/.mkosi.tmp6cgq_lyz/root/etc/systemd/system/systemd-homed.service.wants/systemd-homed-activate.service.
Removed /root/systemd/.mkosi.tmp6cgq_lyz/root/etc/systemd/system/sockets.target.wants/systemd-networkd.socket.
Created symlink /root/systemd/.mkosi.tmp6cgq_lyz/root/etc/systemd/system/sockets.target.wants/systemd-networkd.socket → /lib/systemd/system/systemd-networkd.socket.
Created symlink /root/systemd/.mkosi.tmp6cgq_lyz/root/etc/systemd/system/systemd-homed.service.wants/systemd-homed-activate.service → /lib/systemd/system/systemd-homed-activate.service.
‣   Generating hardware database
‣   Recording packages in manifest…
‣   Removing files…
‣  Unmounting image…
‣  Creating cpio /root/systemd/.mkosi.tmp6cgq_lyz/staging/initrd.cpio…
‣  Compressing /root/systemd/.mkosi.tmp6cgq_lyz/staging/initrd.cpio
‣  /root/systemd/mkosi.output/initrd size is 83.2M, consumes 83.2M.
‣ Building final image
‣  Mounting image…
‣   Copying in base trees…
‣   Copying cached trees
‣   Setting up autologin…
‣   Copying in extra file trees…
‣   Signing systemd-boot binaries…
Signing Unsigned original image
‣   Installing boot loader…
bootctl: unrecognized option '--root'
‣ "bootctl install --root /root/systemd/.mkosi.tmpegxe6q5m/root --all-architectures" returned non-zero exit code 1.

I have found a relevant issue about mkosi, see bootctl: unrecognized option '--root'. In this issue, the developer suggests user switch to mkosi-v14, but there will be a new error when I try to build the master branch code with mkosi-v14

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/local/lib/python3.11/dist-packages/mkosi/__main__.py", line 45, in <module>
    main()
  File "/usr/lib/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/mkosi/__main__.py", line 27, in main
    args = parse_args()
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/mkosi/__init__.py", line 5969, in parse_args
    args = parse_args_file_group(argv, os.fspath(config_path))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/mkosi/__init__.py", line 6019, in parse_args_file_group
    return create_parser().parse_args(config_files + argv)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/argparse.py", line 1874, in parse_args
    args, argv = self.parse_known_args(args, namespace)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/argparse.py", line 1907, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/argparse.py", line 1921, in _parse_known_args
    arg_strings = self._read_args_from_files(arg_strings)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/mkosi/__init__.py", line 5015, in _read_args_from_files
    config.read_file(args_file)
  File "/usr/lib/python3.11/configparser.py", line 733, in read_file
    self._read(f, source)
  File "/usr/lib/python3.11/configparser.py", line 1111, in _read
    raise DuplicateOptionError(sectname, optname,
configparser.DuplicateOptionError: While reading from 'mkosi.conf.d/05-qemu-mem.conf' [line  8]: option 'Distribution' in section 'Match' already exists

This issue can not reproduce on my another machine with the Arch Linux, I will try to confirm the behavior on the Fedora

Steps to reproduce the problem

No response

Additional program output to the terminal or log subsystem illustrating the issue

No response

@Zheaoli Zheaoli added the bug 🐛 Programming errors, that need preferential fixing label Aug 1, 2023
@Zheaoli Zheaoli changed the title Run mkosi on ubuntu on unexcepted failed Run mkosi on ubuntu on unexcepted failed on ubuntu-22.04 Aug 1, 2023
@yuwata yuwata added mkosi and removed pid1 labels Aug 1, 2023
@DaanDeMeyer
Copy link
Contributor

Please see the HACKING guide in the repo, you have to build systemd from source to get mkosi working at the moment.

@yuwata yuwata added not-a-bug and removed bug 🐛 Programming errors, that need preferential fixing labels Aug 3, 2023
@yuwata yuwata closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants