Hard Drives and MBR

 
Thread Tools Search this Thread
Special Forums Hardware Hard Drives and MBR
# 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

Code:
 
fdisk /mbr

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

Code:
 
installboot

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 Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Understanding volumes and hard drives

Ok so i thought i was smart but i can tell I need some help. I am playing around with understanding lvm and adding disks to a linux box. I added a disk and then ran what i thought were commands to add this disk to the box but I think I messed up and would like some help. My question is did i... (5 Replies)
Discussion started by: cptkirkh
5 Replies

2. Solaris

Solaris 8 - Accessing Hard Drives

Hi, I have two SCSI Hard Drives in a Sun Solaris 8 server as shown below. I would like to access Disk1 and look at its contents, directory structure and files. How do I change my default directory from Disk 0 to Disk 1 and vice versa? Thank you. (5 Replies)
Discussion started by: ssabet
5 Replies

3. Solaris

Trying to boot Solaris without hard drives in T5220

I have three Sun Oracle Netra T5220s. I am trying to just get the processor information psrinfo or prtdiag -v from the # prompt in single user mode. I am needing to know the commands to get to boot the CD/DVD of the Solaris OS. I am using it via Serial Port Management. Tinkering around I... (4 Replies)
Discussion started by: nerdboy
4 Replies

4. Solaris

Reinstall old hard drives

I have a T2000 Sun-Fire server. I have 2 sets of drives in a raid 1. Lets call them Set A and Set B. I had Set A installed and working. I needed a new install so I so build up Set B. After some time I wanted to put Set A back in the server. Now the system will not boot off of Set A. I tried to boot... (7 Replies)
Discussion started by: stu1811
7 Replies

5. UNIX for Dummies Questions & Answers

Set internal hard drives unaccessible to imager

Looking for some clues on how to set my internal hard drives inaccessible/busy to clonezilla. Noprobe doesn't work in startup and the drive is still found. I know I can find all hard drives using the following: sudo fdisk -l | grep GB | awk '{print $2}' | grep -Po "^+(?=:?)" I tried... (9 Replies)
Discussion started by: traustic
9 Replies

6. Filesystems, Disks and Memory

Help adding new hard drives

Folks; I just added 2 physical new hard drives to my SUSE server. My server is already running SUSE 10.3 version. Is there a command i can use to add the new space or even see if the system can sees them? (3 Replies)
Discussion started by: Katkota
3 Replies

7. Solaris

formating and repartitioning an external hard drives

Version: solaris 10 x86 I just got a western digital external harddrive formated with fat 32. this drive came with some setup files which is meant for windows or mac. I want to reformat and partition this drive into two ( for solaris and windows) such that the setup files will still be there... (2 Replies)
Discussion started by: seyiisq
2 Replies

8. Linux

No Hard Drives Have Been Found

I am using an Acer Aspire 4720Z with two partitions C and D. Windows is installed on C and I decided to install Red Hat Linux 9 in partition D. The two partitions are in NTFS file system. During my installation of the the Linux, a prompt was displayed on screen with the message: "No hard drives... (2 Replies)
Discussion started by: tamcomng
2 Replies

9. Filesystems, Disks and Memory

automatic copying files from external hard drives

I need to make it possible to automatically copy files from an external usb hard drive to a directory when i plug it in....if you can point me in the right direction, i would be very grateful....thanks a lot. :confused: (0 Replies)
Discussion started by: backman4sakn
0 Replies

10. UNIX for Dummies Questions & Answers

Hard drives

Will some one tell me what this means. "warning: ida 0 <slot 6> : command timed out on dev 1/42 blk 4824290 logical unit=0 blocks=5512102, size 2, cmd=0x20." I'm running SCO 505 on a proliant 1600r. Thnank you in advance. (3 Replies)
Discussion started by: franruiz
3 Replies
Login or Register to Ask a Question