Skip navigation
VMware

This Question is Answered (go to answer)

2 "helpful" answers available (6 pts)
4,018 Views 9 Replies Last post: Apr 29, 2010 5:16 AM by Scottee RSS
Pierre Chatel… Novice 6 posts since
Jun 12, 2008
Currently Being Moderated

Jun 12, 2008 4:14 AM

VMWare cannot boot BootCamp partition because of GRUB

Hello,

 

It looks like Fusion "Bootcamp" VM hangs on Grub. How to Fix?, but is quite different, so I have created a new discussion.

 

Symptoms : when trying to boot my BootCamp partition, it hangs at the Grub stage, with no error from Grub. But VMWare Fusion 2.0 beta 1 can output :

      • Virtual machine kernel stack fault (hardware reset) ***

The virtual machine just suffered a stack fault in kernel mode. On a real computer, this would amount to a reset of the processor. It can be caused by an incorrect configuration of the virtual machine, a bug in the operating system, or a problem in the VMware Fusion software. Press OK to reboot virtual machine or Cancel to shut it down.

 

Precisions :

I have a Macbook Pro. When installing Leopard, I made 4 partitions (Leopard/ext3 for Linux/FAT32 for XP/FAT32 for Vista).

-I have installed Leopard.

-I have installed refit

-Then, I have installed Windows XP (since my partition was ready, I did not use the BootCamp assistant), and converted FAT32 to NTFS

-Then I have installed Linux Ubuntu 8.04, with Grub.

All work well in native boot.

 

-When launching VMWare Fusion 2.0 beta 1, it automatically detects a "BootCamp partition".

-If I try to launch it, it fails at the GRUB stage with no error, and does not say anything else (see below for explanation of where the quoted error message comes from)

-So, I tried to create a Virtual Machine by "importing" the BootCamp partition, right inside VMWare Fusion.

-If I try to launch the Virtual machine instead of the "BootCamp partition", it fails at the GRUB stage with no error, and in this case outputs the previously quoted stack fault.

 

Any idea, workaround ? Should I wait beta 2 ? Replace Grub by LILO ?

 

Regards,

 

Pierre

mudaltsov Expert VMware Employees 434 posts since
Nov 12, 2007
Currently Being Moderated
2. Sep 22, 2008 2:57 PM in response to: Pierre Chatel…
Re: VMWare Fusion 2.0 and GRUB

As far as I know, Apple doesn't officially support Linux with Boot Camp, so it's not officially supported by Fusion either. But since other users have gotten it to work in the past, it should be possible.

 

Are you trying to just boot your BootCamp VM that Fusion automatically created? That will typically only work for Windows, since those are the ones Fusion detects and uses for BootCamp. You need to set up a new VM with a custom vmdk that uses your Linux partition. This can be done with vmware-rawdiskCreator, as described in the third thread you referenced. Similar instructions can be found on various other sites if you search for "rawdiskCreator" and "Ubuntu", for example http://taylorbanks.com/blog/ubuntu-on-the-macbook-pro-physical-virtual-or-both/

 

Also, I'm not sure if it will be an issue or not, but when you boot natively Ubuntu is using SATA (/dev/sd), while Fusion uses virtual IDE disks (/dev/hd) for raw disk access. Though I didn't see any comments about this elsewhere, so it might work regardless.

mudaltsov Expert VMware Employees 434 posts since
Nov 12, 2007
Currently Being Moderated
4. Sep 23, 2008 11:28 AM in response to: Pierre Chatel…
Re: VMWare Fusion 2.0 and GRUB

i don't think there's anything specific to GRUB that should prevent it from booting, since it works just fine for regular VMs.

 

In this new configuration, my triple-native-boot work, WinXP work in VMWare Fusion, but Linux does not boot in VMWare Fusion. It looks for a boot device, try to find it by DHCP, and finally fails. It is not able to find the /boot directory on the /dev/sda3 parittion.

This might mean that the disk isn't configured as bootable in the VM's BIOS. You can access it at the beginning of the boot process if you press F2 (or ESC, then choose Setup). Make sure that the hard drive is properly visible (should typically be Primary Master in the Main category) and is set to be bootable in the Boot category.

 

Aside from that, I'm not sure what could be wrong... Maybe try booting with a Live CD or something similar to make sure you can actually see the Linux partition in that VM?

cgguy Novice 13 posts since
Apr 19, 2008
Currently Being Moderated
6. Sep 23, 2008 9:09 PM in response to: Pierre Chatel…
Re: VMWare Fusion 2.0 and GRUB

Fantastic! Please post more details. It might be helpful for everyone.

dpdus Lurker 1 posts since
Mar 10, 2009
Currently Being Moderated
8. Mar 10, 2009 11:24 PM in response to: Pierre Chatel…
Re: VMWare Fusion 2.0 and GRUB

I have been trying to get the techniques described here and elsewhere to work for me. I feel that I am really close, but I am missing a last step.

 

I currently have a triple boot (BootCamp) with OS X Leopard, Debian 5.0 Linux, and Windows XP using ReFit. vmware-rawdiskCreator prints:

 

./vmware-rawdiskCreator print /dev/disk0

Nr      Start       Size Type Id Sytem                  

-- -


-


-


-- -


1          1     409639 BIOS EE Unknown

2     409640  406141832 BIOS AF HFS+

3  406813616  107391720 BIOS 83 Linux

4  516311040  108830720 BIOS  7 HPFS/NTFS

 

The Refit/triple-boot works fine, so I am now trying to run Windows and Linux through VMWare Fusion (2.0.2).

 

Using the rawdiskCreator, I was able to get Windows XP working fine under VMWare. But I am still having problems with Linux.

 

With Linux, I started by creating a "Other Linux 2.6.x kernel 64-bit" as my template. Following instructions I found here:

http://taylorbanks.com/blog/ubuntu-on-the-macbook-pro-physical-virtual-or-both,

I created the rdm files and edtied my .vmx file.

 

Following this thread, I booted VMWare into the bios via F2 to prevent the network boot from trying to preempt the disk.

 

So finally, when I try booting, I see:

Welcome to GRUB!

 

error: no such partition

Entering rescue mode...

grub rescue>

 

 

This is the farthest I've been able to get. Does anybody know how to get past this?

 

I only installed GRUB to /dev/sda3 when I went through the Linux installation. I did not install it to the MBR.

 

I'm speculating that maybe the device numbers or mapping is inconsistent when running through VMWare than when booting directly to Linux, but this is only a guess. But it might explain the "no such partition".

 

I tried removing the SCSI device created by the template (since I don't have one in real life), via both the VMWare config and directly removing it from the .vmx file. But it hasn't helped so far.

 

Thanks

Scottee Lurker 2 posts since
Apr 29, 2010
Currently Being Moderated
9. Apr 29, 2010 5:16 AM in response to: dpdus
Re: VMWare Fusion 2.0 and GRUB

 

My reply as per this thread: http://communities.vmware.com/message/1524727

 

 

 

 

 

First off, an extra piece of information. When you create a rawdisk your

bootsector/MBR (I'm not sure which) is duplicated in the

<diskname>-pt.vmdk file.

 

 

 

I jumped thru the following hoops to get my OSX/WinXP/Ubuntu setup

going in both native and vmware modes for WinXP and Ubuntu. As a note I

started with a setup where windows was booting via GRUB in MBR. My

partitions are EFI,OSX,Ubuntu,Win in that order.

 

 

 

1) Use windows recovery console to fix MBR, reboot through Windows and

then again to OSX

 

 

 

2)Create WinXP rawdisk (VMWare Bootcamp ~/Library/Application

Support/VMWare Fusion/etc/etc/etc).

 

 

 

3)Boot Ubuntu from Install CD, grub-install --force (hd0,3), reboot

through Ubuntu then again to OSX. This fixes native grub boot

 

 

 

4) Create Ubuntu rawdisk, if you boot from this you get Partition not

found error. If you run 'ls' from the rescue> prompt, a listing of

'(hd0) (fd0)' will confirm your at the same point as me.

 

 

 

5) Boot VMware Ubuntu from Install CD, grub-install --force (hd0),

grub-install --force (hd0,3) , reboot the VM and ensure it now works.

 

 

 

6) Check your native boots, if you have issues use steps 1) or 3) to fix

the respective OS.

 

 

 

 

 

 

 

 

 

Goodluck, but all this messing with MBR's and Bootsectors is hazardous,

make sure you backup first!

 

 

 

 

 

 

 

 

--Scott

Bookmarked By (0)

Share This Page

Communities