Bug 116800 - Installing grub rpm kills lilo
Summary: Installing grub rpm kills lilo
Status: VERIFIED INVALID
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: RC 1
Hardware: x86 Linux
: P5 - None : Normal
Target Milestone: ---
Assignee: Torsten Duwe
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-13 15:54 UTC by Jan Engelhardt
Modified: 2007-09-27 15:50 UTC (History)
0 users

See Also:
Found By: Beta-Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Engelhardt 2005-09-13 15:54:18 UTC
When I installed grub.rpm for fun, it killed the MBR and put GRUB into it.
That's definitely not what I wanted.
Comment 1 Dr. Werner Fink 2005-09-13 16:13:16 UTC
AFAIS the spec file does nothing with the MBR.
Comment 2 Jan Engelhardt 2005-09-13 17:20:55 UTC
"Oh really? Impressive." :)

Check this:

19:19 shanghai:~ # rpm -Uhv grub-0.96-5.i586.rpm
Preparing...                ########################################### [100%]
   1:grub                   ########################################### [100%]
0+1 records in
0+1 records out
100948 bytes (101 kB) copied, 0.000838 seconds, 120 MB/s
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

(To answer: probably a backup of the old MBR, because grub is writing itself in
there now.)

And `rpm -qp --scripts grub-0.96-5.i586.rpm` also returns a lot, esp.

  In %postinstall:
  /usr/sbin/grub --batch < /etc/grub.conf

cat /etc/grub.conf:

  19:22 shanghai:~ # cat /etc/grub.conf 
  root (hd0,0)
  install --stage2=/boot/grub/stage2 /boot/grub/stage1 d (hd0) /boot/grub/stage2
0x8000 (hd0,0)/boot/grub/menu.lst
  quit

Q.E.D.
Comment 3 Torsten Duwe 2005-09-15 00:52:47 UTC
Do not draw premature conclusions. Hint: rpm -q --scripts ... 
 
Maybe you're actually using blocks belonging to deleted files? 
 
Will investigate next week when I'm back from brainshare. 
Comment 4 Torsten Duwe 2005-09-19 10:24:24 UTC
Indeed. If there's a grub configuration, and grub is updated, it will install 
itself using the former. This is the easiest and most robust way to determine 
whether the user has opted for grub or lilo; it's not a bug, it's a feature. 
If you don't like it, move grub.conf aside (where did it come from, anyways?). 
Comment 5 Jan Engelhardt 2005-09-19 18:02:11 UTC
It came from the SUSE default install, and was leftover by the time I did 'rpm
-e grub; rpm -Uhv lilo.rpm'. So in fact, I did not update grub (in which case
this would have been ok), but a _new install_. AFAI know, rpm is intelligent
enough to distinguish a %postinstall and %postupdate (whatever it's called), so
I suggest placing it in the correct section.