Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to backup my Windows machine before I put Ubuntu on the hard drive instead.

Following the instructions on the VirtualBox website it says to create an image.dd file using dd.

I booted up from the Ubuntu live CD, connected the external hard drive and then tried to use dd to create the image with the following command:

dd if=/dev/sda of=/dev/sdb1/image.dd

However I get the following message:

 a dev/sdb1/image.dd: not a directory error

Any ideas what I'm doing wrong?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

/dev/sdb1 isn't a directory, so you can't create a file in there.

You need to have a filesystem on /dev/sdb1 (I assume the drive exists and is already partitioned?) that can be mounted.

Then you need to mount that filesystem:

# mount /dev/sdb1 /mnt

should work.

Then you need to use

# dd if=/dev/sda of=/mnt/image.dd

Once it's finished, unmount the disk:

# umount /mnt

and you should be good to go.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.