0

I have learnt that the BIOS collects the most diverse hardware data and create a complete list of all of the device’s available drives immediately after being powered on.

When this process is complete, the firmware goes through the data carriers found in sequence, checking for a bootloader by means of a special signature – the so-called boot signature (or ‘boot record’). The search always starts on the removable media (CD/DVD, USB stick, external hard drive, etc.), followed by the hard-coded drives. With the latter, the bootloader and its signature is generally in the master boot record (MBR).

My question - Since the BIOS checks the boot signature value in all the detected storage devices one by one, does that mean every (storage media detected by the BIOS here) must have a Master Boot Record irrespective of whether the device is bootable?

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
  • 2
    The question is something of a misinterpretation… somewhere. A disk could be GUID formatted, rather than MBR. That would usually require that it has an EFI partition to be bootable. So the direct answer would be … "no". but that would be missing the point. [I'll leave the actual answer to someone who can fill in the detail better than I can]. – Tetsujin May 16 '21 at 13:35
  • 2
    [This answer](https://superuser.com/a/1553254/194694) may be helpful. The question is very different, but that (lengthy) answer of mine touches upon the topic of MBRs in modern PCs. – gronostaj May 16 '21 at 13:42
  • @Tetsujin Pardon me .I am new to learning OS concepts.. so when I read a blog to understand the booting process, I read the above paragraph. I was unable to put the pieces together when it came to the point that, 1)BIOS checks boot-signature to find out whether a disk is bootable. 2) And that boot record lies in the MBR. So what if the storage device does not have any MBR or any other partitioning at all!? How would BIOS get the boot signature of that device in that case!?? – manoj kumar May 16 '21 at 13:45
  • 1
    I have entire computers-full of disks, none of which are MBR-formatted. MBR is a bit of an old fashioned structure these days & even when 'in vogue' not all operating systems used it. – Tetsujin May 16 '21 at 13:48
  • @Tetsujin But my question is does a _non-partitioned device_ get detected and checked by the BIOS whether it is bootable or not while booting? I don't have much idea of what partitioning formats is more efficient neither do I want to peek into that – manoj kumar May 16 '21 at 13:55
  • Part of the problem here is that you are probably looking at BIOS when BIOS haven't been used for years. YOU DON'T HAVE A BIOS, you [have UEFI firmware](https://www.howtogeek.com/56958/htg-explains-how-uefi-will-replace-the-bios/) which is not the same thing. They function differently even though they perform the same goal. Half of the "rules" you talk about are how legacy BIOS worked, not UEFI firmware. – Señor CMasMas May 16 '21 at 14:15
  • @manoj kumar, "So what if the storage device does not have any MBR or any other partitioning at all!? How would BIOS get the boot signature of that device in that case!??" The BIOS would try to read boot information from that drive, fail and conclude that the drive is not bootable. – r2d3 May 16 '21 at 15:36
  • @r2d3 alright.. so it just sets it own flag or something if it fails to find the info and continue searching is that what you mean? – manoj kumar May 16 '21 at 15:47
  • @r2d3 Hey! I finally understood your answer. Thanks! – manoj kumar May 16 '21 at 15:48
  • I am happy to hear that. But please have a look at the hint of Senor CMasMas towards the newer boot process! – r2d3 May 16 '21 at 16:12

2 Answers2

2

Well, no, they don't need to have a MBR if they aren't meant to be bootable.

Most operating systems after MS-DOS do not rely on the BIOS of disk access. As soon as the OS has started booting, it'll use its own drivers for talking directly to the storage devices – and will be able to use them regardless of whether the BIOS had detected them in any way or not.

That said, most will have a MBR or something resembling it.

  1. The MBR doesn't only contain BIOS boot code; it also contains a partition table. Any disk using the traditional MBR partitioning will have the boot signature, even if it doesn't have any boot code there.

  2. UEFI uses a different partition table format (the GPT), but specifies that every GPT-partitioned disk should still have a "protective" MBR (with empty boot-code area and a special partition), to avoid outdated tools incorrectly thinking that the disk is empty.

    (To be clear, GPT disks can be used on BIOS systems, as it's not the BIOS but the OS that handles the partitioning; and the protective MBR can even hold boot code, so it's possible to make such disks bootable on BIOS systems as well.)

Finally, practically all new PCs for the last couple of years have used UEFI firmware – not BIOS; the native UEFI boot process is completely different and doesn't use MBRs. (Though for a long time most UEFI PCs could still recognize and boot from disks in the BIOS way, but that's now slowly disappearing from new models.)

u1686_grawity
  • 426,297
  • 64
  • 894
  • 966
  • "_As soon as the OS has started booting, it'll use its own drivers for talking directly to the storage devices_" . Exactly! I want to know what happens _at the time of booting_ when the device is plugged in and then the PC is powered on. Since you say that _they don't need to have a MBR if they aren't meant to be bootable._, how does the BIOS know that it is just a normal storage device without any partitioning in it and hence it is not bootable? I mean it obviously can't check for boot record since the storage device is clean and not partitioned in any way.. – manoj kumar May 16 '21 at 14:06
  • A BIOS, regardless wether in MBR or in GPT mode has to read from drives to check for boot information. When in MBR mode for instance it may a have boot order list or even an assigned boot drive. Nevertheless it has to read the boot information. If there is none, like on a clean storage device, the BIOS won't boot or try the next available drive from the list. – r2d3 May 16 '21 at 15:03
  • @r2d3 on a clean storage device, where does the information (whether it is bootable or isn't) lie? – manoj kumar May 16 '21 at 15:45
  • 1
    If your "clean" stands for a zeroed drive then there is no boot information on such a drive => search fails => not bootable. Bootability on drive level is determined by its content. And as I said before, other rules that you set in BIOS may apply. – r2d3 May 16 '21 at 16:14
-1

Your posting is confusing because it contains two different questions.

As for the question in the title:

Does every storage device have MBR?

Yes. The old MBR-based partitioning scheme has been replaced by the modern GPT scheme which includes a protective MBR to prevent old operating systems to perform write operations on the drive.

There is one rare exemption called "superfloppy" which does not play a role in the boot process of desktop computers.

As for your second question:

My question - Since the BIOS checks the boot signature value in all the detected storage devices one by one, does that mean every (storage media detected by the BIOS here) must have a Master Boot Record irrespective of whether the device is bootable?

Technically no. What you described in your posting is the old boot process of an old BIOS. A modern bios uses a different boot process according to "UEFI". It does not have to care about MBR structures on disk because the GPT contains all necessary information. A modern UEFI-Bios only has to find the bootloader on the EFI system partition.

r2d3
  • 3,298
  • 1
  • 8
  • 24
  • LBA 0 isn't a synonym to MBR. It can be full of zero, consists of random data, first block of a filesystem. – Tom Yan May 16 '21 at 14:54
  • Actually even the second half of your answer contradict with the first half. – Tom Yan May 16 '21 at 14:56
  • @Tom Yan, where do I speak about "LBA 0"? This is your term. Please specify exactly which parts of my answer contradict. – r2d3 May 16 '21 at 15:06
  • What I mean is, a drive can't "must have" an MBR unless an MBR is a component of the drive, like a block/sector itself. MBR is nothing but certain kind of data. The `Yes` and `No` contradict with each other, since the core of both questions is pretty much the same. – Tom Yan May 16 '21 at 15:14
  • "pretty much the same" is no explication because I explained where I see the difference. – r2d3 May 16 '21 at 15:16
  • While the "difference" provides no ground for the contradiction anyway. – Tom Yan May 16 '21 at 15:20
  • My question is not specific to BIOS /UEFI.. Its more kind of to understand the theory. @r2d3 As you commented on the above answer, "_If there is none, like on a clean storage device, the BIOS won't boot or try the next available drive from the list_", I just want to know how exactly that happens..I mean on what flag/ value or something(boot record i believe) does the BIOS/UEFI or any firmware rely on to check the cleanliness of the drive. ->If incase it is clean – manoj kumar May 16 '21 at 15:40