Bug 213256

Summary: Grub installs in MBR no matter what selected in YaST2-bootloader
Product: [openSUSE] openSUSE 10.2 Reporter: Holger Sickenberg <holgi>
Component: InstallationAssignee: Joachim Plack <jplack>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Blocker    
Priority: P5 - None CC: aj, bjoernv, duwe, jplack, meissner, mrmazda, stefan.fent
Version: Beta 1 plus   
Target Milestone: ---   
Hardware: x86   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: YaST2.tgz

Description Holger Sickenberg 2006-10-18 09:36:39 UTC
I selected to install grub on the root partition during installation but it was installed in the MBR.

When starting YaST"-bootloader after installation there will be not checkbox checked of the possible bootloader destinations
Comment 1 Holger Sickenberg 2006-10-18 11:14:45 UTC
Created attachment 101868 [details]
YaST2.tgz
Comment 2 Lukas Ocilka 2006-10-18 14:33:09 UTC
Boot Loader -> odabrunz
Comment 3 Matej Horvath 2006-10-19 10:02:00 UTC
*** Bug 213577 has been marked as a duplicate of this bug. ***
Comment 4 Holger Sickenberg 2006-10-25 09:17:46 UTC
Still in version Beta 1
Comment 5 Karsten Keil 2006-10-25 09:58:17 UTC
Then this is a blocker IMHO, it is unacceptable that a installation destroy the MBR for a public test.
Comment 6 Holger Sickenberg 2006-10-25 10:07:45 UTC
*** Bug 186255 has been marked as a duplicate of this bug. ***
Comment 7 Karsten Keil 2006-10-25 10:09:40 UTC
The reason for overwriting the MBR is inside YaST, it write a /etc/grub.conf containing 2 setup lines, one for the selected boot partion one for the MBR
e.g.
setup --stage2=/boot/grub/stage2 (hd1,8) (hd1,8)
setup --stage2=/boot/grub/stage2 (hd0) (hd1,8)
quit

This is not the only bug in YAST2 grub handling, ut also does not write
the menu.conf correctely, the first lines with
default 0
timeout 8
gfxmenu (hd1,8)/boot/message

are missing.
Comment 8 Holger Sickenberg 2006-10-25 10:10:54 UTC
From Bug 186255:
------- Comment #2 from stefan.fent@novell.com  2006-10-25 03:55 MST -------
Depending on what you had on the szstem before, this might have been necessary.
MBR is just replaced by generic MBR, which makes sense in most cases.
Did you disable this in the checkbox?

So is there a change of behaviour now? So far I had to select when I wanted to replace MBR by generic code. Now I have to select if I _don't_ want it? Is that correct?

Where can I find the checkbox you are talking about?
Comment 9 Karsten Keil 2006-10-25 16:01:28 UTC
The checkboxes are off by default (in the boot loader details section) and I do not change anything there, so they are not the reason for the wrong config.
Comment 10 Jiří Suchomel 2006-10-26 06:22:37 UTC
BTW - from YaST style guide point of view - you shouldn't use checkboxes but rather radio buttons when you want user to select just one option from the list.
Comment 11 Stefan Fent 2006-10-26 10:59:50 UTC
Karsten, in your case you won't be able to boot w/o have grub in the MBR,
as you try to boot from BIOS 0x81 logical partition.
(It might be that you BIOS is capable of doing so, but there's no way to find out)

So, in your case the Behaviuor is correct.

Holgi, click on 'bootloader options' in the second tab of the bootloader configuration.

Downgrading. 
Comment 12 Marcus Meissner 2006-10-26 11:03:47 UTC
did you read my initial report?

independently whatever I select in the bootloader it will 
_ALWAYS_ overwrite my MBR.

Read: ALWAYS.

And no, it did not do this for 9.1, 9.2, 9.3, 10.0, 10.1, SLED 10, SLES 10, SLES 8, SLES 9, all installed on the same machine.

I have even attached YAST Logfiles for you to review.
Comment 15 Karsten Keil 2006-10-26 11:33:13 UTC
No it is not correct (and I did not fill a bug because this bug describe exactely my problem: YaST/grub ALWAYS overwrite the MBR).

I already have a boot loader in the MBR for all my test partions, until 10.2 Alpha5+ this was never overwritten, if I selected root or boot partion as boot source. The logfiles are the same. I see this wrong behavior on all my test machines with Alpha 5 plus.
Never overwrite the MBR if the user did not request it. Only case where it should be the default is, if the HD is fully used by the new install and if it is the only HD.
Comment 16 Holger Sickenberg 2006-10-26 12:14:28 UTC
To sf:
The checkbox at 'bootloader options' do not work (does not change anything).

Furthermore your statement "MBR is just replaced by generic MBR" is wrong. If you look to the /etc/grub.conf file you will see that (no mather) what you select within the YaST2 bootloader - it will be written to MBR AND boot partition.

So you can select what you want (as I mentioned before) it will be written in MBR all the time.
Comment 18 Stefan Fent 2006-10-26 16:23:41 UTC
Ok, to clearify:

- Yes, the proposal in Beta1 is not what we want (Although at least you can be  
  sure you're able to boot ;-P )
- There might as well be some problems with the interface
- To comment #7: _not_ writing grub to MBR in this case would leave you with an         
  unbootable System.
  Here we would need some kind of checkbox stating: "I know what I'm doing, I    
  don't expect the system to boot by it's own"

Finally, we should have 1 (one) bugzilla entry for one bug.
This bug is about the wrong proposal.
Could you please add bugzilla entries for _each_ of the problems you detect?
Comment 19 Björn Voigt 2006-10-26 16:56:50 UTC
Are there any work-arounds for people who want to leave their MBR untouched during installation or update?

My (untested) ideas:
- make /etc/grub.conf immutable (with chattr +i /etc/grub.conf)
- choose the option "Do not install a boot loader (or similar)"
- backup the old MBR
Comment 20 Torsten Duwe 2006-10-26 17:04:45 UTC
I just installed 10.2 Beta1 on AMD64, went to the "Expert" Tab, and checked both "replace MBR with generic code" and "activate partition" (or whatever their exact wordings are).

The result was a generic MBR, in case this helps anybody.
Comment 21 Stefan Fent 2006-10-27 07:42:14 UTC
comment #19: You can edit the /etc/grub.conf during installation from within YaST and remove the corresponding line.
Comment 22 Joachim Plack 2006-10-31 12:02:56 UTC
working on that in perl-Bootloader
Comment 23 Christian Zoz 2006-11-02 12:07:46 UTC
BTW: For 'Boot Loader Location' i checked 'Custom Boot Partition', but in the list of partitions all logical partitions are missing.
Comment 24 Marcus Meissner 2006-11-07 10:16:06 UTC
Beta1Plus has the same problem.
Comment 25 Joachim Plack 2006-11-07 14:33:18 UTC
Is fixed with new grub.conf handling in >= 0.4.0 in running system.
please confirm whether the behaviour differs in instsys
Am available through mobile phone (homesick)
Comment 26 Matthias Bachert 2006-11-13 15:19:50 UTC
This seems still being present in Beta 2 as when I installed Beta 2 the proposal was to install GRUB on /dev/hde2 but it was installed in MBR instead after the installation.
Comment 27 Joachim Plack 2006-11-13 16:08:10 UTC
list of logical partitions addded for beta2+
Comment 28 Felix Miata 2006-11-14 00:10:02 UTC
I started http factory install about 24 hours ago. All those checkboxes need to be replaced with radio buttons so that grub can be installed in only one location. No matter what box or combination of boxes I selected, the summary always reported that grub will be installed on mbr of first HD. Grub did in fact get installed on the root partition as I wanted. So, it doesn't seem to be fixed correctly yet.
Comment 29 Matthias Bachert 2006-11-28 16:57:03 UTC
reopened because still present in RC1
Comment 30 Joachim Plack 2006-11-28 17:19:03 UTC
this should be fixed now, will check tomorrow, finally with RC3
Comment 31 Andreas Jaeger 2006-11-29 11:50:46 UTC
What is the status with RC3?
Comment 32 Christian Zoz 2006-11-29 12:58:20 UTC
For me it worked with RC3. I selected to install grub to root partition. It did that and left mbr untouched. So i'm fine with it.

To comment 28: the checkboxes are intentional. It should be able to select multiple places simultaneously. This is an expert dialog.
Comment 33 Joachim Plack 2006-11-29 13:19:47 UTC
works for me too right now, works really smootly IMO