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

cmdline: Provide dest_device when using iso/pxe customize #1480

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

duyiwei7w
Copy link

During the execution of coreos-installer install, users are required to provide dest-device through parameters or config file. However, when executing iso/pxe customize, it is not necessary to provide dest-device to successfully execute customize. This will obviously result in errors when using a customized image for installation. Some previous discussions can be found at:

#1469

This modification unifies the behavior of the customize command and the install command during the image install phase, requiring users to provide dest-device through parameters or config files.

@jlebon
Copy link
Member

jlebon commented Jun 12, 2024

Kernel arguments can also be used to specify the destination device (coreos.inst.install_dev).

How about instead as soon as any --dest argument is passed but not --dest-device we print a note that we expect the destination device to be passed either through a later customize call or via coreos.inst.install_dev?

@duyiwei7w
Copy link
Author

duyiwei7w commented Jun 13, 2024

Thank you for your suggestion @jlebon . As far as I know, if we use coreos-installer install parameters, in addition to directly specifying dest_device or using configfile. We can also use kernel parameters to pass the destination device .

So I want to make as little modification as possible in customize, and keep the behavior basically consistent with the coreos-installer install concept.

That is, the user is required to enter --dest-device by default, and a prompt is printed if there is no dest_device. If configfile is used, dest_device does not need to be specified. For advanced kernel parameters, there is no unified requirement, and it will not detect whether coreos.inst.install_dev is explicitly specified.

@duyiwei7w
Copy link
Author

Also, as you said, if the user enters any --dest parameter but no --dest-device, we print a prompt. But if the user passes the target disk through installerconfig or kernel parameters, then this prompt is unnecessary.

In other words, we may need to parse all the customize parameters entered by the user again to confirm that they have not been passed to the destination device before printing the prompt. In fact, it is better to directly ask the user to use --dest-device as mentioned above.

@jlebon
Copy link
Member

jlebon commented Jun 18, 2024

We need to be flexible in how the ISO can be used. For example, you can imagine someone providing a pre-customized ISO/PXE initramfs to a user, with the understanding that the user will customize it further with the actual destination device (or e.g. add the needed karg in their PXE config).

But note also that the customize command can also be used to customize a live ISO that will be used solely for its live environment, with no intent of installing a CoreOS system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants