Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
This came up in at least two recent threads, but never got totally resolved.
I have understood that a hard disk has 63 sectors set aside for boot code, partition tables, and ??. The boot loader goes in the first sector. If there are four partitions, then those partition tables are also in the first sector. More than four, and partition tables will be found in the second sector--and maybe beyond??
If there is a "boot sector" elsewhere on the disk---in an extended partition, etc. then where exactly is it and what is it for?
Don't quote me on this. But I'll give you my understanding of how it works.
The MBR (boot sector) is the first sector of the disk; 512 bytes in size. It can hold information about 4 partitions, that's all. That can be 4 primary bootable partitions, or two primary and two extended partitions (if you have two disks), or some combination the primary and extended.
However, extended partitions can be sub-partitioned into something like 15 more partitions (I could be wrong about the number). The boot sector still points to only two primary and two extended partitions (or however you have it set up).
Within the extended partitions, each partition can have a complete distro, assuming the partitions are large enough. The bootloader of each OS is installed to the partition; not the MBR. Only one distro serves as the Master Bootloader (the one written to the MBR). It's config file points to the locations of the other OS roots, and the location of each OSs compressed kernel image.
So, only one boot sector on the disk, but more that 4 partitions with installed distros.
Last edited by bigrigdriver; 12-17-2005 at 01:53 AM.
The Master Boot Record (MBR) is like what an old mainframer would call a Volume Table of Contents (VTOC). It is a label of sorts, on the front of a disk-volume, that describes what is in it, including (in this case) the primary partition structure.
Since the MBR contains only four partition-slots, if you need more than four partitions you do so by declaring the fourth to be an extended partition, which means that it contains an extension partition-table.
The MBR also contains the bootstrap-program that is executed by the BIOS when you turn-on the computer. The bootstrap program, in turn, locates and starts the boot loader, such as Grub or Lilo or NTLDR.EXE, that actually initializes the operating system of choice.
This takes us back to the original question---where are the other boot sectors? Somewhere in the first 63 sectors? ( I not see this area as being part of any partition---since a look at raw data in the partition table typically shows the first partition starting at sector 63)
The Master Boot Record contains the partition table and a small amount of executable code. The executable code examines the partition table and identifies the active (or bootable) partition. The Master Boot Record then finds the active partition's starting location on the disk and loads an image of its first sector, called the Boot Sector, into memory. The Master Boot Record then transfers execution to that Boot Sector image.
Whereas the Master Boot Record is generally operating system independent, the Boot Sector of the active partition is dependent on both the operating system and the file system. In the case of Windows NT and Windows NT Advanced Server, the Boot Sector is responsible for locating the executable file, NTLDR, which continues the boot process. The only disk services available to the Boot Sector code at this stage of system boot up are provided by the BIOS INT 13 interface. The Boot Sector code must be able to find NTLDR and file system data structures such as the root directory, the File Allocation Table (FAT) in the case of an MS-DOS FAT volume or the Master File Table in the case of an NTFS volume.
In the linux world grub uses the boot sector as in the linked I posted previously.
I need to go back a look at one of my Linux setups nad try to find what you are describing. For example, in one setup, I thought I found grub stage 2 beginning in the 2nd sector---way before the srart of the first partition.....
Confusing to say the least.