Mailinglist Archive: opensuse-factory (279 mails)

< Previous Next >
Re: [opensuse-factory] How to dis/enable a bootloader?
  • From: Olaf Dabrunz <Olaf@xxxxxxxxxxx>
  • Date: Fri, 20 Mar 2009 21:23:27 +0100
  • Message-id: <20090320202326.GA8787@xxxxxxx>
On 20-Mar-09, Oddball wrote:
Oddball schreef:



What generic bootloader? Grub isn't the generic bootloader?


M9.

Do you mean the windows bootloader?
How to get that to work with a linux install?
As windows does not see linux, how would it be able to boot it?
Or you must show me a way to do so..?

Technically:

Grub stores its own "stage 1" bootloader in the Master Boot Record (MBR,
sector 0 on the disk). This then loads the "stage 2" from a fixed
block, which usually is on the Linux partition (although a "stage
1.5" may come in between). The stage 2 code can load a menu from the
Linux partition and display it, and then boots the system (load and
start the Linux kernel, or load and start the bootloader code from a
different partition, ...).

For GRUB, the "location of the bootloader" that appears in YaST menus is
the location of stage 2. Stage 1 is always in the MBR.


Microsoft operating systems (DOS, all Windows, ...) have always used
their own code in the MBR, which has not changed much over the years.
This code simply loads the first block from the activated partition and
runs the code in it, assuming that that is valid code from a bootloader.

As the code of a variety of bootloaders can be started from the
Microsoft MBR, it is sometimes called the "generic MBR". (GRUB can do
the same, but needs to load its own stage 2 first.)

The "generic MBR" is probably what you meant.



To answer your other question: how to set up your dual/triple/... boot
so that you can a) restore Windows and b) still boot when Linux is gone?

There are at least two approaches:

1) As described on http://www.swerdna.net.au/linhowtoboot1.html/,
you can just boot Linux from Windows, by letting Windows start
the GRUB stage 1 that you transferred from the MBR to a file.

With this method, you also need to restore the "generic/Microsoft
MBR" and activate the Windows partition. In the text from the URL
above, the MBR is "fixed" with Windows tools. Another possibility
is to boot Linux (either simply boot the installed system, or
start YaST from the installation DVD), then select YaST
bootloader, click the "Other" button and then "Replace MBR with
Generic Code".

2) Create a small Linux boot partition with YaST (25 - 100 MB), and
do not delete this partition when Linux is deleted.

This Linux boot partition contains everything GRUB needs (GRUB
stage 2 and the GRUB menu). After Linux is gone, GRUB can still
use this partition to boot Windows.

I prefer this, as all I need to do is to make sure that I have a
Linux boot partition. No fiddling with low-level tools or
somesuch.

Regards,

--
Olaf Dabrunz (Olaf <at> dabrunz.com)

--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups