User Tools

Site Tools


what_is_an_mbr

What is an MBR?

Wikipedia has plenty to say on what a Master Boot Record is.

For brevity, I'll just say that it is a chunk of 512-bytes that 'optionally' sits at the start of your hard-disk (or in our case, USB stick).

Its job is to describe where to locate partitions on your disk.

For example, if your 1000MB disk has been split into multiple partitions of C: (300MB), D: (500MB) and E: (200MB), the MBR tells your OS, “Hey, you can find C: drive at this location on the disk and its size is this much, also you can find D: on that part of the disk and its size is that much, etc”.

Now, the reason why I referred to the MBR before as being 'optional' was due to the following case.

What it if we just want a single partition to span the entire disk's contents. Well, there are two ways of specifying this:

  • Have an MBR that specifies just a single partition that spans the entire disk (apart from the first 512 bytes needed for the MBR)
  • Omit the MBR, and just let the single partition span the entire disk (including the first 512 bytes where the MBR would have been)

Why does the C64 mini care whether I have an MBR or not?

Yeah, good question, and I can't give you a definitive answer on that. My best educated guess would be that due to the C64 mini running on a stripped down version of Linux, perhaps one aspect of this 'stripping down' was in the amount of support for file-systems.

I believe a fully-fledged Linux install wouldn't have any such trouble reading any FAT32 USB stick, regardless of whether it had an MBR or not. So for now, my suspicions lie in the 'stripped down' nature of the current OS.

Why does my USB stick work first-go, while others have all these problems

It is likely that your USB stick came pre-formatted with FAT32+MBR, saving you from all the headaches that everyone else is experiencing ;)

How can I tell if my USB stick has an MBR or not

Being a techy guy, I tend to figure this out by using linux tools like dd and hexdump, to assess the first 512 bytes of the drive, with a line such as this:

dd if=/dev/disk2 bs=1 count=512 2> /dev/null | hexdump -C -v | less

There are certain bytes within this chunk that are tell-tale signs of an MBR's existence.

Doing things this way is probably not to everybody's liking though, so if I learn of easier ways of ascertaining this, I will jot them down for you here.

How do I format without an MBR, so that I can replicate this issue

For testers that want to replicate this issue on their USB sticks, you can format it from linux with a command such as this:

mkfs.msdos -I /dev/sdX (replacing X with the drive letter of your usb stick)

what_is_an_mbr.txt · Last modified: 2018/04/19 22:02 by gurce