Ubuntu – migrate a VirtualBox Ubuntu Guest to a *real* Hardware Box

virtualbox

I want to transfer Ubuntu from a VirtualBox Guest 'appliance' to a real (metal and chips) computer?

Can this be done, and what steps are involved?

Best Answer

  • I'd try it with dd (don't forget to replace the device names like sda with your device name):

    1. Replace all uuids in your /etc/fstab with things like /dev/sda1 (sda = destination hd number!)
    2. update-grub2 && grub-install /dev/sda
    3. Save your virtual hdd inside VBox into a File: dd if=/dev/sda /home/user/sda.img
    4. Copy the Image to a disk (external hdd, network share, dvd, ...)
    5. Restore the Image to the destination drive: dd if=/media/drive/sda.img of=/dev/sda

    The biggest problem might be the bootloader (but there are tutorials for this even in this forum). I once reinstalled a bootloader by doing a fresh install of Ubuntu (preferably the same as the one you dd'ed) and then dd the old partition over the fresh install (in this case, you would only dd /dev/sda1, not /dev/sda, which also includes the bootloader and all partitions)

  • Related Question