0

I am booting from an Ubuntu CD on my laptop. I want to write all zeros to my hard drive, then re-stall Windows 7. I have backed up all the files I want to.

After booting up, I open a terminal window, and type:

dd if=/dev/zero of=/dev/sda bs=1024

The computer responds with "permission denied".

Any suggestions on how to proceed?

Seth
  • 59,332
msh
  • 1

1 Answers1

5

First off, I'd use the built-in format function in the Disk panel.

However, your mistake is that you're not root. This is very easy to fix. Change your command to:

sudo dd if=/dev/zero of=/dev/sda bs=1024

Now, run it. When it asks you for your password, enter it. You will not see characters


Generally, whenever you see Permission Denied, it means you need to do whatever it is you are trying to do as root. This does NOT mean you should put sudo before every command that results in Permission Denied. Instead, think of each Permission Denied message as this:

Hey! You! Yes, you. With the pants. This command is going to do something that might be dangerous to your system. Please review it carefully! If you still want to run it, add sudo to the beginning of the command.

Kaz Wolfe
  • 34,680