880bd639f3
To prepare for booting anaconda we need to generate a kickstart file from the kickstart template and pass it to the installer as a kernel command line argument (inst.ks). Similarly the second stage of the installer (stage2) needs to fetched and it's location needs to be passed as a kernel command line argument (inst.stage2) This change also adds 'boot_anaconda' target to pxe_config.template and ipxe_config.template and renders that target correctly. The pxe configuration will automatically switch to boot_anaconda target when the boot_option is 'kickstart'. Change-Id: I3ffe5a60684cdefe51c7a0a47acc1acedbb49145
66 lines
1.7 KiB
Plaintext
66 lines
1.7 KiB
Plaintext
#!ipxe
|
|
|
|
set attempts:int32 10
|
|
set i:int32 0
|
|
|
|
goto deploy
|
|
|
|
:deploy
|
|
imgfree
|
|
kernel http://1.2.3.4:1234/deploy_kernel selinux=0 troubleshoot=0 text test_param BOOTIF=${mac} initrd=deploy_ramdisk || goto retry
|
|
|
|
initrd http://1.2.3.4:1234/deploy_ramdisk || goto retry
|
|
boot
|
|
|
|
:retry
|
|
iseq ${i} ${attempts} && goto fail ||
|
|
inc i
|
|
echo No response, retrying in ${i} seconds.
|
|
sleep ${i}
|
|
goto deploy
|
|
|
|
:fail
|
|
echo Failed to get a response after ${attempts} attempts
|
|
echo Powering off in 30 seconds.
|
|
sleep 30
|
|
poweroff
|
|
|
|
:boot_partition
|
|
imgfree
|
|
kernel http://1.2.3.4:1234/kernel root={{ ROOT }} ro text test_param initrd=ramdisk || goto boot_partition
|
|
initrd http://1.2.3.4:1234/ramdisk || goto boot_partition
|
|
boot
|
|
|
|
:boot_anaconda
|
|
imgfree
|
|
kernel http://1.2.3.4:1234/kernel text test_param inst.ks=http://fake/ks.cfg inst.stage2=http://fake/stage2 initrd=ramdisk || goto boot_anaconda
|
|
initrd http://1.2.3.4:1234/ramdisk || goto boot_anaconda
|
|
boot
|
|
|
|
:boot_ramdisk
|
|
imgfree
|
|
kernel http://1.2.3.4:1234/kernel root=/dev/ram0 text test_param ramdisk_param initrd=ramdisk || goto boot_ramdisk
|
|
initrd http://1.2.3.4:1234/ramdisk || goto boot_ramdisk
|
|
boot
|
|
|
|
:boot_iscsi
|
|
imgfree
|
|
set username fake_username
|
|
set password fake_password
|
|
set initiator-iqn fake_iqn
|
|
sanhook --drive 0x80 iscsi:fake_host::3260:0:fake_iqn || goto fail_iscsi_retry
|
|
set username fake_username_1
|
|
set password fake_password_1
|
|
sanhook --drive 0x81 iscsi:fake_host::3260:1:fake_iqn || goto fail_iscsi_retry
|
|
set username fake_username
|
|
set password fake_password
|
|
sanboot --no-describe || goto fail_iscsi_retry
|
|
|
|
:fail_iscsi_retry
|
|
echo Failed to attach iSCSI volume(s), retrying in 10 seconds.
|
|
sleep 10
|
|
goto boot_iscsi
|
|
|
|
:boot_whole_disk
|
|
sanboot --no-describe
|