I have a physical CentOS 5.11 machine and I created a tar of it using:
sudo su
cd /
tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /
I created a Hyper-V virtual machine, installed CentOS 5.11 and restored the backup using:
tar xvpfz backup.tgz -C /
Now the machine won't boot. This is the screen I'm confronted with upon boot: (sorry, I can't post images yet) https://imgur.com/a/ZVTIY
I've tried all sorts of reinstalling grub both from a CentOS recovery image and from third party disk recovery images, mkinitrd and so many other things that I can't even remember. I've hit a wall here. Does anyone know why this is happening and how I might fix it? Thanks.
Edit: I've posted the contents of grub.conf, menu.lst, fstab and lvdisplay in the comments. I'm unable to post them here as I don't have enough rep points.
Edit 2: I solved this issue! Thanks to everyone in the comments for your assistance. It was seriously appreciated.
To resolve the problem I booted into a Fedora live cd and mounted my file systems as I mentioned in the comments. Once mounted I issued the following: mkinitrd --with=hid-base-hv --with=hid-hyperv --with=hv_utils --with=hv_vmbus --with=hv_storvsc --with=hv_netvsc /boot/initrd-2.6.18-408.el5.img 2.6.18-408.el5 -f
Then I rebooted the machine and it came alive.