Add deploy-kexec element
Boots into the new image kernel once baremetal-deploy-helper signals it is finished using kexec utilities. Change-Id: I705787cc394ef14200d80404ee497762ab79b452
This commit is contained in:
parent
fb33adc5ba
commit
6d1f03bda3
3
elements/deploy-kexec/README.md
Normal file
3
elements/deploy-kexec/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
Boots into the new image once baremetal-deploy-helper signals
|
||||
it is finished by downloading the kernel and ramdisk via tftp,
|
||||
and using the kexec utilities.
|
1
elements/deploy-kexec/binary-deps.d/deploy-kexec
Normal file
1
elements/deploy-kexec/binary-deps.d/deploy-kexec
Normal file
@ -0,0 +1 @@
|
||||
kexec
|
1
elements/deploy-kexec/element-deps
Normal file
1
elements/deploy-kexec/element-deps
Normal file
@ -0,0 +1 @@
|
||||
deploy
|
10
elements/deploy-kexec/init.d/zdeploy-kexec
Normal file
10
elements/deploy-kexec/init.d/zdeploy-kexec
Normal file
@ -0,0 +1,10 @@
|
||||
TFTP_MAC_ADDRESS="01-"`echo $BOOT_MAC_ADDRESS | sed 's/:/-/g' | tr "A-Z" "a-z"`
|
||||
tftp -r /tftpboot/pxelinux.cfg/${TFTP_MAC_ADDRESS} -g ${BOOT_SERVER}
|
||||
APPEND=$(tail -n1 ${TFTP_MAC_ADDRESS} | cut -f3- -d" ")
|
||||
|
||||
KERNEL=$(get_kernel_parameter BOOT_IMAGE | sed 's/deploy_//g')
|
||||
RAMDISK=$(echo $KERNEL | sed 's/kernel/ramdisk/')
|
||||
|
||||
tftp -r ${KERNEL} -g ${BOOT_SERVER}
|
||||
tftp -r ${RAMDISK} -g ${BOOT_SERVER}
|
||||
kexec -l kernel --append="${APPEND}" --initrd=ramdisk && kexec -e
|
2
elements/deploy-kexec/install.d/53-install-kexec
Executable file
2
elements/deploy-kexec/install.d/53-install-kexec
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
install-packages kexec-tools
|
Loading…
Reference in New Issue
Block a user