File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 16
16
17
17
# Kernel and initrd image
18
18
NEXT_SONIC_IMAGE=$( sonic_installer list | grep " Next: " | cut -d ' ' -f 2)
19
- KERNEL_OPTIONS=$( cat /host/grub/grub.cfg | sed " /$NEXT_SONIC_IMAGE '/,/}/" ' !' " g" | grep linux)
20
- KERNEL_IMAGE=" /host$( echo $KERNEL_OPTIONS | cut -d ' ' -f 2) "
21
- BOOT_OPTIONS=" $( echo $KERNEL_OPTIONS | sed -e ' s/\s*linux\s*/BOOT_IMAGE=/' ) fast-reboot"
19
+ if grep -q aboot_platform= /host/machine.conf; then
20
+ IMAGE_PATH=" /host/image-${NEXT_SONIC_IMAGE# SONiC-OS-} "
21
+ KERNEL_IMAGE=" $( ls $IMAGE_PATH /boot/vmlinuz-* ) "
22
+ BOOT_OPTIONS=" $( cat " $IMAGE_PATH /kernel-cmdline" | tr ' \n' ' ' ) fast-reboot"
23
+ elif grep -q onie_platform= /host/machine.conf; then
24
+ KERNEL_OPTIONS=$( cat /host/grub/grub.cfg | sed " /$NEXT_SONIC_IMAGE '/,/}/" ' !' " g" | grep linux)
25
+ KERNEL_IMAGE=" /host$( echo $KERNEL_OPTIONS | cut -d ' ' -f 2) "
26
+ BOOT_OPTIONS=" $( echo $KERNEL_OPTIONS | sed -e ' s/\s*linux\s*/BOOT_IMAGE=/' ) fast-reboot"
27
+ else
28
+ echo " Unknown bootloader. fast-reboot is not supported."
29
+ exit 1
30
+ fi
22
31
INITRD=$( echo $KERNEL_IMAGE | sed ' s/vmlinuz/initrd.img/g' )
23
32
24
33
sonic_asic_type=$( sonic-cfggen -y /etc/sonic/sonic_version.yml -v asic_type)
You can’t perform that action at this time.
0 commit comments