# how to move a raw disk image to a pendrive to make it bootable?

I tried to follow this: Migrate from a virtual machine (VM) to a physical system but it is not working for me.

I have a working xubuntu vdi image. I converted it like this:

VBoxManage internalcommands converttoraw mydisk.vdi /home/wojtek/Pobieranie/disk.img


Then I tried to move it to a newly formated pendrive:

sudo dd if=/home/wojtek/Pobieranie/mydisk.img of=/dev/sdb1


I got this:

18874368+0 records in
18874368+0 records out
9663676416 bytes (9.7 GB) copied, 2831.46 s, 3.4 MB/s


But now I can't even mount my pendrive. It's shown as unformatted with all the space left. It doesn't boot as expected.

What did I do wrong?

I should have used sudo dd if=/home/wojtek/Pobieranie/mydisk.img of=/dev/sdb, not sudo dd if=/home/wojtek/Pobieranie/mydisk.img of=/dev/sdb1 as Mike pointed out. Thanks Mike!

-
I suspect, the dd command should have looked like this: sudo dd if=/home/wojtek/Pobieranie/mydisk.img of=/dev/sdb. Note that /dev/sdb is not the same as /dev/sdb1. –  mikewhatever Mar 4 '13 at 17:25
Thank you. You were right! Now it works! –  wryrych Mar 4 '13 at 20:19
Please @mikewhatever add your comment as an answer, so rrh can accept it. Good catch, BTW. –  Javier Rivera Mar 5 '13 at 8:14

The dd command should look like this:
sudo dd if=/home/wojtek/Pobieranie/mydisk.img of=/dev/sdb

...in other words, /dev/sda1 is not the same as /dev/sda.