Hard Drives and MBR

Login or Register to Reply

Thread Tools Search this Thread
# 1  
Old 06-03-2013
Hard Drives and MBR

Hello everyone. I have a question which I may know the answer to, I'm just looking for a confirmation. When it comes to the MBR of a hard drive, i've read in multiple sources that it's always located in the first sector of the hard drive. Is the MBR there from the factory? When I buy a new blank drive from a store, will it have that first sector reserved and MBR in place?

When I use a program like fdisk in linux, it doesn't allow to modify or write to the first 63 sectors. Is this because of the MBR? Do I have that right, or is the MBR applied when you install a bootable partition?

Any insight in this would be helpful. Thanks!
# 2  
Old 06-03-2013
I'll explain this first: A hard drive doesn't know or care what its contents are. If it gives you sector 123523 when you ask for 123523, it has fulfilled its responsibility.

You don't "install" an MBR, it's just there, in sector zero, because that's where your computer expects it to be by tradition. If sector zero doesn't have valid contents, your computer just won't boot from it. More modern things like GPT -- which can have partitions much larger than a basic DOS-style MBR would support -- have extra data elsewhere as well, at the end of the disk I believe...

You don't get to put partitions in the first 63 sectors just because that's how DOS-style partition tables work, they can't represent numbers any lower than that.

Some disks will come formatted with a sensible MBR. Some just fill it with zeroes. It doesn't matter much, since there's no barrier to doing what you please with it.

The only thing actually stopping you from writing over the MBR is the operating system. When you partition a device in Linux, it breaks it out into separate pretend-devices like /dev/sda1, /dev/sda2, and so forth. Theyr'e safely compartmentalized, they won't let you write beyond their bounds, but it's the OS doing that for your convenience, not the disk itself. You can use /dev/sda itself if you want to talk to the raw device, but almost nothing except a partition editor would need to do so.
# 3  
Old 06-03-2013
It's important to note that the MBR occupies the first sector --not 63-- of a disk (usually 512 bytes).

The first 63 sectors of any disk are commonly known as track0 and may contain a MBR, vendor information or just zeroes.

The concept is often mistaken with the partition table which happens to take 64 bytes of the MBR in most systems.
# 4  
Old 06-04-2013
The MBR (Master Boot Record) resides on the first sector of the disk and is where control is passed to by the machine BIOS.

The MBR will be different from operating system to operating system, and each operating system will have a way of writing its own MBR.

For example, in Windows

fdisk /mbr

(google that for syntax) will write an MBR and on Solaris the


command will write an MBR.

If an MBR exists at all when the disk comes from the factory, that will just be from the manufacturing test process and probably won't be what you need for your O/S. When the O/S install routine runs it will install its MBR.
Login or Register to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Need Hardware help on a RP4440 that lost the RTC and does not see both hard drives mrmurdock HP-UX 2 2 Weeks Ago 02:22 PM
Understanding volumes and hard drives cptkirkh UNIX for Beginners Questions & Answers 5 01-04-2019 05:34 PM
Solaris 8 - Accessing Hard Drives ssabet Solaris 5 12-15-2016 03:26 AM
Hard Drives Undetected on My Machine - But Mounts on All Other Machines jacobs.smith Ubuntu 20 08-18-2015 03:35 PM
Create LVM of 2 Hard Drives while installing Centos 6.4. purushottamaher Linux 1 04-28-2014 06:40 AM
Trying to boot Solaris without hard drives in T5220 nerdboy Solaris 4 09-03-2013 05:04 PM
Reinstall old hard drives stu1811 Solaris 7 05-04-2013 10:58 AM
Set internal hard drives unaccessible to imager traustic UNIX for Dummies Questions & Answers 9 01-23-2012 12:09 PM
Help adding new hard drives Katkota Filesystems, Disks and Memory 3 10-10-2009 04:57 PM
formating and repartitioning an external hard drives seyiisq Solaris 2 05-18-2009 08:22 AM
How do I determine the hard drives in /dev/dsk in OpenSolaris? sqa777 Solaris 2 12-23-2008 05:15 PM
No Hard Drives Have Been Found tamcomng Linux 2 07-21-2008 08:30 AM
Sun Solaris 9 E250 -- Suggestions For External Hard Drives KenLynch Solaris 2 04-08-2008 12:36 AM
automatic copying files from external hard drives backman4sakn Filesystems, Disks and Memory 0 08-12-2005 06:11 PM
Hard drives franruiz UNIX for Dummies Questions & Answers 3 01-13-2004 05:13 PM