Hi Alex,
looks like you are making progress, congrats :)
> I am wanting to target a specific drive to install my OS, and I have
> been using the following options in my appliance.kiwi file:
>
> <oem-unattended>true</oem-unattended>
> <oem-unattended-id>/dev/sda</oem-unattended-id>
yeah using unix device names is not really ideal as they are
non persistent
> The issue that I run into is that the different systems that will get
> this image may identify the drive differently than others. One constant
> is that I will always want to target the smaller drive. Are there any
> capabilities with kiwi that can do this?
Unfortunately you cannot select by a size constraint that says "smaller than".
However you can say:
<type ... kernelcmdline="rd.kiwi.oem.maxdisk=3G" .../>
which will only take install devices <= 3G into account.
Other than that you can select the install device also by an ID filter.
If you don't have a devicepersistency attribute set in your XML
description the default device list is created from the devices
found in "/dev/disk/by-id/". These values contains customer ID
strings, e.g
/dev/disk/by-id/nvme-PC_SN730_NVMe_WDC_512GB_20521C803698
which is my local storage disk. If you can find a filter pattern
that would filter out the devices you don't want and results in
one device left that could be taken by the unattended mode you
can also set:
<oemconfig>
<!-- filter out every device matching -->
<oem-device-filter>/dev/ram</oem-device-filter>
</oemconfig>
Which I use to filter out all ramdisk devices. The matching
code does this:
if [[ ${disk_device} =~ ${kiwi_oemdevicefilter} ]];then
message="${disk_device} filtered out by rule:"
message="${message} ${kiwi_oemdevicefilter}"
info "${message}" >&2
continue
fi
So your filter expression can use everything that the "=~" bash
operator understands
It highly depends on your hardware situation if filtering will help though.
Let us know if this helps you
Regards,
Marcus
--
Public Key available via:
https://keybase.io/marcus_schaefer/key.asc
keybase search marcus_schaefer
-------------------------------------------------------
Marcus Schäfer Brunnenweg 18
Tel:
+49 7562 905437 D-88260 Argenbühl
Germany
-------------------------------------------------------