[Output]
CacheDirectory=mkosi.cache
-KernelCommandLine=console=hvc0
- systemd.unit=mkosi-check-and-shutdown.service
+KernelCommandLine=systemd.unit=mkosi-check-and-shutdown.service
systemd.log_target=console
systemd.default_standard_output=journal+console
`Autologin=`, `--autologin`
: Enable autologin for the `root` user on `/dev/pts/0` (nspawn),
- `/dev/tty1` and `/dev/hvc0`.
+ `/dev/tty1` and `/dev/ttyS0`.
`BuildScript=`, `--build-script=`
"mkosi.resources", "console_getty_autologin.conf")
add_dropin_config_from_resource(state.root, "serial-getty@ttyS0.service", "autologin",
"mkosi.resources", "serial_getty_autologin.conf")
- add_dropin_config_from_resource(state.root, "serial-getty@hvc0.service", "autologin",
- "mkosi.resources", "serial_getty_autologin.conf")
add_dropin_config_from_resource(state.root, "getty@tty1.service", "autologin",
"mkosi.resources", "getty_autologin.conf")
"-nographic",
"-nodefaults",
"-chardev", "stdio,mux=on,id=console,signal=off",
- # Use virtconsole which appears as /dev/hvc0 in the guest on which a getty is automatically
- # by spawned by systemd without needing a console= cmdline argument.
- "-device", "virtio-serial",
- "-device", "virtconsole,chardev=console",
- "-mon", "console",
- # EDK2 doesn't support virtio-serial, so add a regular serial console as well to get bootloader
- # output.
"-serial", "chardev:console",
+ "-mon", "console",
]
for k, v in config.credentials.items():
dest="kernel_command_line",
section="Output",
parse=config_make_list_parser(delimiter=" "),
+ default=["console=ttyS0"],
),
MkosiConfigSetting(
dest="secure_boot",
columns, lines = shutil.get_terminal_size()
cmdline = [
- f"systemd.tty.term.hvc0={os.getenv('TERM', 'vt220')}",
- f"systemd.tty.columns.hvc0={columns}",
- f"systemd.tty.rows.hvc0={lines}",
f"systemd.tty.term.ttyS0={os.getenv('TERM', 'vt220')}",
f"systemd.tty.columns.ttyS0={columns}",
f"systemd.tty.rows.ttyS0={lines}",
- "console=hvc0",
+ "console=ttyS0",
]
if args.output_format == OutputFormat.cpio: