-
Notifications
You must be signed in to change notification settings - Fork 150
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
Support install disk overwrite per cmdline #2398
Conversation
cool, thanks for the review. As this is initrd code I'm always a bit concerned and therefore I also like to have two people approving. @davidcassany could you have a short look if you see something problematic ? I think we are good though. Thanks |
5da1083
to
6f6db25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Just a comment regarding the current logic. From lines
kiwi/dracut/modules.d/90kiwi-dump/kiwi-dump-image.sh
Lines 138 to 152 in 488be00
if [ -z "${kiwi_oemunattended_id}" ];then | |
# unattended mode requested but no target specifier, | |
# thus use first device from list | |
echo "${device_array[0]}" | |
else | |
# unattended mode requested with target specifier | |
# use this device if present | |
local device | |
for device in ${device_array[*]}; do | |
if [[ ${device} =~ ${kiwi_oemunattended_id} ]];then | |
echo "${device}" | |
return | |
fi | |
done | |
fi |
I understand that oem-unattended-id
element from the XML will always have precedence over rd.kiwi.oem.installdevice
, I am not sure this is intended. In general, my expectation as a user would be that runtime choices in kernel command parameters overwrite buildtime choices coming from the XML, so that the same image build turns to be usable in a wider range of use cases.
Note this is arguable, as setting oem-unattended-id
in XML already assumes a great knowledge of the deployment environment before.
Looks great 👍 |
Add rd.kiwi.oem.installdevice=DEVICE. Configures the disk device that should be used in an OEM installation. This overwrites any other oem device setting, e.g device filter or maxdisk and just continues the installation on the given device. However, the device must exist and must be a block special. This Fixes jira#PED-7180
9d72f19
to
9d8c14b
Compare
I'm going to submit a Staging kiwi including this change. Our integration testing will rebuild and we can do some in depth tests with the image from here: |
my tests were successful. I tested:
If you have more specific tests in my mind just try them with the proposed integration test. Thanks |
Just in case it would be nice to test installing it into a 'second' hard disk such as /dev/sdb to verify that it doesn't use the default one :) Thanks! |
yep good idea. I did this as follows
So I think it does what we wanted it to do :) |
Allow install disk overwrite from cmdline
Add rd.kiwi.oem.installdevice=DEVICE. Configures the disk device that should be used in an OEM installation. This oerwrites any other oem device setting, e.g device filter or maxdisk and just continues the installation on the given device. However, the device must exist and must be a block special.