Same day that my Pi arrived, I tried to write the Debian squeeze image to an 8GB Sandisk Micro SD. Actually I tried it with a 2GB unbranded and found the same problem.
The problem was that when clicking the ‘Write’ button in Win32DiskImager, it would say it could not lock the disk, the disk being the SD Card. Nothing I knew of had accessed the card since I had inserted it into the reader.
Looking around I saw a comment that said delete all partitions on the card. The only partition of course was a FAT32 one which was standard for this kind of disk. I used windows 7 diskpart as follows to delete the partition:
- Open a command prompt.
- Type ‘diskpart’ and the ‘Diskpart>’ prompt will be displayed.
- Against the Diskpart> prompt, type ‘list disk’.
- A list of disks will appear, for example:DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
——– ————- ——- ——- — —
Disk 0 Online 465 GB 0 B
Disk 1 Online 7580 MB 5723 MB
- Here you can see that my SD card is Disk 1 just by inspecting the sizes.
- With diskpart, before you can work on a disk or a partition, you must set the focus. So to select Disk 1 in my example, type ‘select disk 1’.
- Next check the partitions on the disk you have selected by entering ‘list partition’.
- In my example there was just the one FAT 32 partition called ‘partition 1’.
- Before deleting, you need to set the focus to the partition, so in my example I entered ‘select partition 1’.
- To delete the partition, enter ‘delete partition’.
- In my case, it still would not let me do this, saying the disk was locked. So we can use the ‘override’ parameter with delete by entering:
- delete partition override
We now have an SD card with no partiton defined! The next step was to exit diskpart by entering ‘exit’ and then try writing the disk image again.
I hope this helps someone else, please leave a comment! Someone has to be my first non-family-member commenter!!