coreos / coreos-installer

Installer for CoreOS disk images
https://coreos.github.io/coreos-installer/
Apache License 2.0
222 stars 93 forks source link

coreos-installer iso customize【--dest-ignition】must be accompanied by the 【--dest-device】 #1469

Open duyiwei7w opened 5 months ago

duyiwei7w commented 5 months ago

Bug

coreos-installer iso customize【--dest-ignition】must be accompanied by the 【--dest-device】

Host Operating System Version

NestOS 【a variant of CoreOS devrloping in openEuler】

coreos-installer Version

0.16.0

Expected Behavior

use "coreos-installer iso customize my-iso --dest-ignition 【ign file path】-o test.iso " I can successfully boot test,iso

Actual Behavior

can't boot test.iso coreos-installer service failed. need 【DEVICE】 information ,such as /dev/sda

Solve Steps

use “coreos-installer iso customize my-iso --dest-ignition 【ign file path】--dest-device /dev/sda -o test.iso" Boot test.iso successfully!

Other Information

I prefer to categorize this issue under the direction of user convenience. In fact, I don't consider it a bug, much like when we directly boot, we need to execute coreos-installer install /dev/sda --ignition-file [ign file path]. However, I still feel that providing some hints to users or forcing users to use both commands simultaneously when using customize may be beneficial. Please have the maintainer review this issue, and if it needs to be modified, I'm willing to give it a try.

duyiwei7w commented 5 months ago

In addition, I would like to inquire about how to use the ISO image generated by coreos-install iso ignition embed -i test.ign -o test.iso. When I directly boot it, I find it is still in live mode, which is somewhat similar to coreos-installer iso customize --live-ignition.

jlebon commented 5 months ago

coreos-installer iso customize【--dest-ignition】must be accompanied by the 【--dest-device】

The reason this is not enforced is that you can also provide the destination device through other means, e.g. via kargs or via installer configs.

That said, I think we could provide a message when doing this that we expect the destination device to be provided through other means.

In addition, I would like to inquire about how to use the ISO image generated by coreos-install iso ignition embed -i test.ign -o test.iso. When I directly boot it, I find it is still in live mode, which is somewhat similar to coreos-installer iso customize --live-ignition.

Correct. iso ignition embed predates the more friendly iso customize and its --live-ignition switch.

duyiwei7w commented 5 months ago

The reason this is not enforced is that you can also provide the destination device through other means, e.g. via kargs or via installer configs. That said, I think we could provide a message when doing this that we expect the destination device to be provided through other means.

Thanks ! I did overlook that there are other ways to provide the destination device.

As you mentioned, we can indeed provide some help information or judgment conditions to prompt users to provide destination devices. This is a minor change that doesn't affect functionality. I thought I'd give it a try.

Correct. iso ignition embed predates the more friendly iso customize and its --live-ignition switch.

Thanks for the answer! Turns out that's really the case, it really confused me, and I was looking at the specific differences between the two commands.