[Bug 726836] New: installing the grub /package/ installs the bootloader. Please don't do that!
https://bugzilla.novell.com/show_bug.cgi?id=726836 https://bugzilla.novell.com/show_bug.cgi?id=726836#c0 Summary: installing the grub /package/ installs the bootloader. Please don't do that! Classification: openSUSE Product: openSUSE 12.1 Version: RC 1 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader AssignedTo: jsrain@suse.com ReportedBy: jnelson-suse@jamponi.net QAContact: jsrain@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 I have been using grub2. it works well. I had removed grub, but last night zypper re-installed it. This morning, I had a non-booting machine trying to use grub1 but without any configuration. Please don't install the /bootloader/ when the /package/ is installed. Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c1
Jiri Srain
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c2
--- Comment #2 from Torsten Duwe
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c3
Torsten Duwe
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c4
--- Comment #4 from Jon Nelson
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c5
Jiri Srain
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c6
--- Comment #6 from Jon Nelson
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c7
--- Comment #7 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c8
--- Comment #8 from Jiri Srain
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c9
Jon Nelson
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c10
--- Comment #10 from Michael Chang
I don't believe that it's true for other packages. Does installing a new syslinux rpm or a new grub2 rpm actually update the bootloader itself (akin to 'grub2 install /dev/sda' or some such)?
The reason that grub was reinstalled in the first place was to meet some dependency due to 'zypper dup' -- since I already had grub2 installed and working it really surprised me that grub simply installed over it, the result being a non-working system. I would be equally surprised if simply /installing/ syslinux or lilo would overwrite an existing bootloader.
Thanks for the explanation .. can you tell what package depends on grub? Anyway it makes sense to me that the bug was caused by update and dependency,
I see that /etc/sysconfig/bootloader has all of the config options I'd expect (including LOADER_LOCATION=none to prevent any post-install). Is grub honoring /etc/sysconfig/bootloader? If I set the LOADER_TYPE to grub2 will re-installing grub overwrite the boot sector/bootloader ?
Depends on the tools you deal with the bootloader -- generally if you use system wide tools like "update-bootloader" or "yast2 bootloader" they would honor the sysconfig settings. Use package level tools like grub-install would not .. set LOADER_TYPE to grub2 is useless for now .. as it's not ready. Only package level tools provided to work.
I might suggest that asking grub/grub2/lilo/syslinux/whatever to conform to the *user* preferences in /etc/sysconfig/bootloader is ideal.
I agree.
Furthermore, and this is a bit of a pipe dream, it'd be nifty if 'grub2-install' and 'grub-install' (and others) would grump if they are being used and /etc/sysconfig/bootloader is *not* the same value (by that I mean if I use grub2-install with /etc/sysconfig/bootloader set to use lilo then I'd think if nifty to see a warning message: WARNING: /etc/sysconfig/bootloader configured to use lilo, not grub2. Continue?" )
As far as I know these package level tools are not visible to sysconfig settings (They are identical to upstream thus no concepts about "system"), Use it and break the settings is expected.
I hope I am expressing myself clearly here.
YES. Thanks. :)
Thank you for listening.
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c11
--- Comment #11 from Michael Chang
Actuall, /etc/grub.conf was file I was refering to. If it did not contain information that GRUB1 should install to MBR, it would not (either because the file does not exist, or because it does not tell to install to MBR).
Yes.. but the problem is that it did contain some information (seems to be a leftover by last installation) :(
Removal and re-installation of the package may be the problem; not sure if we can handle it on package level, if we want to support users switching to GRUB2 manually (there is currently no support in perl-Bootloader), I guess there is no other way.
YES. It's hard to tell now since GRUB2 lacks support. JFYI I am working on grub2 perl-Bootloader now (as my hackweek project but not finished).. let's see. :) Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c12
--- Comment #12 from Jon Nelson
(In reply to comment #6)
I don't believe that it's true for other packages. Does installing a new syslinux rpm or a new grub2 rpm actually update the bootloader itself (akin to 'grub2 install /dev/sda' or some such)?
The reason that grub was reinstalled in the first place was to meet some dependency due to 'zypper dup' -- since I already had grub2 installed and working it really surprised me that grub simply installed over it, the result being a non-working system. I would be equally surprised if simply /installing/ syslinux or lilo would overwrite an existing bootloader.
Thanks for the explanation .. can you tell what package depends on grub?
jnelson@worklaptop:~> rpm -q --whatrequires grub patterns-openSUSE-base-11.4-6.9.1.x86_64 bootcycle-0.3-234.1.x86_64 jnelson@worklaptop:~>
Furthermore, and this is a bit of a pipe dream, it'd be nifty if 'grub2-install' and 'grub-install' (and others) would grump if they are being used and /etc/sysconfig/bootloader is *not* the same value (by that I mean if I use grub2-install with /etc/sysconfig/bootloader set to use lilo then I'd think if nifty to see a warning message: WARNING: /etc/sysconfig/bootloader configured to use lilo, not grub2. Continue?" )
As far as I know these package level tools are not visible to sysconfig settings (They are identical to upstream thus no concepts about "system"), Use it and break the settings is expected.
And that is exactly my point -- the *package* should not be overriding the decisions made at the *system* level. For example, let's say I had set /etc/sysconfig/bootloader to "lilo" -- installing grub, however, would have overwritten the lilo installed bootloader. In the scripts for grub (and others), they ought to 'source /etc/sysconfig/bootloader', and something like this ought to work: source /etc/sysconfig/bootloader LOADER_TYPE=${LOADER_TYPE:-grub} # default is grub LOADER_LOCATION=${LOADER_LOCATION:-mbr} if [ "$LOADER_TYPE" != "whatever-I-am" ]; then exit 0 fi if [ "$LOADER_LOCATION" == "mbr" ]; then ... install to mbr elif [ .... ] and so on. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c13
--- Comment #13 from Michael Chang
And that is exactly my point -- the *package* should not be overriding the decisions made at the *system* level. For example, let's say I had set /etc/sysconfig/bootloader to "lilo" -- installing grub, however, would have overwritten the lilo installed bootloader.
True, but I don't think we can fix it. :( The principle is that these tools came from upstream, they should work as is, what we usually do is to package them and people use them is **identical** with upstrean. Another principle is that these changes can't get upstreamed, unless they are willing to accept disto specific patches .. It would become maintenance burden if we have to porting these specific patches each time when update newer version(and also test burden to these patches). I would view these tools as building block of systems but not directly touched by normal user .. You could use them, of course, but you are in *expert mode* and you are on your own ... Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c14
--- Comment #14 from Michael Chang
can you tell what package depends on grub?
jnelson@worklaptop:~> rpm -q --whatrequires grub patterns-openSUSE-base-11.4-6.9.1.x86_64 bootcycle-0.3-234.1.x86_64
Thanks. I'll take look on above two packages. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c15
--- Comment #15 from Jon Nelson
(In reply to comment #12)
And that is exactly my point -- the *package* should not be overriding the decisions made at the *system* level. For example, let's say I had set /etc/sysconfig/bootloader to "lilo" -- installing grub, however, would have overwritten the lilo installed bootloader.
True, but I don't think we can fix it. :(
I think it can be fixed. the rpm postinstall scripts can very easily check /etc/sysconfig/bootloader and stop there if bootloader is not empty or 'grub'.
The principle is that these tools came from upstream, they should work as is, what we usually do is to package them and people use them is **identical** with
Sure, but the /rpm post install scripts/ aren't upstream. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c16
--- Comment #16 from Michael Chang
I think it can be fixed.
Sorry. I think it's my misunderstanding that your attempt is to patch tools like grub-install to sync with sysconfig settings.
the rpm postinstall scripts can very easily check /etc/sysconfig/bootloader and stop there if bootloader is not empty or 'grub'.
Yes, it's a way to go. But for your case, it might not work since grub2 is not supported by perl-bootloader. This fix only guarantee that loaders installed by system level tools would not overwritten. To me the question is that why system update would require install grub2 even when you had removed it, in an usual case I think it shouldn't, this seems a bug to me. I checked the two packages which requires it 1. patterns-openSUSE-base In factory the grub is moved from Require to Recommends, so I'd assume that it would not be a problem now (I tried my 12.1 beta1 it didn't require grub) 2. bootcycle Do you explicitly install this package ? or it get default installed? If the later case I thought it's much likely a bug, it should be an optional package if I understand it's usage correctly .. In my 12.1 beta1 this package seems to be default installed but I can't make sure. Anyway we should also consider to solve in a direction that the package update shouldn't require mandatory grub2 update if no valid reason it is required .. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c17
--- Comment #17 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c18
--- Comment #18 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=726836
https://bugzilla.novell.com/show_bug.cgi?id=726836#c19
Michael Chang
participants (1)
-
bugzilla_noreply@novell.com