Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

Thread Tools Display Modes
  #1   (View Single Post)  
Old 20th February 2010
FBSD FBSD is offline
Real Name: Joe Barbish
Join Date: Feb 2010
Location: Angeles City, Philippines
Posts: 19
Default Understanding Fdisk, Slice, and the MBR (Master Boot Record)

Understanding Fdisk, Slice, and the MBR (Master Boot Record)

Users with Microsoft/Windows knowledge of how a hard drive is configured may have a terminology issue with FBSD. Microsoft/Windows and FBSD use the word partition to mean different (but related) things.

The Microsoft/Windows fdisk program is used to allocate partitions on the hard drive. This program allocates two types of partitions, ‘primary DOS partition’ and ‘extended DOS partition’. DOS means (Disk Operating System) which was the precursor to the Microsoft/Windows desktop GUI (Graphical User Interface).
A single ‘primary DOS partition’ occupying all the space on the hard drive would be assigned drive letter C:.

An alternate method used some times was to allocate a ‘primary DOS partition’ containing only part of the free disk space on the hard drive (50%) then allocate a ‘extended DOS partition’ and sub-divide it into 2 logical dos drives lettered D: and E: each one occupying 25% of the hard drive space.

The Motherboard Bios Booting Sequence ‘STANDARD’ was created in the days before windows desktop was even though of yet and at which time Microsoft (command line) DOS was the only thing available. This legacy standard has continued un-updated to this current time and contributes to the limitations imposed on booting, disk layout and selection of which allocation on the hard disk to boot from.

The motherboard BIOS ROM chip at power up time probes each device (floppies, cdrom, hard drive, usb memory stick) you selected in the BIOS menu to boot from.

The hard drive has a MBR (Master Boot Record) a (512 byte block) located in sector-0 of the first physical track on the hard drive. This MBR contains bootstrap code and the disk partition table created by the DOS fdisk program. The BIOS boot code reads the MBR code and disk partition table into memory and then transfers control to it. This MBR code is responsible for parsing the partition table and finding the bootable partition that is marked 'active'. The MBR code then sets up the disk-address-offset information for the bootable partition, and reads 'relative sector zero' from that partition, and transfers control to that one-sector block of code that contains the unique operating system code to load into memory.

This hard drive 512-byte MBR is where all the limitations are. Due to its size the MBR partition table is limited to 4 entries. This means no matter how large your hard drive is (20MB or 200GB) you can only sub-divide it into a maximum 4 partitions. One of which can be an ‘extended DOS partition’ with any number of ‘Logical Drives’ letters D: through Z:.

All Microsoft/Windows Operating Systems to date (Year 2010) can only boot from a ‘primary DOS partition’ flagged as active and access addition drive letters assigned in an ‘extended DOS partition’. All other ‘primary DOS partition’ that maybe allocated on that hard drive are inaccessible to the booted Microsoft/Windows operating system. This is really just a Microsoft/Windows limitation rather than being any consequence of the MBR partition table limitations itself.

Now from the FBSD side;
FBSD’s fdisk program allocates disk space into slices. A FBSD slice is the same thing as a Microsoft/Windows ‘primary DOS partition’. The FBSD ‘disklabel’ program is used to sub-divide the slice into smaller chunk’s called partitions. FBSD partitions are like (but not the same as) the logical drives inside an ‘extended DOS partition’. FBSD has to deal with the same MBR partition table limitations. The major difference is FBSD can access the other 3 slices from the slice it’s booted from. Advanced users have created dual-bootable systems where Microsoft/Windows XP is in the first slice/partition, FBSD 7.2 is in the second slice/partition, FBSD 8.0 is in the third slice/partition, and Linux is in the fourth slice/partition. In these cases selecting which slice/partition to boot from is done by the execution of a boot menu that lives in the MBR.

The FBSD boot0cfg program writes a simple boot menu program to the MBR. It’s called the ‘FreeBSD Boot Manager’.
There are other more sophisticated MBR boot menu programs in the FBSD ports collection that you can load into the MBR on the first physical cabled hard drive to scan for other bootable slices/partitions on this hard drive and any other hard drives cabled to the PC. It displays a menu giving you the option to choose which one you want to boot from. This gives you the ability to have more that one operating system installed on your PC at the same time.
FreeBSD Install Guide www.a1poweruser.com

Last edited by FBSD; 3rd March 2010 at 12:22 PM.
Reply With Quote
  #2   (View Single Post)  
Old 20th February 2010
J65nko J65nko is offline
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,506

All other ‘primary DOS partition’ that maybe allocated on that hard drive are inaccessible to the booted Microsoft/Windows operating system. This is really just a Microsoft/Windows limitation rather than being any consequence of the MBR partition table limitations itself.
This is not correct. Both DOS and Windows can see other primary partitions, and they get drive letters. At least the ones up to Windows 98, the last one I administrated.

Even primary partitions on other disks are assigned drive letters.
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving linux partitions out of the BSD disklabel/slice fbsduser NetBSD Installation and Upgrading 5 4th March 2009 07:07 AM
Lost FreeBSD boot record (when installing Ubuntu) TomAmundsen FreeBSD General 6 19th January 2009 09:41 PM
Understanding the FreeBSD kernel TomAmundsen FreeBSD General 3 7th July 2008 02:48 PM
Change the Size of a Slice kienjakenobi FreeBSD General 9 27th June 2008 03:01 PM
DNS problem- name server record tanked General software and network 9 16th June 2008 02:45 PM

All times are GMT. The time now is 11:48 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick