Boot loader installation location

Where is it ideal to install the boot loader. While installation multiple options such as extended, boot, root and MBR are provided.

Which is the ideal location to install the GRUB, specially while installing SUSE on a machine running Windows as well.

Thanks.

Vinay

well i have not tried other options but i normally install it in the /boot partition.i also use a dual boot system.so if i want to change the linux distro or something similar, it will be very easy for me.as i dont have to go and edit mbr or boot files in xp.
if i want to remove the entire linux, i fix the boot of windows and that will do.

You will get different opinions about this. Personally, I prefer this advice from the dev’s on the wiki:

We recommend to keep the MBR “neutral”, that is, not consider it part of any operating system. For that purpose, a generic MBR can be used, that simply determines one of the 4 primary partitions by a bit flag, and then loads the first block of that partition in turn, to continue the boot process. The Yast installation offers the option to install such generic code in the MBR; do it when in doubt.

Unfortunately, on many machines today that is a bit challenging, because manufacturers often use 1 or even 2 partitions for “recovery” - they will place the Windows recovery image(s) on 1 and sometimes put recovery program code on the other. This is done because Microsoft forbids them distributing Windows installation media; the MS license restricts use to the factory image. So if along with the “C” drive 2 or 3 primary partitions are taken, then SuSE will need there to be an “extended” primary (inside of which “logical” partitions can be created, thereby getting past the 4 partition barrier) - for most users 3 SuSE partitions are desirable, 1 for swap (the counterpart of Windows pagefile on “C”, but it is preferable to have it on a separate partition rather than as a file on the same partition as the OS), 1 for the OS, and 1 for /home (the counterpart to putting Windows Docs & Settings on a separated “target” partition, a little known but highly advisable feature).

So . . . IME, it’s best if possible to install grub to the root partition and to mark that partition active (options in YaST Boot Loader, even during installation if you enter the dialog), if the root will be on a primary. When this is done, the Windows MBR boot code will start grub, and then your grub control file (menu.lst) can have an entry which will “chainload” boot Windows. If the root will be on a logical partition, then grub can be installed to the extended primary’s boot sector - but for this to work you must install the “generic boot code” with YaST because, while it can boot from the extended primary, the Windows code cannot.

The majority opinion is to just install grub to the MBR. That’s fine - when it works. I’m finding that between what the manufacturers are doing now with the partitions and even messing with the MBR itself, plus Microsoft’s habit of using the MBR for new things and not telling anyone (well, it may be posted on TechNet or MSDN) as has been done with Vista, the above advice about keeping the MBR neutral has even more value now.

If the root will be on a logical partition, then grub can be installed to the extended primary’s boot sector - but for this to work you must install the “generic boot code” with YaST because, while it can boot from the extended primary, the Windows code cannot.

mingus725–Have you done that, because it can be done but not easy. A generic boot code in the MBR can not boot directly to a logical volume. Unless I over looked something.

For it to work one must install a boot code (can be grub stage 1) into the extended partition table (if generic boot code, must make the logical volume active), along with makeing the extended partition in the MBR active. I have done it with a hdd hex editor , but do not know of any easy to use program.

My understanding is the extended partition’s boot sector houses stage1 with the data block holding the location to find stage2, essentially the same as when stage1 is installed in any PBR. This is why the stage1 in the PBR does not require a stage1.5 as it does when installed to the MBR, which enables stage1 to read the filesystem to find stage2. All that stage1 need do is find its stage2 and associated menu.lst. The logical partition chain is not in play here at all, and certainly not any active flag on a logical as the active flag is only used by the MBR code and is limited to the four records in the table. The distinction between the Windows MBR code and the SuSE “generic” code is that the latter, if I’m not mistaken, is DOS code - when DOS was written there was no logical partition scheme and that code will look at all 4 primaries in the table. Whereas the Windows code is written to ignore the extended primary record in the table.

I stumbled across all of this initially upon noticing the YaST option to install to the extended primary boot sector, which reminded me of what the DOS MBR code did. What was new learning for me was grub’s ability to store in that block the pointer to find stage2, and the difference in stage1 installation (i.e., stage1.5) between the MBR and a PBR. It is consistent with the ability to put stage1 in a different PBR than where stage2 is located. Of course, it must be on the same disk.

I haven’t tested this extensively, but I did do a couple of successful proof-of-concept tests. After I recover from the 2 hard disk failures I’ve had this past week (grrr!!! >:(), one of course being on our server (!), I’ll try to wedge in some additional testing.

I have an old openSuse 10.2 for testing.
It’s yast’s boot loader program does not seem to write a generic boot code to the MBR, the function is there but does not do the job.

MS’s 98/XP MBR boot code will boot to the EPT (extended partition table)if made active, but to work one must have yast write grub stage 1 into the EPT, not on the VBR of a logical volume.

The logical partition chain is not in play here at all
it is if one wants to boot directly to a logical volume’s boot sector. The MBR boot code can not boot directly to a logical volume’s (extended primary’s) boot sector. It can only boot to a primary partition or to the first EPT if it also contains a boot code ie:grub stage 1.

I could be miss reading your one post:

If the root will be on a logical partition, then grub can be installed to the extended primary’s boot sector

I know my writing and explaining is not to good.