Restoring a HDD backup image from the Ubuntu Live CD

1

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?

xyz

Posted 2010-02-03T12:57:29.363

Reputation: 263

Are you sure there are no partitions? Check back with sudo fdisk -l and mount, maybe something got mounted 'by accident'. – Bobby – 2010-02-03T13:05:31.343

@Bobby Yeah - I got it working, see my answer, but don't understand why. – xyz – 2010-02-03T13:13:25.443

Answers

3

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

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

xyz

Posted 2010-02-03T12:57:29.363

Reputation: 263