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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a doubt about MBR and partitions.
Please clear my doubts if I am right or wrong. As per my assimption
1. MBR resides at very first sector of the HDD and location of partitiions
start after MBR. MBR is not part of the first partition and MBR is not
located on first sector of the first partition.
2. In case of Single boot of Linux or Dual boot with xp grub stage 1 boot
loader is always on MBR and it locates grub stage 2 boot loader form
/boot partition.
While learning Linux my faculty told that MBR resides in the first sector of the first partition.
And on MBR there is a bootable exe which is not grub and something else.
I think what he is teaching us is wrong.
Please guide me if I am right or wrong.
If possible please provide me detailed info. about it.
The MBR is the first sector of the hard drive. The MBR contains the partition table (up to 4 partitions only), plus the first part of the bootloader, which tells where to find the rest of the bootloader. If the only OS installed is Windows XP (or some other Windows flavor), the MBR has part of windows ntldr along with the partition table. If the OS is Linux, then the MBR has the partition table plus part of the Linux bootloader (grub, lilo, or some other).
In the case of Linux, the stage 1 of grub tells grub where to find the rest of grub (in /boot directory).
Grub may install stage 1 to the MBR, but it may also be installed elsewhere if the system administrater chooses to use Windows ntldr as the bootloader. In that case, the first sector of the partition may be used in a manner similar to the MBR. That first sector of the partition is called the boot sector.
To understand better, suppose you install a Linux distribution, but you don't want the bootloader in the MBR. During installation, you choose to install grub to the root partition. In that cast the boot sector (the first sector of the partition) comes into play. Grub stage 1 and the partition go into the boot sector, with the rest of grub in /boot directory.
If you choose to install the bootloader to the root of the filesystem, you either need another bootloader in the MBR to boot, or you need a boot floppy or boot cd to boot.
One day some-one (me ???) should go and correct that article.
Perhaps someone has; I see that the article was changed on 2008.02.15.
I often cite articles there because they are accessible to most people. A book like Scott Mueller's Upgrading and Repairing PCs can be useful in situations like this, but is often overkill**2. I certainly agree that Wikipedia is not always 100% correct.
What would be the 3 most important corrections you would make to the MBR article at http://en.wikipedia.org/wiki/Mbr ? ... cheers, makyo
One more query.
as MBR contains 446 bytes of boot code 64 bytes of partition table and 2 bytes for magic number.
In this case is the partition table on MBR same as actual partition table? though it contains only 4 partitions.
The MBR contains what could be called the primary partition table. It provides for 4 primary partitions or 3 primaries + 1 extended.
An "extended partition" is really just the beginning of a linked list to one or more partition tables which appear in the "boot sector" of the logical partitions. These partition tables have the same structure as in the MBR, but only two entries are recognized. The first links into the actual partition area, and the second is another extended partition which links to the second logical partition.........etc.
What would be the 3 most important corrections you would make
Why 3 - or, stated another way, why only 3 ???.
My beef with most of these articles (on the web, not just *pedia) is they are generally very M$oft centric.
Sure (by default) they define the architecture of the "basic" DOS MBR/partition structure, but their brain-dead implementation ain't the "be-all and end-all".
That reference to the Linux use of "disk identity" - really needs to be fixed.
Why 3 - or, stated another way, why only 3 ???.
My beef with most of these articles (on the web, not just *pedia) is they are generally very M$oft centric.
Sure (by default) they define the architecture of the "basic" DOS MBR/partition structure, but their brain-dead implementation ain't the "be-all and end-all".
That reference to the Linux use of "disk identity" - really needs to be fixed.
I asked for 3 so that your time wasn't wasted with a laundry list of non-critical items, and to see an indication of how many I'm overlooking that might be crucial.
The MS-centric aspect is not surprising given that 90+% of PCs run MS operating systems. Most Linux systems seem to work with that implementation. My limited experience with others -- BeOS, for example -- exposed me to some alternate possibilities. The article also noted some that allowed more than 4 partitions, which might be of importance, but also encountered far less frequently.
The article mentions some of these other, non-MS formats for the MBR, which was the important aspect I wanted the OP to see.
I don't have the knowledge to criticize the section on signatures. The gloss in the LKML message emphasizes the use by installers. Given the level of information in the Wikipedia article, what would you change in the reference to Linux:
Quote:
Linux uses the NT disk signature at boot time to determine the location of the boot volume.[10]
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.