www.vmwareadmins.com

how many VMs can you put in a box?

  • Increase font size
  • Default font size
  • Decrease font size
Home Articles Recovering Linux VM after running mbralign using vCO part 1

Recovering Linux VM after running mbralign using vCO part 1

E-mail Print PDF

as you saw in the previous article, the manual step would be:

to fix this, boot to a rescue CD (installation media) and then:

Launch GRUB by typing the following

grub

Select the correct disk and fix the GRUB stages as follows
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

Reboot and be happy now :)

However, how can I automate this?

first, mount the disk image using vmware-mount utility from our mounted NAS filesystem...

vmware-mount -f /vmfs/volumes/nas-staging/ha002/ha002.vmdk /mnt/ha002/flat

then trick GRUB into thinking we have a block device

echo “(hd1) /mnt/ha002/flat" >/tmp/device.map 

now run GRUB against this fake block device

grub --batch --device-map=/tmp/device.map 

and fix grub like you did before

grub> root (hd1,0)
grub> setup (hd0)
grub> quit

umount the disk and your done!

vmware-mount -x

Now to build the vCO workflow...

 

 

 

Follow Me On...

Facebook linkedin twitter youtube