2

I have an old sd card with a pi image burned onto it. I want to burn a different image onto the card but I cannot get write access to the sd card. I've tried changing owners, permissions, fdisk, diskpart, gparted, and even checked if the hardware switch was engaged (It wasn't). I wrote to it originally using sudo dd on a linux machine if that matters. Nothing seems to be working to get write access on the card.

4
  • If you are running dd as root (sudo) then its just writing blocks to the device, what command on what machine are you running what is the error you get from the command and what is in the logs?
    – rob
    Commented Jun 19, 2015 at 6:43
  • @rob The error codes I get all say its a read-only file system. For example I just tried sudo dd bs=4M if=/path/to/image.img of=/dev/sdb1 which gave me this error: dd: failed to open ‘/dev/sdb1’: Read-only file system. Using gparted to try and edit the partitions on the sd card gives the same error: Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only
    – Inondle
    Commented Jun 19, 2015 at 19:48
  • Exactly what system are you trying to do this from?
    – goldilocks
    Commented Jun 20, 2015 at 11:27
  • @goldilocks my computer right now dual boots windows 8.1 and elementary os
    – Inondle
    Commented Jun 21, 2015 at 18:06

2 Answers 2

0

You were trying to write the image to a partition on the card as opposed to the card itself.

sudo dd bs=4M if=/path/to/image.img of=/dev/sdb1
                                            ^^^^

The card would be just /dev/sdb, and that's what you should use there.

I don't think that's a complete explanation, but hopefully it will help. You should also check if there's "lock" switch on it. I think the pi will ignore that (those switches don't really do anything, they're just observable by the OS via the hardware), but your other computer might be.

0

If you have access to a windows machine, try win32diskimager.

http://sourceforge.net/projects/win32diskimager/

It will format the contents of the drive completely, and write the new image onto it automatically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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