So if you're running CentOS as a Hyper-V guest you may have seen something like this after updating the kernel and your OS won't boot anymore. "Kernel panic - not syncing: Attempted to kill init!"
In order to fix this you'll need to reboot into the previous kernel that you installed the integration components to, and update the new kernel with the integration components drivers. To get the integration components to install to a kernel that's not running you need to edit the following files to specifiy which kernel to install to.
/opt/integration_services/Makefile
/opt/integration_services/scripts/updategrub.pl
/opt/integration_services/scripts/updateinitrd.pl
/opt/integration_services/scripts/determine_os
/opt/integration_services/src/Makefile
Anything in these files that says shell uname -r needs to be replaced with shell echo "2.6.18-194.26.1.el5" use the new kernel version between the quotes.
Anything in these files that says `uname -r` needs to be replaced with "2.6.18-194.26.1.el5" use the new kernel version between the quotes.
Reboot the system and when prompted hit a key to get the below menu. Select the last kernel you know to have worked. Also write down the new kernel version number, we'll need it when editing the scripts.
Change directories to wherever you have the linux integration components install files, in my case /opt/integration_services. To find the files you need to edit run # grep -iR "uname -r" *
Now start editing the scripts... first one is the Makefile, there's 3 spots that need to be changed in this file, screenshots only show the first two.
|
Before |
After |
Next is scripts/updategrubconf.pl
|
Before |
After |
scripts/updateinitrd.pl
|
Before |
After |
scripts/determine_os
|
Before |
After |
src/Makefile
|
Before |
After |
Now run # make
# make install
Now reboot and let it start the new kernel. It should load up fine.