Kernel Panic error come usually when kernel corrupt or if after kernel update it will get panic error if the kernel update had done wrong or any miss updated package
you can check your current kernel using
# uname -a Linux ip-172-31-19-108.ec2.internal 4.14.193-149.317.amzn2.x86_64 #1 SMP Thu Sep 3 19:04:44 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux # uname -r 4.14.193-149.317.amzn2.x86_64
and the kernel package are stored in /boot location
# ls -lah /boot/ total 40M dr-xr-xr-x 4 root root 4.0K Sep 21 21:12 . dr-xr-xr-x 18 root root 257 Oct 24 14:31 .. -rw-r--r-- 1 root root 118K Sep 3 19:06 config-4.14.193-149.317.amzn2.x86_64 drwxr-xr-x 3 root root 17 Sep 21 21:10 efi drwx------ 5 root root 79 Sep 21 21:12 grub2 -rw------- 1 root root 31M Sep 21 21:12 initramfs-4.14.193-149.317.amzn2.x86_64.img -rw-r--r-- 1 root root 654K Sep 21 21:12 initrd-plymouth.img -rw-r--r-- 1 root root 230K Sep 3 19:07 symvers-4.14.193-149.317.amzn2.x86_64.gz -rw------- 1 root root 2.7M Sep 3 19:06 System.map-4.14.193-149.317.amzn2.x86_64 -rwxr-xr-x 1 root root 5.5M Sep 3 19:06 vmlinuz-4.14.193-149.317.amzn2.x86_64 -rw-r--r-- 1 root root 174 Sep 3 19:06 .vmlinuz-4.14.193-149.317.amzn2.x86_64.hmac
//here you intramfs file are the kernel file in aws there is no rescue mode
//ec2 and normal vm are different normal vm you could see three file
//below are the normal vm server kernel file
initramfs-0-rescue-8ecdff3415a94ce2bc3f5125db312e97.img initramfs-3.10.0-1062.12.1.el7.x86_64.img initramfs-3.10.0-1062.12.1.el7.x86_64kdump.img
------------------
EC2
# rpm -qa |grep kernel kernel-tools-4.14.193-149.317.amzn2.x86_64 kernel-4.14.193-149.317.amzn2.x86_64
normal server
# rpm -qa | grep kernel
kernel-tools-3.10.0-1160.2.1.el7.x86_64 kernel-headers-3.10.0-1160.2.1.el7.x86_64 kernel-3.10.0-1160.2.1.el7.x86_64 kernel-3.10.0-1062.12.1.el7.x86_64 kernel-3.10.0-1127.18.2.el7.x86_64 kernel-tools-libs-3.10.0-1160.2.1.el7.x86_64
//before update kernel check boot space because kernel package will stored in /boot
# df -h /boot/ Filesystem Size Used Avail Use% Mounted on /dev/xvda1 10G 1.4G 8.7G 14% /
//above is ec2 there have 10 gb available so we can go for kernel update
# df -h /boot/ Filesystem Size Used Avail Use% Mounted on /dev/sda1 1014M 284M 731M 28% /boot
0 Comments