CentOS 5 Hyper-V VM Won't Boot After Integration Services Removal← Back
I had a CentOS 5 Hyper-V VM running on Windows 2012 / Hyper-V 3.0 on which I mistakenly installed the Linux Integration Services 3.4 using the RHEL57 packages. The installation completed with some warnings and the initial reboot was OK, but after removing the "microsoft-hyper-v" and then "kmod-microsoft-hyper-v" packages the VM would no longer boot due to a kernel panic.
The kernel panic message was:
switchroot: mount failed: No such file or directory Kernel panic - not syncing: Attempted to kill init!
- I booted from the CentOS 5 installation CD #1 and entered "linux rescue" at the "boot:" prompt to enter rescue mode.
- I selected the default language options.
- I chose not to start networking services, as they were not required.
- I selected the Continue button to mount the filesystem under /mnt/sysimage
- I modified /mnt/sysimage/boot/grub/grub.conf
- The existing kernel line was similar to
kernel /vmlinuz-2.6.18-194.el5 ro root=/dev/VolGroup00/LogVol00 noprobe=hda1 noprobe=hda2
- I modified it to
kernel /vmlinuz-2.6.18-194.el5 ro root=/dev/VolGroup00/LogVol00
After rebooting, the server booted successfully.
If you didn't install the Development Tools group during initial installation, you'll likely need to remove the Hyper-V VM network adapter and add a Legacy Adapter to enable network connection.