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 restore a HDD image I have to my laptop's HDD while booted off the Ubuntu Live CD.

The laptop's HDD is unformatted and has no partitions.

I expected this to work:

$ sudo dd if=/path/to/backup.img of=/dev/sda

But I'm told

dd: opening `/dev/sda': Permission denied.

What gives?

share|improve this question
    
Are you sure there are no partitions? Check back with sudo fdisk -l and mount, maybe something got mounted 'by accident'. –  Bobby Feb 3 '10 at 13:05
    
@Bobby Yeah - I got it working, see my answer, but don't understand why. –  xyz Feb 3 '10 at 13:13
add comment

1 Answer

Hmm. Doing a su first worked. Why's this?

$ sudo su
# dd if=/path/to/backup.img of=/dev/sda
share|improve this answer
add comment

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.