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

How can I pass the disk name dynamically to the rd.kiwi.oem.installdevice #2679

Open
Naranthiran opened this issue Nov 20, 2024 · 4 comments

Comments

@Naranthiran
Copy link

Problem description

When I remove the rd.kiwi.oem.installdevice=/dev/sda, I cannot install it unattended on my hardware. I also understand that is the expected behaviour.

Can we set the variable manually s 1)oem-device-filter, 2)oem-unattended-id 3) rd.kiwi.oem.maxdisk
so that still I can have the same behaviour of unattended installation

Expected behaviour

I wanted to either kernel pick up the disk automatically and install the OS without human intervention.

Steps to reproduce the behaviour

OS and Software information

SUSE Micro OS 5.5

  • KIWI version:
  • Operating system host version:
  • Operating system target version:
  • Open Build Service version (N/A if not using OBS):
  • Koji version (N/A if not using Koji):
@Naranthiran
Copy link
Author

Can anyone help me on this?

@schaefi
Copy link
Collaborator

schaefi commented Dec 19, 2024

If you know the install device name and want to hard set it in your installation ISO image, the following should work

<type ... kernelcmdline="rd.kiwi.oem.installdevice=/dev/sda"/>

This will set the kernel boot option also for the install ISO

@Naranthiran
Copy link
Author

Hi @schaefi ,

I wanted a harmonized ISO for the systems with /dev/sda and /dev/nvme0 HDD. And also wanted to perform the unattended installation.

In can if the systems has multiple disk, it can prompt for formatting/cleaning the disk.

Regards,
Naranthiran Duraisamy

@schaefi
Copy link
Collaborator

schaefi commented Jan 31, 2025

The part I do not understand is how you want to achieve the process being unattended when there are multiple disks that you want to cleanup based on a prompt ? I'm confused. Maybe you can outline the expected behavior for the multi-disk scenario more detailed ? Thanks

Please also note you are talking mostly about device names like /dev/sda or /dev/nvme0. These names are non predictable unix node names and cannot be trusted to be the same between reboots. Your same disk device that was /dev/sda could be mapped to /dev/sdb by the kernel. That's why kiwi works with persistent device names e.g /dev/disk/by-id/... and the selection mechanics of multiple devices are based on these names.

In the code to build up the list of disks you will find the following

disk_device_by_id=$(
    get_persistent_device_from_unix_node "${disk_device}" "${disk_id}"
)

Only in case there is no persistent representation of the unix node we use the raw unix node in the list.
From the result list you have now filter options. Those filters apply to the device names of the list and should not be based on unix device nodes but rather on persistent device names.

A persistent device name could be e.g

/dev/disk/by-id/scsi-0ATA_Samsung_SSD_870_S75CNX0W407018M

A filter rule could match on elements of this names and that can reduce the list of disk devices the system should work with.
If the result list after all filters is still >1 kiwi will show a dialog and you need to chose.

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

No branches or pull requests

2 participants