FearAndLoath.Us

Fear Computers. Loath Software. We are your Masters.

Sunday, September 9, 2007

Linux, VMWare Fusion & Bootcamp Partition

If you install Windows XP on a partition of your Mac using Bootcamp, VMWare Fusion should see it, and allow you to boot Windows inside the VM. I installed Ubuntu Feisty on another partition of my Mac, so VMWare Fusion doesn’t notice it automatically, but I finally found out how to get Ubuntu running in the VM without requiring a second installation with a separate VMWare disk image.

The secret is to use vmware-rawDiskCreator as discussed in this InsanelyMac forum. Here are some more detailed directions:

  1. In VMWare Fusion, create a new vmware instance called MyUbuntu. Under “Settings” for that vm, you can change or add a new IDE hard drive. This will make life easier, since you won’t have to worry about having the right SCSI driver if you are running a minimalistic Linux distro. From the command line, MyUbuntu is really a directory called MyUbuntu.vmwarevm (yes, vm appears twice in that extension).
  2. Close MyUbuntu in VMWare Fusion, so you can edit it directly.
  3. In a terminal:
    1. cd "/Library/Application Support/VMware Fusion/"
    2. List the partitions on your hard drive.
      ./vmware-rawdiskCreator print /dev/disk0
    3. Create a file that points VMWare at your partition. (My bootcamp partition is number 3, so that is why you see a 3 in the following command.)
      ./vmware-rawdiskCreator create /dev/disk0 3  /Users/USERNAME/MyUbuntu.vmwarevm/bootcamp_partition ide
  4. Add or edit these lines in the text file /Users/USERNAME/MyUbuntu.vmwarevm/MyUbuntu.vmx
    ide0:0.present = "TRUE"
    ide0:0.fileName = "bootcamp_partition.vmdk"
  5. Run MyUbuntu in VMWare Fusion. You will be asked for your administrative password, because VMWare Fusion must be granted access to read and write to your bootcamp partition.
posted by admin at 2:17 pm  

111 Comments »

  1. did you have any trouble with xorg starting up under vmware? I did this and it got to the point where gdm should have started and didnt go any further. I was able to go to another vt and login but I’d rather not go changing my xorg.conf needlessly

    Comment by lucas — October 3, 2007 @ 12:05 am

  2. I actually don’t mind that gdm doesn’t start up under the VM, since it is very annoying to have to press Control-Command in order to exit the VM. Instead, I add the following two lines to my /Users/USERNAME/.ssh/config file under MacOSX, and then I can ssh into Linux using the Mac’s X11 app and run any application, e.g. xeyes.

    ForwardX11 yes
    ForwardX11Trusted yes

    The vmware virtual video card is much different that the physical card, so you would only be able to use a single xorg.conf if you run at 800×600 with the vesa driver or 640×480 with the vga driver. If you are running Ubuntu Gutsy Gibbon, which is almost out of beta, BulletProofX will drop down to 800×600 for you.

    https://wiki.ubuntu.com/BulletProofX

    Comment by admin — October 3, 2007 @ 9:23 am

  3. Worked a treat, thanks for the tip!

    Comment by Bones — October 11, 2007 @ 4:01 pm

  4. I got Gutsy Gibbon to install right and it begins to boot, but then after hitting:

    * Running local boot scripts (/etc/rc.local) [OK]

    it hangs. I get a blinking cursor, and nothing happens. Ideas?

    Comment by Andy — October 22, 2007 @ 3:01 pm

  5. I would guess that Xorg is hanging. Try rebooting into “recovery mode” which will prevent Xorg from starting. Now, you can try to fix the X configuration file with:
    dpkg-reconfigure xserver-xorg

    You can test out your new configuration file with:
    /etc/init.d/gdm start

    Comment by admin — October 22, 2007 @ 5:13 pm

  6. Is this also working with tripple boot? Or better: with any partition on the HDD?
    So i could use Win and Ubuntu in native and VMware?!?

    Comment by NEI — November 12, 2007 @ 2:50 pm

  7. NEI,

    I haven’t tested it with a triple-boot setup, but since this technique looks at the partition table to map the vmware drive to the real partition, it should work just fine as long as your windows and linux partitions are primary partitions, since it is questionable whether extended/logical partitions are supported.
    See http://ubuntuforums.org/archive/index.php/t-564396.html

    You can only have 4 primary partitions, which would probably end up as:
    1. EFI
    2. OSX
    3. Linux
    4. Windows

    You might be able to have vmware boot an OS on a extended/logical partition if you have vmware boot off of your linux partition and you configure grub to be able to boot off of various other windows or linux partitions.

    Here is some information on completely replacing EFI with grub, which may or may not work with vmware. It would probably be a good idea to test this on an external drive.
    http://ubuntuforums.org/archive/index.php/t-233400.html

    Comment by admin — November 12, 2007 @ 7:54 pm

  8. Hi,
    Thank you very much for this trick. Works seamlessly.

    To answer the previous question, i confirm that it does work in triple boot config.

    About the display problem, I remember having the same kind of setup using parallels, with a script changing the Xorg configuration file from native to vm version at boot time. If i get a good solution, i’ll post it here.

    Comment by Phil — November 15, 2007 @ 8:28 am

  9. print /dev/disks0 does not show my linux partition, I think I did something wrong i split my bootcamp partition up I cant mount it via osx.

    Comment by w0mbat — November 26, 2007 @ 9:36 pm

  10. Can you try using
    sudo fdisk /dev/rdisk0
    or “Disk Utility” to view your current partitioning scheme?

    Comment by admin — November 27, 2007 @ 1:06 am

  11. yes I can view it. I just can’t seem to get this to work, I get a syntax error. Which I suppose it is due to something I did with the partition table. Altho OS X/Ubuntu co-exist in harmony I’m not exactly sure how I can access that partition via this method. Thanks for the fast response!

    Comment by w0mbat — November 27, 2007 @ 10:29 am

  12. “Unable to copy source file to destination files.”

    Comment by w0mbat — November 27, 2007 @ 10:33 am

  13. Could you post the full output of fdisk and vmware-rawdiskCreator? BTW, have you tried using “sudo” with vmware-rawdiskCreator? Normally, vware-rawdiskCreator is setuid to root so you don’t have to.

    This is the output of “ls -l” I get for the permissions on vmware-rawdiskCreator:

    -rwsr-xr-x 1 root wheel 3M Nov 2 18:11 vmware-rawdiskCreator*

    Comment by admin — November 27, 2007 @ 10:47 am

  14. Starting Ending
    #: id cyl hd sec - cyl hd sec [ start - size]
    ————————————————————————
    1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639]
    *2: AF 1023 254 63 - 1023 254 63 [ 409640 - 190578688] HFS+
    3: 83 1023 254 63 - 1023 254 63 [ 191250472 - 38566406] Linux files*
    4: EE 1023 254 63 - 1023 254 63 [ 1 - 234111799]

    Comment by w0mbat — November 27, 2007 @ 11:18 am

  15. My linux partition has the partition ID “EF” instead of “83″ so it displays “Unknown ID” on the right instead of “Linux files”.

    Apparently, this has caused problems with other people getting vmware to find the bootcamp partition.
    http://www.macwindows.com/vmware.html#091707c

    Comment by admin — November 27, 2007 @ 11:53 am

  16. I did manage to get the cmd to work but I get no vmx file? Also thanks for the link but that did not work either:

    “fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory”

    I should have paid more attention when I partitioned the drive. At first it was a failed XP install (maybe a bad disc not sure) so I just said f it I will run XP virtually in VM player so I grabbed a copy of Gutsy Gibbon and installed.

    Comment by w0mbat — November 27, 2007 @ 12:53 pm

  17. I appreciate your time and help btw!

    Comment by w0mbat — November 27, 2007 @ 12:53 pm

  18. This forum indicates that the fdisk error about /usr/standalone/i386/boot0 can be ignored.

    http://forum.insanelymac.com/lofiversion/index.php/t20451.html

    Comment by admin — November 27, 2007 @ 1:06 pm

  19. Ah! ok that part worked but I still get:
    “Unable to copy source file to destination files.”

    Comment by w0mbat — November 27, 2007 @ 1:51 pm

  20. Hey, I’m trying to do this too and it’s working so far until the “Unable to copy source file to destination files” message comes up!!

    Any ideas what’s causing this?

    Comment by Karen — December 9, 2007 @ 3:15 pm

  21. Karen, which command are you running when you get that error?

    You might want to try putting “sudo ” in front of the command, so that it will run as the superuser (admin) which has access to all the files on your computer.

    Comment by admin — December 9, 2007 @ 3:26 pm

  22. Hi, thanks for your quick reply! :) I tried using sudo -i and got the same error message, but then I moved the MyUbuntu vmware image to my home directory and it worked fine!

    The bootcamp files are there inside the image, but when I open it in vmware fusion it says “file not found: bootcamp_partition.vmdk”

    Do you have any idea why this is happening? ^.^

    Comment by Karen — December 9, 2007 @ 4:18 pm

  23. Karen, I’m guessing that the changes to the .vmx file from step 4 are not matching the location or name of the .vmdk file you generated. I’m having a hard time picturing the location of all the files. If you could send the output of “ls” inside your .vmwarevm directory, as well as the lines you added to your .vmx file, I could comment on this further.

    Comment by admin — December 9, 2007 @ 4:36 pm

  24. Okay :) here’s the ls output:

    MyUbuntu-IDE_0-0.vmdk MyUbuntu.vmx
    MyUbuntu.vmdk bootcamp_partition-pt.vmdk
    MyUbuntu.vmsd bootcamp_partition.vmdk

    and this is the text I changed:

    ide0:0.present = “TRUE”
    ide0:0.fileName = “bootcamp_partition.vmdk”

    Comment by Karen — December 9, 2007 @ 4:49 pm

  25. Karen, you might want to run “ls -l” to look at the file permissions. Also, it looks like you have curly quotes (“”) in your .vmx file instead of ASCII quotes (”"). Your text editor may be automatically adding curly quotes, or your .vmx file might be fine, and your web browser is adding curly quotes when add a comment.

    Text Wrangler is a good text editor that shouldn’t add any curly quotes:
    http://www.barebones.com/products/textwrangler/

    Comment by admin — December 9, 2007 @ 6:24 pm

  26. Hmmm, it appears that wordpress (this blog’s software) is adding “curly quotes” automatically.

    Comment by admin — December 9, 2007 @ 6:26 pm

  27. It’s really nice of you to be helping me so much :D

    I’m using BBEdit and there doesn’t appear to be any curly quotes anywhere, and these are the file permissions:

    -rw——-@ 1 karen staff 2686976 9 Dec 21:06 MyUbuntu-IDE_0-0.vmdk
    -rw——-@ 1 karen staff 1114112 9 Dec 21:06 MyUbuntu.vmdk
    -rw——- 1 karen staff 0 9 Dec 21:06 MyUbuntu.vmsd
    -rwxr-xr-x@ 1 karen staff 1016 9 Dec 21:15 MyUbuntu.vmx
    -rw——- 1 root staff 32256 9 Dec 21:06 bootcamp_partition-pt.vmdk
    -rw—-rw- 1 root staff 500 9 Dec 21:06 bootcamp_partition.vmdk

    Does everything look alright?

    Comment by Karen — December 9, 2007 @ 7:07 pm

  28. Karen, the permissions could definitely be a cause of the problem. To fix them run these commands:

    sudo chown karen bootcamp_partition.vmdk
    sudo chown karen bootcamp_partition-pt.vmdk

    Comment by admin — December 9, 2007 @ 7:27 pm

  29. Oh wow thankyou so much!!!! It’s working perfectly now :D

    Yay :D

    Comment by Karen — December 9, 2007 @ 7:38 pm

  30. How do you go about setting up ssh between OS X and Ubuntu? I’ve never quite figured out how to set ssh stuff up, so I don’t know how to go about doing all of that ssh kung-fu that you do. Any help would be appreciated!

    Comment by Ian — December 11, 2007 @ 11:23 pm

  31. Ian, the first thing you will want to check is to see what IP address your ubuntu vmware instance is using. On ubuntu, run:

    sudo /sbin/ifconfig

    Then look for eth0 or eth1 which will be your ethernet device. You should see a line that starts with “inet addr:” followed by the IP address if ubuntu was able to access the vmware DHCP server correctly.

    To install the ssh server on ubuntu, run:

    sudo apt-get install openssh-server

    The server should automatically be started, but if it isn’t, you can run:

    sudo /etc/init.d/ssh start

    Using the Terminal application on your mac, you should now be able to ssh into ubuntu running under vmware.

    Comment by admin — December 12, 2007 @ 12:13 am

  32. Ok, well I’m getting there, but whenever I try to ping ubuntu at its IP address, it says that the “network is down”. Internet is working correctly for both Ubuntu and my normal system, so I’m not sure where to go from here.

    Comment by Ian — December 13, 2007 @ 12:42 am

  33. Ian, you might be having problems with the specific network mode that vmware is using. In the Settings window, under Network, try choosing NAT mode. You will probably have to restart ubuntu before vmware activates that mode. You will also need to run /sbin/ifconfig to see if your ip address has changed.

    Comment by admin — December 13, 2007 @ 4:30 pm

  34. Ian, you might also try running the following command under the Terminal app on your Mac:

    sudo /sbin/ifconfig vmnet8 up

    For some reason, the Mac OS sometimes believes that the vmware virtual network is down.

    Comment by admin — December 19, 2007 @ 11:18 am

  35. Worked perfectly for me. Thanks!

    Comment by Mark Spencer — December 26, 2007 @ 12:23 am

  36. What about the Tools? Will the virtualized Ubuntu installation support both the original drivers adn the Fusion Tolls together as in WinCamp?

    Comment by Simon — January 8, 2008 @ 5:05 pm

  37. I usually just ssh into ubuntu under vmware, but it appears you can install the VMWare Tools to provide drag-and-drop between the Mac and Ubuntu according to this tutorial:
    http://svenand.blogdrive.com/archive/56.html

    Comment by admin — January 8, 2008 @ 5:27 pm

  38. Yes I did it! It didn’t take me this long I just got a new hd and gave it a whirl and it worked. Now I have a new issue. I am at the grub shell and I can’t find my grub.conf (via find).

    Any ideas?

    Comment by w0mbat — January 11, 2008 @ 1:23 am

  39. w0mbat, you are probably looking for the /boot/grub/menu.lst file, which is where you specify the kernels and options for booting.

    Comment by admin — January 14, 2008 @ 11:11 am

  40. Great job figuring this out, got it working but the boot fails when it tries to read rc.local and load my MadWIFI driver. anyway to get around this without disabling them at boot?

    Comment by gojulas — January 15, 2008 @ 1:21 am

  41. Hi, is there a way to add the entire HD instead of just one partition? I am using a quadruple boot system (vista, leopard, ubuntu, and xp)… and I want to be able to use VMware to boot vista, xp and ubuntu.. but I’m not sure how. How did the triple boot system work?

    Thanks,
    Ant

    Comment by Ant — January 24, 2008 @ 11:25 pm

  42. Ant,

    Here are some directions on getting all the partitions set up.
    http://wiki.onmac.net/index.php/Triple_Boot_via_BootCamp

    After you are done with that, you can create a VM image for each installed OS. You would run through all the steps above for each partition, but you would use a different name than “MyUbuntu” for each additional partition.

    If you want to share files across VMs, I would suggest you use network file sharing.

    If you want to use multiple partitions under a single OS, you would list multiple .vmdk files in your .vmx file:

    ide0:0.present = “TRUE”
    ide0:0.fileName = “first_partition.vmdk”
    ide0:1.present = “TRUE”
    ide0:1.fileName = “second_partion.vmdk”

    Comment by admin — January 25, 2008 @ 12:17 pm

  43. Thanks for the info! However, my computer is set up slightly differently.
    All my partitions are MBR format (AFAIK) and they all boot off the Grub bootloader (with Ubuntu 7.10). Ubuntu and Windows XP are in logical partitions, while Vista and OS X are primary partitions. In order to boot XP, I have to go through the Vista bootloader (Grub refuses to boot XP off a logical partition for some reason). For this reason, I need to have the Ubuntu partition, Vista, and XP all in one VM.

    When I list multiple .vmdk files into my .vmx file, ide0:0 is Primary Master, ide0:1 is primary slave, ide1:0 is secondary master (I disabled the CD rom), and ide:1:1 is secondary slave. They’re detected as separate drives in the VM. However, when I boot up the VM, only primary master/slave are loaded as hard drives (secondary master/slave missing?) Furthermore, Ubuntu partition (drive in VM) needs to be ide0:0 to load grub. Vista gives me some weird error about /Boot/BCD, and XP can’t be loaded at all. When I try to load Vista on ide0:1 I have to tell Grub to find Vista in (hd1,1).

    I am not sure how to make this setup work. Is there any way to load the entire HD (with all partitions) as just ide0:0?

    Thanks again,
    Ant

    Comment by Ant — January 26, 2008 @ 4:42 pm

  44. Ant,

    I don’t see anyway to create a multiple partition vmdk file from vmware-rawdiskCreator. I did find this information about editing the vmdk file to specify an entire disk, but I don’t have any experience with it.
    http://sanbarrow.com/vmdk/disktypes.html#fullDevice

    Here is a description of how you get the parameters to fill in the vmdk using hdparm.
    http://blog.lsweb.eu/index.php?itemid=13

    You should be able to do the same under MacOS X with:
    sudo fdisk -l /dev/disk0

    and look for the line
    Disk: /dev/disk0 geometry: 14593/255/63 [234441648 sectors]

    It’s confusing that sectors get mentioned twice. I believe 63 is the sector id whereas the big number is the total number of sectors, i.e. blocks.

    If you don’t like editing your own vmdk file, there may be another way to get this to work. I’m assuming that you are already able to use bootcamp to boot into XP and Vista, so you just need to get this to work in vmware. Therefore, you won’t want to change any of the current entries in /boot/grub/menu.lst, but you can add additional entries that handle the vmware disk layout. In other words, your grub menu would contain an entry for “Vista-bootcamp” and “Vista-vmware”.

    I’m not sure how you are testing whether the secondary master/slave are there. Can you post the results from the following commands after booting into ubuntu under vmware?

    fdisk -l /dev/hda

    Then, do the same for hdb, hdc, hdd, sda, sdb, sdc, and sdd.
    Calling “fdisk -l” without a drive might also work. BTW, when I ran “fdisk -l /dev/sda” under vmware, it showed all three of my partitions, but it only let me access the one specified in the vmdk.

    If you are unable to find the secondary master/slave with fdisk, I’m not sure what is wrong. If you are able to find them, then you can add some entries to the /boot/grub/menu.lst file to trick XP and Vista into thinking they are the main drive by using the “map” grub configuration. “hide” and “unhide” may also be useful.

    http://users.bigpond.net.au/hermanzone/p15.htm#Windows_on_a_non-first_hard_disk

    Comment by admin — January 26, 2008 @ 6:47 pm

  45. Hi,

    Thanks for all the help. I was trying to figure out how the vmdk file works… and I noticed that under linux (as you noticed too), all the partitions are there but only the one in the .vmdk file can be “read”. Looking at the vmdk file, I noticed that all the other ones have ZERO written next to it. I replaced each with the /dev/disk0s3, etc, and edited in the -part.vmdk file name for each partition, and now I can mount 1 disk that allows the VM to read all partitions properly!

    Now the only thing is my Windows XP has a 0×0000007B error when I boot up (something to do with the HD), and Vista lags a LOT.

    Thanks for all the help,
    Ant

    Comment by Ant — January 27, 2008 @ 4:06 am

  46. Hi,

    suddenly i keep getting the following message:
    “Unable to copy source file to destination files.”
    even if i try pointing the vm to my home directory, like karen did, or using sudo, or sudo -i

    My Macbook has triple boot with rEFIt. MBR and GPT are sync. I’m using Paragon NTFS driver to access my ntfs drive with read&write permissions.

    Partitionn layout:
    n.1 EFI
    n.2 Vista x64 NTFS
    n.3 Storage NTFS
    n.4 OSX HFS+
    n.5 Storage2 HFS+
    n.6 Ubuntu EXT3
    n.7 Ubuntu SWAP

    Here is the result of the print command:

    ./vmware-rawdiskCreator print /dev/disk0
    Nr Start Size Type Id Sytem
    – ———- ———- —- — ————————
    1 1 409639 BIOS EE Unknown
    2 409640 67108864 BIOS 7 HPFS/NTFS
    3 67518504 301989888 BIOS 7 HPFS/NTFS
    4 369508392 209715200 BIOS AF HFS+

    i’m trying to start the partition n.2 (Vista x64 on a 32GB partition).
    And here is the command i use:

    :vmware fusion alex$ sudo ./vmware-rawdiskCreator create /dev/disk0 2 /Users/alex/Vista.vmwarevm/bootcamp_partition ide
    Unable to copy the source files to the destination files.

    or

    :VMware Fusion root# ./vmware-rawdiskCreator create /dev/disk0 2 /Users/alex/Vista.vmwarevm/bootcamp_partition ide
    Unable to copy the source files to the destination files.

    Another output:

    :vmware fusion alex$ ls -l vmware-rawdiskCreator
    -rwsr-xr-x 1 root wheel 3193796 17 Gen 06:32 vmware-rawdiskCreator

    The mount point of the partition n.2 is /dev/disks0. The only thing that happens when i try using the command rawdiskCreator is that the mounted partition “Untitled” (partition n.2 containing Vista) disappears for 1 second from the desktop area.

    I hope you may help me…

    Thank You all!

    Alessandro

    Comment by Alessandro — February 12, 2008 @ 4:44 am

  47. Alessandro, it sounds like vmware-rawdiskCreator is not able to read from partition 2 because it is mounted. If you have problems even after unmounting it, you could boot MacOSX into single-user mode by holding down Command-S while booting. This would prevent any other program from interfering with vmware-rawdiskCreator.

    Comment by admin — February 12, 2008 @ 10:18 am

  48. Hallo Admin!

    Suddenly nothing helped. I tried starting with command-S, mounting the root filesystem and kept getting the (in)famous “unable to copy the sources files to the destination files”.
    I unmounted disk0s2 and repaired all permissions with disk utility before doing anything else.
    What could i do?
    Thx,
    Alessandro

    Comment by Alessandro — February 13, 2008 @ 10:53 am

  49. Hi!
    I found the way. My fault. The command wmware-rawdiskcreator doesn’t create directories. I just needed to create a specific directory before applying it.

    Now i got 2 files in /users/alex/documents/virtual machines/vista.vmwarevm:
    bootcamp_partition-pt.vmdk
    bootcamp_partition.vmdk

    I added in VmWare Fusion under Boot Camp settings a hard disk pointing to just created file but it doesn’t work.

    Editing the bootcamp_partition.vmdk i get:

    # Disk DescriptorFile
    version=1
    CID=069c99fd
    parentCID=ffffffff
    createType=”partitionedDevice”

    # Extent description
    RW 1 FLAT “bootcamp_partition-pt.vmdk” 0
    RW 409639 ZERO
    RW 67108864 FLAT “/dev/disk0s2″ 0
    RW 301989888 ZERO
    RW 209715200 ZERO
    RW 45918856 ZERO

    # The Disk Data Base
    #DDB

    ddb.adapterType = “ide”
    ddb.geometry.biosSectors = “63″
    ddb.geometry.biosHeads = “255″
    ddb.geometry.biosCylinders = “1024″
    ddb.geometry.sectors = “63″
    ddb.geometry.heads = “16″
    ddb.geometry.cylinders = “16383″

    I miss all the other files usually in a .vmwarevm folder

    Should i copy them from a freshly installed “Vista x64.vmwarevm” folder, adding to the .vmx file the following lines:
    ide0:0.present = “TRUE”
    ide0:0.fileName = “bootcamp_partition.vmdk”

    ???

    Thx Admin!

    Regards,

    Alessandro

    PS: in my configuration i didn’t start the boot camp assistant. I wanted a quad boot system so i started from scratched partitioning the hd and installing osx, vista and ubuntu together with rEFIt. They all work from boot menu.

    Comment by Alessandro — February 13, 2008 @ 11:49 am

  50. ####################################################
    # SORRY - I FOUND SOME TYPING ERRORS IN MY HOWTO #
    # #
    # THIS IS CHECKED UP #
    ####################################################

    Hi,

    I finally found out the way to get my NTFS Boot Camp with Vista x64 working on VmWare Fusion:

    Open Terminal and:

    1. create a directory with full permission (i.e. inside your home folder “/Users/alex/Documents/Virtual Machines/Vista.vmwarevm” - in my case my home folder is named “alex” - you have to change it with your own username)
    mkdir “/Users/alex/Documents/Virtual Machines/Vista.vmwarevm”
    2. go to the folder containing the vmware-rawdiskCreator command
    cd “/Library/Application Support/VMware Fusion/”

    3. run rawdiskCreator command like this:
    sudo ./vmware-rawdiskCreator create /dev/disk0 2 “/Users/alex/Documents/Virtual Machines/Vista.vmwarevm/bootcamp_partition” ide
    (in my case i needed to run Vista from the second partition)

    4. check if in the folder “/users/alex/documents/virtual machines/vista.vmwarevm” the following files were succesfully created:
    bootcamp_partition-pt.vmdk
    bootcamp_partition.vmdk

    5. if the files were created, run VmWare Fusion and “Boot Camp” will show up in the virtual machines list. DO NOT USE IT OR START IT. It’s totally useless but you’will not be able to remove it from the list.

    6. Create a new Virtual Machine (i choosed a Windows Vista 64 machine from the pull down menu).

    7. In the Hard Drive settings write down all the path to the newly created “bootcamp_partition.vmdk” file (in my case: “/users/alex/documents/virtual machines/vista.vmwarevm/bootcamp_partition.vmdk”). Change the allocated space according the the partition size. It will then turn to gray and you will not be able to edit the hard drive settings any longer. That’s normal (if you make a mistake it will warn you or simply delete the hard drive and create a new one)(VmWare Fusion will create/edit automatically the .vmx file).

    8. Start the new virtual machine. That’s it!

    I hope my experience may help you too, as yours did with me!

    Kind regards,

    Alex

    Comment by Alessandro — February 17, 2008 @ 8:32 am

  51. Alex, thanks for the info. I removed your previous post with typos to avoid confusion.

    Comment by admin — February 17, 2008 @ 10:55 am

  52. Hi admin, thanks for this how to. Is it possible to use this tutorial to run Windows XP installed with rEFIt? Thanks

    Comment by jeby — March 26, 2008 @ 1:34 pm

  53. [...] FearAndLoath.Us » Linux, VMWare Fusion & Bootcamp Partition If you install Windows XP on a partition of your Mac using Bootcamp, VMWare Fusion should see it, and allow you to boot Windows inside the VM. I installed Ubuntu Feisty on another partition of my Mac, so VMWare Fusion doesn’t notice it automatically, but I finally found out how to get Ubuntu running in the VM without requiring a second installation with a separate VMWare disk image. [...]

    Pingback by FearAndLoath.Us » Linux, VMWare Fusion & Bootcamp Partition — April 3, 2008 @ 12:57 pm

  54. Worked perfectly on my iMac with Fedora 8. Thanks!

    Comment by jeremy — April 16, 2008 @ 11:32 am

  55. Thanks a ton! I tried a few methods much like this that didn’t seem to work.. and then I tried this method, twice… and the third time was the charm. Tricky stuff, but I got it working on my MacBookPro, for Ubuntu 8.04 64RC. Thank you Thank you.

    Comment by crennie — April 23, 2008 @ 8:46 pm

  56. Just worked for official release 8.04 Ubuntu 32 bit desktop too. Thanks again, you saved me some giggage.

    Comment by crennie — April 24, 2008 @ 3:40 pm

  57. Anyone tried this with a fresh install of VMware Fusion 1.1.2 ? As I did a new / clean install of Leopard, updated Leopard, the installed VMware Fusion 1.1.2 and now this isn’t working.

    My rEFIt works fine to booth Vista and Ubuntu 8.04, but I can’t get VMWare to boot - it acts like the hard drives don’t exist and goes right into PXE network boot.

    I had set this up like 4 times without issue on VMware Fusion 1.1.1 - so I’m thinking something changed in VMware Fusion 1.1.2?

    Comment by RoundSparrow — April 26, 2008 @ 9:37 am

  58. I’ve tried this…have the following printout:

    Nr Start Size Type Id Sytem
    – ———- ———- —- — ————————
    1 1 409639 BIOS EE Unknown
    2 409640 1582811256 BIOS AF HFS+
    3 1583483040 104857600 BIOS AF HFS+
    4 1694908456 258616672 BIOS 7 HPFS/NTFS

    I am able to triple boot into OSX, Linux and Vista. I can run Bootcamp via VMWare and run the VIsta partition without difficulty. I cannot seem to get this to work with the working Ubuntu partition. When trying to Launch MyUbuntu from VMware’s Machine Library, it tries to boot and tells me no OS was found…I have made sure it is set up to use partition #3 where Linux lives.

    Anyone mind helping with this? I’d like to be able to virtualize my Ubuntu like I have the bootable Vista partition.

    jtw

    Comment by jtw — April 29, 2008 @ 4:25 pm

  59. jtw, can you paste in your .vmx file?

    Comment by admin — April 30, 2008 @ 10:43 am

  60. Here is my .VMX:

    config.version = “8″
    virtualHW.version = “6″
    scsi0.present = “TRUE”
    scsi0.virtualDev = “lsilogic”
    memsize = “512″
    MemAllowAutoScaleDown = “FALSE”
    scsi0:0.present = “TRUE”
    scsi0:0.fileName = “MyUbuntu.vmdk”
    ide0:0.present = “TRUE”
    ide0:0.fileName = “bootcamp_partition.vmdk”
    ide1:0.present = “TRUE”
    ide1:0.autodetect = “TRUE”
    ide1:0.deviceType = “cdrom-raw”
    floppy0.present = “FALSE”
    ethernet0.present = “TRUE”
    ethernet0.connectionType = “nat”
    ethernet0.virtualDev = “e1000″
    ethernet0.wakeOnPcktRcv = “FALSE”
    usb.present = “TRUE”
    ehci.present = “TRUE”
    sound.present = “TRUE”
    sound.fileName = “-1″
    sound.autodetect = “TRUE”
    pciBridge0.present = “TRUE”
    isolation.tools.hgfs.disable = “TRUE”
    displayName = “MyUbuntu”
    guestOS = “ubuntu-64″
    nvram = “MyUbuntu.nvram”
    deploymentPlatform = “windows”
    virtualHW.productCompatibility = “hosted”
    RemoteDisplay.vnc.port = “0″
    tools.upgrade.policy = “upgradeAtPowerCycle”
    powerType.powerOff = “soft”
    powerType.powerOn = “soft”
    powerType.suspend = “soft”
    powerType.reset = “soft”

    ethernet0.addressType = “generated”
    uuid.location = “56 4d 58 97 0c 18 4e 65-5b 99 6f a4 33 2f cc 8b”
    uuid.bios = “56 4d 32 3d 2d 6f 3f b8-20 5d ca 2a 54 4e 80 b8″
    mks.keyboardFilter = “allow”
    ide0:0.redo = “”
    scsi0:0.redo = “”
    pciBridge0.pciSlotNumber = “17″
    scsi0.pciSlotNumber = “16″
    ethernet0.pciSlotNumber = “32″
    sound.pciSlotNumber = “33″
    ehci.pciSlotNumber = “34″
    ethernet0.generatedAddress = “00:0c:29:4e:80:b8″
    ethernet0.generatedAddressOffset = “0″

    checkpoint.vmState = “MyUbuntu.vmss”

    Comment by jtw — April 30, 2008 @ 12:54 pm

  61. jtw, can you set
    scsi0:0.present = “FALSE”

    Since scsi0:0.fileName=“MyUbuntu.vmdk”, which I assume is a vmware disk image and not a reference to a bootcamp partition, vmware may be trying to boot off of that image instead of ide0:0.fileName=“bootcamp_partition.vmdk”.

    Comment by admin — April 30, 2008 @ 1:04 pm

  62. OK I made that change for scsi0:0.present = “FALSE” but it still does not find an OS to boot on partition 3. I have confirmed I can boot to this Linux partition via rEFIt

    jtw

    Comment by jtw — April 30, 2008 @ 1:14 pm

  63. jtw, can you post your bootcamp_partition.vmdk and your /etc/fstab from your ubuntu partition?

    Comment by admin — April 30, 2008 @ 4:24 pm

  64. Sidetracking - wonder anyone know the solution to the following problem?

    Following the instructions on this post, I have successfully set up my MacBook Pro to triple-boot OS X, Boot Camp and Fedora 8 using EFI, and also to be able to run the Fedora 8 partition from VMWare Fusion.

    Then yesterday I went to upgrade the kernel for Fedora while running it through VMWare Fusion. The last step that I executed was ‘/sbin/grub-install /dev/sda’. I am now still able to run Fedora from VMWare Fusion (with the new kernel), but no longer able to boot directly to it. When I tried to do that, I will be shown a black screen with just the word ‘GRUB’.

    Any idea what I should do to be able to boot to Fedora from EFI again? Thanks.

    Comment by PointZero — May 7, 2008 @ 9:21 pm

  65. PointZero, I would try installing grub on /dev/sdaX where X is the partition where Linux is installed. You will definitely need to boot off a rescue cd for fedora to run grub. You do not want to try to fix grub for bootcamp by installing grub via vmware.

    After you are booted into the rescue cd, you may want to try running gptsync to ensure that the gpt/mbr partition tables match up. Although this should only be a problem if you have been repartitioning after setting up bootcamp.
    http://refit.sourceforge.net/myths/

    Comment by admin — May 8, 2008 @ 9:41 am

  66. Hello to the poster of this guide.

    Would it be possible for you to create a step by step guide of how to step up VMware Fusion and how to get it working with the Boot Camp Partition. The guide is extremely helpful but really needs to have a setup guide of vmware.

    Thank you for this guide. I hope you can manage to help.

    NSCXP2005

    Comment by NSCXP2005 — May 21, 2008 @ 1:28 am

  67. Hi

    I’m configuring a triple boot system on a MacBook(Leopard, Xp Pro and Gutsy) and so far everything is booting natively but I haven’t been able to get anything working in vmware fusion yet. I have a partition set up through boot camp for xp and I used disk utility to cut out a chunk of osx’s partition for ubuntu. And using rEFIt.

    If anyone can point me in the right direction it would be much appreciated.

    Also, In vmware fusion I have three os’s listed. Boot Camp partition, MyUbuntu & a third which I found in Library/Application Support/VMware Fusion/Virtual Machines/Helper called naos-1.0.vmwarevm. Don’t know if that changes anything but I have no clue what its doing there.

    Thanks for all the info so far.

    Comment by Hari Bhajan — July 14, 2008 @ 11:08 am

  68. Hari, can you provide the output of this command?
    ./vmware-rawdiskCreator print /dev/disk0

    Also, can you provide the contents of your vmx and vmdk file that you are trying to use to boot linux off of the bootcamp partition?

    Comment by admin — July 14, 2008 @ 11:11 am

  69. Nr Start Size Type Id Sytem
    – ———- ———- —- — ————————
    1 1 409639 BIOS EE Unknown
    2 409640 400750456 BIOS AF HFS+
    3 401422240 41943040 BIOS 83 Linux
    4 445005864 43391264 BIOS B Win95 FAT32

    I didn’t use Boot Camp to make a partition for Ubuntu I used Disk Utility. I just used Boot Camp for XP. These are the instructions I used http://geofas.com/2008/05/20/triple-boot-on-my-macbook-mac-os-x-ubuntu-linux-windows-xpvista/

    I dont know if this is correct:
    hari-bhajan-singh-khalsas-macbook:VMware Fusion bhajan$ /Users/bhajan/MyUbuntu.vmwarevm/MyUbuntu.vmx
    /Users/bhajan/MyUbuntu.vmwarevm/MyUbuntu.vmx: line 1: config.version: command not found

    Comment by Hari Bhajan — July 14, 2008 @ 1:32 pm

  70. Hari, you’re vmx file showed a bunch of “command not found” errors because it was the first item you entered in the terminal, so it thought you were trying to run it as a shell script as opposed to displaying the file.

    To display the contents of the file, you need to use the “cat” program. For example, run these commands:

    cd /Users/bhajan/MyUbuntu.vmwarevm/
    ls -lSh
    cat MyUbuntu.vmx | pbcopy

    The “cd” command will change the directory (folder) you are in.
    The “ls” command will display the files in the directory. The little L in “-lSh” causes ls to display extra info. The “S” sorts the file by size, and the “h” displays the size with M for megs and K for Kilobytes instead of by number of bytes.

    The “cat” command normally displays the file to the terminal, but the “| pbcopy” after that will put that output into the clipboard, so you can paste it into your next comment.

    What is the name of your vmdk file? Did you create it with vmware-rawdiskCreator?

    Comment by admin — July 14, 2008 @ 2:18 pm

  71. config.version = “8″
    virtualHW.version = “6″
    scsi0.present = “TRUE”
    scsi0.virtualDev = “lsilogic”
    memsize = “512″
    MemAllowAutoScaleDown = “FALSE”
    scsi0:0.present = “TRUE”
    scsi0:0.fileName = “MyUbuntu.vmdk”
    ide1:0.present = “TRUE”
    ide1:0.autodetect = “TRUE”
    ide1:0.deviceType = “cdrom-raw”
    floppy0.present = “FALSE”
    ethernet0.present = “TRUE”
    ethernet0.connectionType = “nat”
    ethernet0.virtualDev = “e1000″
    ethernet0.wakeOnPcktRcv = “FALSE”
    usb.present = “TRUE”
    ehci.present = “TRUE”
    sound.present = “TRUE”
    sound.fileName = “-1″
    sound.autodetect = “TRUE”
    pciBridge0.present = “TRUE”
    isolation.tools.hgfs.disable = “TRUE”
    displayName = “MyUbuntu”
    guestOS = “ubuntu-64″
    nvram = “MyUbuntu.nvram”
    deploymentPlatform = “windows”
    virtualHW.productCompatibility = “hosted”
    RemoteDisplay.vnc.port = “0″
    tools.upgrade.policy = “upgradeAtPowerCycle”
    powerType.powerOff = “soft”
    powerType.powerOn = “soft”
    powerType.suspend = “soft”
    powerType.reset = “soft”

    ethernet0.addressType = “generated”
    uuid.location = “56 4d bd c4 f7 94 2a 55-0d 8c e0 fe 2e 00 15 36″
    uuid.bios = “56 4d bd c4 f7 94 2a 55-0d 8c e0 fe 2e 00 15 36″
    scsi0:0.redo = “”
    checkpoint.vmState = “MyUbuntu.vmss”
    vmotion.checkpointFBSize = “16777216″
    checkpointFBSize = “16777216″
    pciBridge0.pciSlotNumber = “17″
    scsi0.pciSlotNumber = “16″
    ethernet0.pciSlotNumber = “32″
    sound.pciSlotNumber = “33″
    ehci.pciSlotNumber = “34″
    ethernet0.generatedAddress = “00:0c:29:00:15:36″
    ethernet0.generatedAddressOffset = “0″

    Comment by Hari Bhajan — July 14, 2008 @ 4:39 pm

  72. In the MyUbuntu.vmwarevm output theres MyUbuntu.vmdk, rawdisk-pt.vmdk and rawdisk.vmdk
    I didnt intentionally create it, is it a virtual hd?

    Thanks for that patient explanation. I’m still new to this.

    Hari Bhajan

    Comment by Hari Bhajan — July 14, 2008 @ 4:53 pm

  73. Hari, according to vmware naming conventions rawdisk-pt.vmdk points to a partition on your disk, and rawdisk.vmdk just contains some text referencing rawdisk-pt.vmdk and some other settings. You can get a little more information by using the “file” command.

    For example:
    file rawdisk.vmdk

    This will probably tell you that rawdisk.vmdk is a text file.
    Since I don’t know anything about rawdisk.vmdk, I would suggest that you follow the directions in this blog post. After running vmware-rawDiskCreator, you should have a bootcamp_partition.vmdk in your MyUbuntu.vmwarevm directory. I have improved the formatting of the blog, since you may have been having problems since the last part of that command wasn’t visible before.

    Comment by admin — July 14, 2008 @ 10:21 pm

  74. I’ve finally managed to create bootcamp_partition.vmdk

    Then I used pico to edit MyUbuntu.vmx

    this is what was already in the vmx file

    ide1:0.present = “TRUE”
    ide1:0.autodetect = “TRUE”
    ide1:0.deviceType = “cdrom-raw”

    I replaced this with the lines you give

    So it seems that it should work, but when I try to run ubuntu it say “no boot filename received”

    Comment by Hari Bhajan — July 15, 2008 @ 5:16 am

  75. Hari, I think you should really change ide0:0 instead of ide1:0 to point to the bootcamp vmdk. Otherwise, it will try to boot off of whatever is at ide0:0. If you make that change, and it still doesn’t boot, please paste your entire MyUbuntu.vmx file into a comment again.

    BTW, if you don’t like pico, you can run:
    open -t FILENAME
    to open the file in the default mac text editor, which is TextEdit unless you change it.

    Comment by admin — July 15, 2008 @ 9:08 am

  76. I got good news and bad news,
    the good news is Ubuntu is booting in vmware.
    The bad news is that it wont boot fully.

    After the loading screen it displays the text:
    * Starting Anac(h)ronistic cron anacron [ OK ]
    * Starting deferred execution scheduler atd [ OK ]
    * Starting periodic command scheduler crond [ OK ]
    * Checking battery state… [ OK ]
    * Running local boot scripts (/etc/rc.local) [ OK ]

    It does work natively.

    There isn’t a ide0:0 so I used the scsi0:0 Is that correct or is it going to cause problems later or is it causing this problem?

    config.version = “8″
    virtualHW.version = “6″
    scsi0.present = “TRUE”
    scsi0.virtualDev = “lsilogic”
    memsize = “512″
    MemAllowAutoScaleDown = “FALSE”
    scsi0:0.present = “TRUE”
    scsi0:0.fileName = “MyUbuntu.vmdk”
    ide1:0.present = “TRUE”
    ide1:0.autodetect = “TRUE”
    ide1:0.deviceType = “cdrom-raw”
    floppy0.present = “FALSE”
    ethernet0.present = “TRUE”
    ethernet0.connectionType = “nat”
    ethernet0.virtualDev = “e1000″
    ethernet0.wakeOnPcktRcv = “FALSE”
    usb.present = “TRUE”
    ehci.present = “TRUE”
    sound.present = “TRUE”
    sound.fileName = “-1″
    sound.autodetect = “TRUE”
    pciBridge0.present = “TRUE”
    isolation.tools.hgfs.disable = “TRUE”
    displayName = “MyUbuntu”
    guestOS = “ubuntu-64″
    nvram = “MyUbuntu.nvram”
    deploymentPlatform = “windows”
    virtualHW.productCompatibility = “hosted”
    RemoteDisplay.vnc.port = “0″
    tools.upgrade.policy = “upgradeAtPowerCycle”
    powerType.powerOff = “soft”
    powerType.powerOn = “soft”
    powerType.suspend = “soft”
    powerType.reset = “soft”

    ethernet0.addressType = “generated”
    uuid.location = “56 4d 71 e7 c8 8c 7b 45-8b 4b 28 4d b2 02 ac 0c”
    uuid.bios = “56 4d 71 e7 c8 8c 7b 45-8b 4b 28 4d b2 02 ac 0c”
    scsi0:0.redo = “”
    checkpoint.vmState = “”
    vmotion.checkpointFBSize = “16777216″
    checkpointFBSize = “16777216″
    pciBridge0.pciSlotNumber = “17″
    scsi0.pciSlotNumber = “16″
    ethernet0.pciSlotNumber = “32″
    sound.pciSlotNumber = “33″
    ehci.pciSlotNumber = “34″
    ethernet0.generatedAddress = “00:0c:29:02:ac:0c”
    ethernet0.generatedAddressOffset = “0″

    ide0:0.redo = “”
    tools.remindInstall = “TRUE”

    Thanks alot.

    Comment by Hari Bhajan — July 16, 2008 @ 7:28 am

  77. Hari, to test it with IDE, you can change the settings via vmware by selecting the Settings menu item from the “Virtual Machine” menu. The Ubuntu vm must be open but not running in order for you to change the Hard Disk bus type from SCSI to IDE.

    If you still have problems booting, try switching to recovery mode at the GRUB prompt.
    http://www.howtogeek.com/wp-content/uploads/2007/09/image55.png

    Recovery mode will not try to run X11 (Gnome or KDE, etc). I am mainly hoping that recovery mode will display some more information to make it clear what the error is.

    Comment by admin — July 16, 2008 @ 9:21 am

  78. This is what it said in recovery mode

    * Mounting local filesystems… [ OK ]
    [mntent]: line 8 in /etc/fstab is bad
    mount: special device /dev/disk/by-uuid/9C9C-1482 does not exist
    [fail]

    Comment by Hari Bhajan — July 16, 2008 @ 6:09 pm

  79. Hari, you should be able to log into your linux system even after you get the error mounting the local filesystems. Are you getting a login prompt? Be careful to back up your /etc/fstab file, since making a mistake will prevent you from booting linux even without vmware until it is fixed.

    Your /etc/fstab file should contain a line like the one below. There will be several lines, but you want to identify the one with the mount point for “/”. The fields are separated by spaces and will probably not line up correctly.

    # UUID=8863fc81-8694-4620 / ext3 defaults 0 1

    The UUID is a unique identifier for the partition. You can try changing this to reference the partition based on the drive letter and partition number of the device.

    For example, when I run this command on my system, I see the partitions on the drive /dev/sda.
    fdisk -l /dev/sda

    Device Boot Start End Blocks Id System
    /dev/sda1 1 26 204819+ 2d Unknown
    /dev/sda2 26 12558 100663296 2d Unknown
    /dev/sda3 * 12574 14594 16221616 ef EFI (FAT-12/16/32)

    If you see a /dev/sda3, that should be the device you want to use in place of the entire “UUID=BIGNUMBER” field. You can check the “Blocks” column from the output of fdisk to see if the size of the partition seems right. If /dev/sda doesn’t have any partitions, you will want to try running the fdisk command on /dev/hda.

    Comment by admin — July 16, 2008 @ 6:50 pm

  80. Strange, I’ve tried this with both Parallels and Fusion. I can boot via EFI to Ubuntu or Vista with no problems at all. Neither Parallels nor Fusion see my Boot Camp partition nor my Ubuntu partition as bootable. Very frustrating since I know they are there and are bootable.

    jtw

    Comment by jtw — August 3, 2008 @ 12:43 am

  81. I’m having a bit of a problem.

    I have a triple boot - OS X, Ubuntu, XP (in that order). I followed the onMac.net wiki to set my system up. I use rEFIt and have no problems booting to any of them. Fusion also works fine with XP. However, I can’t seem to get into Ubuntu using Fusion. When I try the Ubuntu VM it attempts a network boot.

    I verified the partitions using “diskutil list” and confirmed that dev/disk0s3 was the proper Linux partition and checked Linux.vmdk to see that it is listed as /dev/disk0s3 and the data there seems correct. GRUB is installed on that partition, not the MBR.

    What am I doing wrong?

    Comment by Mack — August 18, 2008 @ 2:41 am

  82. Is the vmware bios trying to boot off of the network or is grub trying to? In order to view the vmware bios, you can add this line to your .vmx file.

    bios.forceSetupOnce = “TRUE”

    If grub is trying to boot off the network, here is some information on what to look for in the /boot/grub/menu.lst file.
    http://os.inf.tu-dresden.de/pipermail/l4-hackers/1999/000271.html

    Comment by admin — August 18, 2008 @ 9:43 am

  83. If VMware is using the same options as my native Linux setup Grub should not be using the netboot. I looked thru the bios and the network boot option is the final option under the boot tab within the VM: First is floppy, then HD, then CD. I looked at the menu.lst and found no references to the netboot as mentioned in the link you posted.

    Comment by Mack — August 18, 2008 @ 10:54 am

  84. I was able to get it to work. When I’m in OS X I can’t even see the Linux partition in disk utility. Examining the MBR using fdisk -e /dev/disk0 or using GPT show /dev/disk0 with the boot disk showed that my Linux partition was listed as EFI. I suppose that because OS X thinks it’s EFI that it doesn’t consider it possible to mount. In any case, I’m not sure of the exact specifics behind it but I figured this had to be a problem. I read on some HOWTO that when I format my disks from plain old OS X I should choose all partitions first as Microsoft Basic Data which is MS-DOS FAT32. This prevents the GPT from showing Linux as EFI. Once you format and load the OS the MBR will show the right system but the GPT will still show Microsoft Basic Data. I can now see the Linux partition in disk utility- it’s gray but there. It is possible that loading the Linux and setting the bootable flag will force the GPT to show it as EFI regardless. To fix this, you have to create your own GPT. To do this I followed the following basic outline:

    Reboot from Apple OS X disk1 and open terminal:
    “fdisk -e /dev/disk0″ to open the MBR to edit
    “p” to pring MBR, write these numbers down
    “diskutil eject /dev/disk0″ ( do this after each of the following commands because it remount your drive)
    “gpt destroy -r /dev/disk0″ -r backs it up so if you screw up like I did the first time you’re not screwed because you didn’t use -r, also like i did the first time
    “gpt create -f /dev/disk0″ to create empty GPT
    “gpt add -b 1 -i 1 -s 409600 -t efi /dev/disk0″ -b 1: start # from MBR -i 1: partition # -s 409600: size of partition -t efi: type
    do this 3 more times, changing i to 2,3,4 use -t hfs for Mac OSX, -t windows and -t linux

    you can try gpt remove -i # of bad partition but when I ran this code the entry was replaced by a copy from the MBR and then when you run the gpt add command it says the device is full.

    Comment by Mack — August 22, 2008 @ 1:07 am

  85. Thanks for the time and effort you put into helping me get XP and Ubuntu working a few months ago. I ended up undoing everything and just using VMware, cause I had to start using windows for work. But I do appreciate your help.

    Hari Bhajan

    Comment by Hari Bhajan — October 13, 2008 @ 8:12 am

  86. Now everyone is talking about the American economy and eclections, nice to read something different. Eugene

    Comment by Eugene — October 20, 2008 @ 9:12 pm

  87. Following the instructions I got running a virtual Ubuntu 64-bit from the one of the partitions of my macbook. I must say, fabulloouuuus! I put also VMware running the Windows XP of the Boot Camp in other Space. It’s very cool to switch from Leopard to Windows and Ubuntu simply by pressing Ctrl+Arrow ;-P

    Thanks for the tip

    Comment by neurignacio — November 15, 2008 @ 6:46 am

  88. My mind is blown by all the info in here and it has helped me get most of the way to being able to sort out my dilemma. When I was Tri-booting I had no problems it virtualized my windows partition no problem. I then switched to a quad boot and fusion is virtualizing partitions but I am getting an error “No bootable device was detected” The way I partitioned the drive is as follows:

    MacBook-Pro:Ubuntu.vmwarevm andrew$ diskutil list
    /dev/disk0
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *186.3 Gi disk0
    1: EFI 200.0 Mi disk0s1
    2: Microsoft Basic Data Vista 35.0 Gi disk0s2
    3: Microsoft Basic Data MEDIA 32.0 Gi disk0s3
    4: Microsoft Basic Data XP 20.0 Gi disk0s4
    5: Apple_HFS Macintosh HD 74.2 Gi disk0s5
    6: Linux Swap 4.3 Gi disk0s6
    7: Microsoft Basic Data 20.5 Gi disk0s7

    the GRUB boot loader is found in disk0s3 and all OS boot when going through rEFIt. Any idea on what is going wrong?

    Comment by Andrew — December 4, 2008 @ 12:36 am

  89. Hi I seem to fail when creating the raw disk. Here is my setup:

    Nr Start Size Type Id Sytem
    – ———- ———- —- — ————————
    1 1 409639 BIOS EE Unknown
    2 409640 146538496 BIOS AF HFS+
    3 147210280 54265816 BIOS 83 Linux
    4 201738240 32702464 BIOS C Win95 FAT32 (LBA)

    After I did
    /Library/Application\ Support/VMware\ Fusion/vmware-rawdiskCreator create /dev/disk0 3 ~/Documents/Virtual\ Machines.localized/linuxpartition ide

    the two files for the disk exist:
    -rw——-@ 1 tbender staff 32256 25 Dez 15:02 linuxpartition-pt.vmdk
    -rw——-@ 1 tbender staff 681 25 Dez 15:03 linuxpartition.vmdk

    After I created a VM with the newly created disk as harddrive I was promted to convert and did so.
    However when I try to boot my new VM I get a “missing operating system” error.
    I did poked a bit round with the vmdk and pt.vmdk and noticed the following:

    tbender$ strings linuxpartition-pt.vmdk
    Missing operating system
    Operating system loading error
    EFI PART
    BSD 4.4

    Comment by Till — December 25, 2008 @ 9:38 am

  90. Till,

    Did you already install Linux on that partition? Can you still boot directly into Linux from that partition without using vmware?

    Comment by admin — December 28, 2008 @ 4:16 pm

  91. I wrote about doing this with Windows, Mac OSX, and Linux on my blog. If any of you are still having trouble, especially with Missing Operating System errors, you might want to read through my post. The Missing Operating System error can usually be fixed without reinstalling anything.

    The post is located at http://feelslikeburning.com/2008/12/19/multibooting-linux-windows-and-mac-os-x-on-a-mac-and-using-them-as-virtual-machines/

    Comment by Adam Wolf — January 4, 2009 @ 1:11 pm

  92. I use disktools images to backup and restore my MacBook Pro’s Windows 7 and Mac OSX partitions. I restore the mac partition first, run bootcamp to create a partition of exactly the same size Windows partition as before (52 mb), then restore the Windows 7 partition into it. I am able to write the image to the NTFS partition thanks to Paragon’s NTFS for Mac OS X utility. Everything seems to work fine exactly as it was before I imaged the 2 drives, except….
    Now I get the following error when starting my BootCamp partition in VMWare Fusion:
    System Recovery Options Select language: “English (United States)” (in grey), Select keyboard language: “US”. When I perform the repair, the restart into VM Ware works fine but rebooting to native BootCamp gives the black screen repair needed screen. If I repair it with my Windows disk as prompted, the VM Ware error comes back (endless loop).

    Has anyone seen this?

    Comment by Kevin Quincey — February 10, 2009 @ 5:45 pm

  93. [...] found here The trick is to use the vmware-rawdiskCreator tool for creating a raw VMWare hard disk file that [...]

    Pingback by Windows - VMWare Fusion Extra Partition - Mac-Forums.com — March 12, 2009 @ 1:11 am

  94. So I am at the point now where i have all my partitions and triple boot with xp, os x, ubuntu and a shared fat32 data partition that they can all access. They all boot fine no problem whatsoever from refit. I also successfully used the vmware-rawDiskCreator to get the xp partition/installation booting in vmware fusion correctly.
    For the life of my however i can’t get ubuntu ext2 partition (hd0,2) to run at all from vmware fusion, i just keep getting stuck at the grub command entry screen. The Grub boot loader is installed on /dev/disk0s3 which is also my root linux partition. The only thing i get that might be an indicator is when i say enter” kernel /boot ” i get a error 17 cannot mount selected partition. LInux boots fine running bare metal when i boot it from refit prompts.

    Any ideas? please help im so close to having everything working. Let me know what if anything else i can provide
    Thanks in advance

    Alex

    Comment by Alex — March 26, 2009 @ 12:41 am

  95. SO i figured it out. the issue had to due with gpt syncing. Needed to due an additional gpt sync, by the way incase it helps anyone, if your trying to get the bare metal xp or linux installations on a seperate partition to voot into vmware via rawDiskCreator,, once you run the raw disk creator tool, you dont have to copy and paste and add new disk in the vmware’s vm disk settings. all ou have to do is once you creat the xp-pt.vmdk and xp.vmdk files via that tool is to select the import from disk image file when you create a new vm from vmware fusion. It makes it simple and should make it work correctly for you. If after doing this you want the -pt.vmdk and .vmdk files to be located in the VM imagss ‘package contents’ you can then add them to the package and edit the .vmx file to point to the xp.vmdk file instead of whatever relative path it had for the ide0:0.fileName “filename.vmdk” field.

    For any of you that do this down the road and can boot the baremetal linux install via refit just fine, but can’t boot the baremetal rawdisk vm cause you get stuck at the grub prukmpt and/or get the error 17 message, try running a gpt sync from the refit main boot screen. It resolved the issue for me just fine without a problem. now to find a duplicate size/model drive and sectory by sector copy program to back up the whole drive…

    Comment by Alex — March 27, 2009 @ 10:54 pm

  96. Hey, I really want to get this working.

    I keep getting the “file not found” error when I open VMware Fusion. I followed your steps to changing permissions, but it did not work. The partition I would like to boot is on disk1 part 3. Do i need to change this part at all because of that?

    ide0:0.present = “TRUE”
    ide0:0.fileName = “bootcamp_partition.vmdk”

    Thanks

    Comment by Jordan — April 3, 2009 @ 8:57 pm

  97. In the Terminal, can you “cd” into the directory with your .vmx file and run this command?
    ls -l

    Then, can you post the output of that command?

    Comment by admin — April 4, 2009 @ 8:04 pm

  98. Hi,
    Thanks for the post. This seems like it should be easy but for some reason I am having the same issue as Mack (posts #81, 83, 84) where it keeps attempting a PXE network boot (it’s not even getting to GRUB). If you escape out of it you eventually get the ‘Operating System not found’ error.

    In my case though, my disks show up (incorrectly?) as ‘Linux’ in the MBR and ‘Basic Data’ in the GPT (see output from rEFIt’s Partition Inspector below). I couldn’t quite understand if Mack was saying if this is (not?) desired in post #84, so I’m a little hesitant to try his suggestions and rebuild my GPT table, especially since I’m not sure if his commands will allow me to recreate the hybrid GPT/MBR table I have now.

    I checked the VMWare BIOS and tried moving the ‘VMWare Virtual IDE Hard-(PM)’ above the ‘Bootable Add-In cards’ but it still didn’t make a difference.

    Here is the output of rEFIt v0.13’s Partition Inspector (note: partition 3 is just a backup of partition 4 with the partition boot code zero-ed out, so rEFIt doesn’t through a (rE)FIt :) ):

    *** Report for internal hard disk ***

    Current GPT partition table:
    # Start LBA End LBA Type
    1 40 409639 EFI System (FAT)
    2 409640 78555095 Basic Data
    3 78555096 156700551 Basic Data
    4 156700552 234846007 Basic Data
    5 234846008 312319623 Mac OS X HFS+

    Current MBR partition table:
    # A Start LBA End LBA Type
    1 1 409639 ee EFI Protective
    2 409640 78555095 83 Linux
    3 78555096 156700551 0d Unknown
    4 * 156700552 234846007 07 NTFS/HPFS

    MBR contents:
    Boot Code: Unknown, but bootable

    Partition at LBA 40:
    Boot Code: None (Non-system disk message)
    File System: FAT32
    Listed in GPT as partition 1, type EFI System (FAT)

    Partition at LBA 409640:
    Boot Code: GRUB
    File System: ext3
    Listed in GPT as partition 2, type Basic Data
    Listed in MBR as partition 2, type 83 Linux

    Partition at LBA 78555096:
    Boot Code: Windows NTLDR
    File System: Unknown
    Listed in GPT as partition 3, type Basic Data
    Listed in MBR as partition 3, type 0d Unknown

    Partition at LBA 156700552:
    Boot Code: Windows NTLDR
    File System: NTFS
    Listed in GPT as partition 4, type Basic Data
    Listed in MBR as partition 4, type 07 NTFS/HPFS, active

    Partition at LBA 234846008:
    Boot Code: None
    File System: HFS Extended (HFS+)
    Listed in GPT as partition 5, type Mac OS X HFS+

    ——————

    Here is my .vmx file (note: I called my files “EXT3-root” VS “bootcamp_partition” as you did in your tutorial):

    .encoding = “UTF-8″
    config.version = “8″
    virtualHW.version = “7″
    bios.forceSetupOnce = “FALSE”
    scsi0.present = “FALSE”
    scsi0.virtualDev = “lsilogic”
    memsize = “512″
    ide0:0.deviceType = “rawDisk”
    ide0:0.present = “TRUE”
    ide0:0.fileName = “EXT3-root.vmdk”
    ide1:0.present = “TRUE”
    ide1:0.autodetect = “TRUE”
    ide1:0.deviceType = “cdrom-raw”
    floppy0.present = “FALSE”
    ethernet0.present = “TRUE”
    ethernet0.connectionType = “nat”
    ethernet0.wakeOnPcktRcv = “FALSE”
    ethernet0.linkStatePropagation.enable = “TRUE”
    usb.present = “TRUE”
    ehci.present = “TRUE”
    sound.present = “TRUE”
    sound.fileName = “-1″
    sound.autodetect = “TRUE”
    mks.enable3d = “TRUE”
    serial0.present = “TRUE”
    serial0.fileType = “thinprint”
    pciBridge0.present = “TRUE”
    pciBridge4.present = “TRUE”
    pciBridge4.virtualDev = “pcieRootPort”
    pciBridge4.functions = “8″
    pciBridge5.present = “TRUE”
    pciBridge5.virtualDev = “pcieRootPort”
    pciBridge5.functions = “8″
    pciBridge6.present = “TRUE”
    pciBridge6.virtualDev = “pcieRootPort”
    pciBridge6.functions = “8″
    pciBridge7.present = “TRUE”
    pciBridge7.virtualDev = “pcieRootPort”
    pciBridge7.functions = “8″
    vmci0.present = “TRUE”
    roamingVM.exitBehavior = “go”
    tools.syncTime = “TRUE”
    displayName = “Linux Ubuntu”
    guestOS = “ubuntu”
    nvram = “Linux Ubuntu.nvram”
    virtualHW.productCompatibility = “hosted”
    ft.secondary0.enabled = “TRUE”
    printers.enabled = “TRUE”
    tools.upgrade.policy = “upgradeAtPowerCycle”
    powerType.powerOff = “soft”
    powerType.powerOn = “soft”
    powerType.suspend = “soft”
    powerType.reset = “soft”

    extendedConfigFile = “Linux Ubuntu.vmxf”

    chipset.useAcpiBattery = “TRUE”
    chipset.useApmBattery = “TRUE”

    ethernet0.addressType = “generated”
    uuid.location = “56 4d e4 be fb 16 c5 4b-e3 71 d6 50 94 92 1b de”
    uuid.bios = “56 4d e4 be fb 16 c5 4b-e3 71 d6 50 94 92 1b de”
    debugStub.linuxOffsets = “0×0,0xffffffff,0×0,0×0,0×0,0×0,0×0,0×0,0×0,0×0,0×0,0×0,0×0,0×0″
    ide0:0.redo = “”
    vmotion.checkpointFBSize = “134217728″
    pciBridge0.pciSlotNumber = “17″
    pciBridge4.pciSlotNumber = “21″
    pciBridge5.pciSlotNumber = “22″
    pciBridge6.pciSlotNumber = “23″
    pciBridge7.pciSlotNumber = “24″
    scsi0.pciSlotNumber = “-1″
    usb.pciSlotNumber = “32″
    ethernet0.pciSlotNumber = “33″
    sound.pciSlotNumber = “34″
    ehci.pciSlotNumber = “35″
    vmci0.pciSlotNumber = “36″
    ethernet0.generatedAddress = “00:0c:29:92:1b:de”
    ethernet0.generatedAddressOffset = “0″
    vmci0.id = “-1802363938″

    ethernet0.startConnected = “TRUE”

    —————–
    A few other things:
    - /dev/disk0s2 and the generated .vmdk files (in /Users/Brian/Documents/Virtual Machines.localized/Linux Ubuntu.vmwarevm) are all set to 777 permissions
    - I’m doing all this on a MacbookPro3,1 + VMWare Fusion v2.0.4 + OSX v10.5.6 (’Leopard’)

    Any help appreciated!

    Thanks!

    Comment by Brian — April 26, 2009 @ 9:40 pm

  99. I just figured it out! The Linux partition (/dev/disk0s2) wasn’t marked active when I created the raw .vmdk file so basically nothing was getting booted (ref: http://feelslikeburning.com/2008/12/19/multibooting-linux-windows-and-mac-os-x-on-a-mac-and-using-them-as-virtual-machines/).

    When I used iBore (http://apps.tempel.org/iBored/) to set my Linux partition active ($80), it booted into X fine but now generates an error “Ubuntu is running in low-graphics mode…. (EE) No devices detected”…

    Comment by Brian — April 26, 2009 @ 10:22 pm

  100. Installing VMWare-tools and rebuilding the Xorg.conf file seems to have gotten rid of that message… although I’m noticing the following now:

    1) shutdown or reboots from within Linux don’t shutdown or reboot the VM. The only way to do it is manually through VMWare Fusion
    2) Compiz has been disabled and cannot be re-enabled. Although not a critical loss, shouldn’t VMWare’s 3D OpenGL support allow this?

    Thanks

    Comment by Brian — April 26, 2009 @ 11:14 pm

  101. Correction: It looks like VMWare Fusion v2.0.4 doesn’t support OpenGL yet :(

    Comment by Brian — April 26, 2009 @ 11:28 pm

  102. Great info but I got tripped up following your example. Turns out the problem was I needed to boot linux directly before creating the bootcamp_partition file. Looks like jtw had the exact same problem as me. Identical symptoms at least. Took me forever to work out how to get it going, might want to update your blog to include this ;) Apart from that, thanks for the info - big help!

    Comment by Scott — June 18, 2009 @ 9:49 am

  103. Having a similar issue as Karen with VMWare Fusion on a Mac Mini.. Everything was great.. had an issue copied some files copied back and have been getting this error:

    File Not Found: Applications:Dell XP:Virtual Disk 3.vmdk

    This file is required to power on this virtual machine. If this file was moved, please provide its new location.

    When I looked it wasn’t there.. This is for a USB drive.. drive is still in.. now renamed.. Tried reconstituting by adding that drive to another similar setup, added second drive 16gb.. created file called Virtual Disk 3 with same specs.. copied files to computer with issue.. Put the USB back in, tried again.. same issue..

    Your two cents are appreciated. Thanks so much. (Not familiar with command line on mac)

    Comment by Evan — July 17, 2009 @ 9:16 pm

  104. Evan,
    There are a few things I’m not clear on. When it was working great, what was the setup? Did you create a reference to an existing partition with vmware-rawdiskCreator? This will only work with ide and scsi drives. USB drives are handled separately. You will actually a little USB icon at the bottom of the vmware window that will let you attach or detach a USB device.

    Does the reconstituted vm work on the computer before you copied it to the computer with issue? How big is the VirtualDisk3.vmdk when you get info?

    Comment by admin — July 18, 2009 @ 8:26 am

  105. Thanks a ton Admin

    The setup is a MacMini running VMWare Fusion.. two hard drives boot drive and then a second 16gb usb stick that was a second drive (Virtual Disk 3).. the only issue we kept having was VMWare would keep eating up disk space.. so in an attempt to solve that I got the 16gb but it turned out it needed more room on the boot drive.

    I haven’t used nor am I familiar with rawdiskCreator.. Need to hop on that computer to get info on the Virtual Disk 3 File.. will post slightly later.. my problem is that I can’t currently shut down the system.. would like to see if I can remove the USB “second hard drive” from VMWare but due to it being suspended I can’t shut it down and can’t access settings.

    Is there a way to shut it down if it’s suspended?

    Thanks so much for your assistance. And I apologize for my n00b-ness

    Comment by Evan — July 18, 2009 @ 4:48 pm

  106. 975 bites for the Virtual Disk 3 file..

    Comment by Evan — July 23, 2009 @ 3:38 pm

  107. does this work for Fusion 3? the file extensions are different now.

    Comment by Daniel — November 12, 2009 @ 5:03 am

  108. Daniel, this works fine for me under vmware 3. It still uses a .vmx file that references .vmdk files for drives. I don’t know what file extension differences you are talking about.

    Comment by admin — April 6, 2010 @ 11:53 am

  109. Thanks!
    In my case this codes work:

    scsi0:0.present = “TRUE”
    scsi0:0.fileName = “MyUbuntu.vmdk”
    ide1:0.present = “TRUE”
    ide1:0.autodetect = “TRUE”
    ide1:0.deviceType = “cdrom-raw”

    Comment by jorux — April 8, 2010 @ 11:29 am

  110. 1) you first need to format the target partition as NTFS.
    vmware-rawdiskCreator will not recognise a Fat-32 partition.

    2) Open the VM’s settings and select the HardDisk settings panel,
    Delete the default vmdk and add a new vmdk as ide pre-allocate not-split

    3) Exit from vmware.

    4) Select the VM’s vmwarevm file and show package contents

    5) Rename the vmdk files [there should be 2]

    6) Use the original vmdk file path on the “./vmware-rawdiskCreator create” command

    7) Launch VMWare Fusion again and open the VM’s settings

    8) Attach the installer cd .iso as the virtual machines CD

    9) Boot the VM and install

    Comment by dg — November 24, 2010 @ 11:35 am

  111. Love the tutorial, I’ve used it many times. For anyone who’s updated to Fusion 4 the new location of vmware-rawdiskCreator is /Applications/VMware Fusion.app/Contents/Library . Hope this helps!

    Comment by Scott — May 14, 2012 @ 2:41 am

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress