【问题标题】:Does the kernel parameters order matter in QEMU?QEMU 中的内核参数顺序是否重要?
【发布时间】:2020-10-14 17:06:44
【问题描述】:

我遇到了一些有趣的问题。更改传递给-append 的内核参数的顺序,它会改变结果。

使用以下作品运行我的 QEMU VM:

-append "root=/dev/disk/by-id/virtio-rootfs rootflags=rw flatcar.first_boot=1 tsc=reliable no_timer_check= rcupdate.rcu_expedited=1 i8042.direct=1 i8042.dumbkbd=1 i8042.nopnp=1 i8042.noaux=1 noreplace-smp= reboot=k console=hvc0 console=hvc1 cryptomgr.notests= net.ifnames=0 pci=lastbus=0"

但是,如果将root= 放在末尾,则它不起作用,并且找不到根卷,因此未安装。

所以我现在想知道。顺序真的很重要吗?如果是这样,它背后有什么逻辑吗?有什么要遵守的规则吗?

【问题讨论】:

  • 我无法重现您的问题,但我会尝试从不需要值的标志中删除尾随 =no_timer_check noreplace-smp cryptomgr.notests ...其他比这更早,换行?

标签: virtual-machine qemu kvm


【解决方案1】:

我通过检查哪些标志被传递到系统并检查cat /proc/cmdline来解决它我发现这些标志是用双引号引起来的,所以内核解析失败

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-05-22
    • 1970-01-01
    • 1970-01-01
    • 2023-03-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多