How to make existing .iso bootable?

Discussion in 'Windows, Linux & Others on the Mac' started by marikavs, Sep 27, 2010.

  1. marikavs macrumors member

    Joined:
    Aug 6, 2006
    #1
    I made a .dmg from my bootcamp installation, converted it to .cdr and turned it into an .iso by changing the extension. It was my understanding that the resulting .iso would be bootable, but when I tried to use it in VirtualBox this does not seem to be the case. Does anyone know how I can now make the existing .iso bootable? My (original) MacBook is running Snow Leopard.
     
  2. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #2
    Were you following some guide that suggested you do that? If so, can you post a link to it?

    If I understand you correctly you are trying to import a copy of a previously running Windows via Boot Camp install as a Virtualbox VM.

    What you are describing might work if the DMG was of the CD/DVD you used to install Windows from.

    I hope you still have the original partition, because you have lost more information along the way in converting from NTFS to ISO9660.

    How big is the current ISO file or the DMG file you created?

    Even just restoring the DMG will generally not give you a bootable partition. Winclone performed a bit more "magic" to render the restored image bootable.

    See here: http://forums.virtualbox.org/viewtopic.php?t=1966 for some discussion on importing raw disk images and physical partitions into VirtualBox.

    If not, and you are trying to create an image of your Windows CD/DVD for use in Virtualbox, just rip the ISO from terminal using dd or use the Copy tab in Burn.

    B
     
  3. marikavs thread starter macrumors member

    Joined:
    Aug 6, 2006
    #3
    Clarifications - ISO, DMG, BootCamp to VB, and more

    Thank you, balamw!

    Yes, I followed two guides, actually, but I'm sorry to say I've lost track of where they were - I ended up having to do so much searching for something useful for putting my BootCamp installation into VirtualBox, and I've still not succeeded.

    The DMG was of the currently running BootCamp (XP) installation, not of the original CD/DVD. The original is stashed somewhere in a box ~3000 miles away...

    And, yes, thankfully, I still have the original partition. Thank you for pointing out about the loss of information. No wonder it doesn't work.

    The ISO file I created is 56.8 GB while the DMG is 15.81 GB. I hadn't thought to look until you asked.

    Are you suggesting I might be able to use my .winclone backup to accomplish the VirtualBox setup?

    I will certainly have a closer look at the many links supplied by Ingo (from your link - thank you for that.)

    Unfortunately, I haven't yet mastered the use of terminal ("just rip the ISO from terminal using dd".) I migrated from Windows some time ago (...) and needless to say I'm pleased, but I still have to use Windows and find that either using VMware Fusion (v 2.0.7) or restarting in BootCamp are too slow and/or complicated to just look up something, or for just a few minutes of work. I tend to not do either...

    Thank you again for helping!
     
  4. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #4
    Great.

    Are you committed to Virtualbox? I'm not so familiar with it and am not sure how much tinkering you have to do to do things that may be simpler in VMWare/Parallels. You could get the free VMWare Fusion trial and follow the guide: http://kb.vmware.com/selfservice/mi...nguage=en_US&cmd=displayKC&externalId=1015088

    Even if you ultimately still want to convert from Fusion to VirtualBox you can use this for the initial conversion. http://benfrain.com/notepad/2009/03/osx-converting-parallels-or-vmware-to.html

    Try not to re-activate until you are happy with it.

    Maybe a VirtualBox user can chime in with an easier method...

    B
     
  5. marikavs thread starter macrumors member

    Joined:
    Aug 6, 2006
    #5
    Parallels, VMware Fusion, VirtualBox

    I'm running an RC of Win7, which M$ now considers "illegal," in VirtalBox and find VB to be much faster than either Parallels or VMware Fusion. Of course, I haven't upgraded either of them because they want more money. It *may* be that it's faster because it's Win7, but I doubt that VB's faster startup time has anything to do with that. In any case, this is why I wanted to put a "copy" of my BootCamp XP installation in VirtualBox.

    Over the week-end, one of the things I tried was following the instructions in the link you gave me (I'd found it by googling,) picking up where it turned to VMware, but ultimately that didn't work giving me error messages that said something to the effect that the virtual file couldn't be opened or booted or some such because of error(s.) I actually have both the connection to BootCamp in VMware Fusion (v 2.0.7) and a freestanding virtual 'machine' of XP, but neither one of those comes up as fast as VB's, and they are both having problems, albeit different ones.

    I'd very much like to be able to create an XP installation in VB from either BootCamp itself or from the XP virtual 'machine' in Fusion (even though that one isn't as up-to-date) so, yes, if a VB user out there has ideas on how to do so, error-free, I'd welcome the input. In the meantime I'll have a look at Ingo's links. I suspect some of them will be to things I tried already.

    Also, I'm intrigued by your mention of WinClone. It would be so nice if I could use that, but how?
     
  6. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #6
    It's retired and wouldn't be any more useful than your DMG. It just did a couple more steps to make things bootable. You really want a raw disk image (e.g. dd) to follow the guides in Ingo's links.

    Maybe you could use something like this http://www.gingerbeardman.com/dd-gui/ to hide the nasty Terminal from you. ;)

    EDIT: Check this out: https://www.pinguin.lu/index.php and look at xmount. Once you have a dd image you should be able to make a VDI out of it easily.

    B
     
  7. marikavs thread starter macrumors member

    Joined:
    Aug 6, 2006
    #7
    WinClone, Terminal

    Retired? Must be some part of WinClone that doesn't have anything to do with backups.

    I tried the dd-gui and all it did was quit on me no matter what I fed it. I think that illustrates the old saying about a little knowledge being a dangerous thing.

    So I tried my own variant on "dd if=/dev/old_disk of=image_file conv=noerror" in Terminal, using sudo (i.e. "sudo dd if=/dev/disk0s3 of=/Users/Marika/Desktop/BCdisk.img conv=noerror" [- no quotes there, of course]) but after I entered my password all it did was sit there - is still just sitting there - with nothing to show for it on the desktop. Gee I'd better reach out and learn how to use Terminal properly - I don't think it's nasty at all, just that Unix is so different from DOS.

    Not ready to give up yet, but/and I'm learning so much my head is spinning...
     
  8. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #8
  9. marikavs thread starter macrumors member

    Joined:
    Aug 6, 2006
    #9
    DD, and Terminal, and... oh my!

    You're quite right, dd gives no output until it's done. It was a pleasant surprise to find both the responses in Terminal and the image on my desktop when I came back to the computer after dinner. At least that's done, phew.

    So I went and looked at (and downloaded) Xmount for the next step. Talk about being in over my head! Even Terminal didn't like the commands - too "linuxy" I guess. So now I'm going back to Ingo's links to see what I can glean from them.

    I do want to thank you for all your help! I especially appreciate that you keep coming back here.
     
  10. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #10
    You're welcome. I'm interested in the topic as someday I intend to take all of the random HDDs I've pulled out of my systems over the years. Image them, wipe them and then set them loose into the world. If I know that I can boot from the images that would be a bonus. ;)

    I think you can jump straight to section 5.1 in his HOWTO since you should have installed it via the pkg.

    Code:
    mkdir ~/mnt0
    xmount --in dd --out vdi --cache ~/Desktop/MyDisk.cache ~/Desktop/MyDisk.dd ~/mnt0
    Where ~/Desktop/Mydisk.dd is the file you specified as of= in dd.

    B
     
  11. marikavs thread starter macrumors member

    Joined:
    Aug 6, 2006
    #11
    Conversion

    Interesting. It never occurred to me to image the original HDD I pulled from this MacBook 2 years ago. I just blithely went ahead and restored from my SuperDuper! backup to the new drive - a shrunken Leopard is now sleeping on the old one in a box somewhere (also ~3000 miles away.)

    I found this: To get the image from the disk use the dd command.

    1. dd if=/dev/hda of=./hda.img
    2. VBoxManage convertdd hda.img hda.vdi

    at http://grantmcwilliams.com/tech/virtualization/virt-blog/184-convert-raw-disk-images-to-vdi-format

    Thus:
    MvS-MacBook-OSX:~ Marika$ sudo VBoxManage convertdd /BCdisk.img /BChda.vdi
    Password:
    Oracle VM VirtualBox Command Line Management Interface Version 3.2.8
    (C) 2005-2010 Oracle Corporation
    All rights reserved.

    Converting from raw image file="/BCdisk.img" to file="/BChda.vdi"...
    Creating dynamic image with size 56795070464 bytes (54164MB)...
    MvS-MacBook-OSX:~ Marika$

    But now the BChda.vdi (I called it that just for fun since I don't know what a "hard drive array" is supposed to be) is only 29.28 GB on disk.
    That's a lot smaller...

    After I copied it to VB's HardDisks folder it turned into 27.27 GB actual size. Ahem. No wonder I got "A disk read error occurred" when I tried to use it.

    Just in case it was supposed to have been mounted rather than moved or copied I will try my hand at Xmount again next. Thanks for the pointers.

    But if that doesn't work I can start over and learn about all the things I was supposed to have removed from the Windows installation before I did this... (http://www.virtualbox.org/wiki/Migrate_Windows)
     
  12. grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #12
    virtual disk image (.vdi) of a slice of a device

    In Super User, the accepted answer to a question VirtualBox: booting cloned disk demonstrates that you can produce a virtual disk image of an entire device – no intermediary .dmg, .cdr, .iso or other type of image.

    If your Boot Camp installation of Windows is at /dev/disk0s4
    and if the size, in bytes, of that slice is 1500301910016
    then you could run a command such as this:

    Code:
    sudo cat /dev/disk0s4 | VBoxManage convertfromraw stdin ~/Documents/Windows.vdi 1500301910016
    Getting the size of a device, or a slice of a device

    An example, for disk0s4:

    Code:
    diskutil info disk0s4 | grep Total
     

Share This Page