1

I want to mess with the MBR (master boot record) partition table on my SD card, potentially corrupting the MBR. I am fully aware that I may end up corrupting partition content in the process if I let RPi try and boot from a random location of the card. Anyway, on to the concrete problem I have:

The problem is that I don't know of any way to directly read or write to the card in Windows 8, which my desktop computer currently run. Raspbian has the nice dd command and direct memory access via /dev/mmcblk0 so I can read and write specific bytes directly to the memory card. But if I mess up the boot loader so the GPU can't run the bootcode and load my kernel, then I have no way to restore the changes to the MBR partition table.

Since I only have Windows 8 available at the moment, I'd like to get access to the card to peek and poke data from Windows 8. If the operating system have no tools to directly access my SD card through my SD card reader, can you recommend any software that is capable of writing specific bytes (while keeping the rest of the memory card unchanged)? At the very least I want the replace the first 512 bytes.

I know I can make a full image clone of the drive, but I don't want to write the entire image when I don't have to.

1

There is a utility called dd for windows that should do the trick. I've used it through windows 8.1 with no issues. Here is the link to the page (download links are at the bottom).

http://www.chrysocome.net/dd

Regards.

  • Thanks. I have to wrap my head around the device path for Windows but at a gist, this appear to do what I want! – Statement Nov 19 '15 at 20:17
1

I've tried several solutions over the years, but none of them work particularly well. Linux can edit the card with ease as you've mentioned, so I decided it was better to just not reinvent the wheel...

I would recommend installing a VM on your windows computer for such purposes. VirtualBox is free, and all the major linux distros I've tried work well with it. Try installing Debian onto a VM, and then mounting the card to the VM.

  • I'd love to throw together a VirtualBox instance but for some reason VirtualBox throws an error regardless of which OS I want to virtualize (well, in honesty I only tried Linux and MSDOS but I got the same error message). Upvoting, because I believe it would be useful for people who can run VirtualBox and would be viable if my system ran it. – Statement Nov 19 '15 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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