6

11.1: How to Completely Reinstall Grub & its Stage1&2 Files?

view full story
linux-howto

http://forums.opensuse.org – Due to lack of concentration, I inadvertantly ran PClinux(2009-2)'s "install.sh" while I was in openSuse 11.1. This file says: grub --device-map=/boot/grub/device.map --batch <<EOF root (hd0,6) setup --stage2=/boot/grub/stage2 (hd0,6) quit EOF I soon found out that Suse 11.1 would no longer boot from boot.ini (using bootpart) because the boot process now brings up PCLOS (in /dev/sda6) rather than Suse 11.1 sitting in /dev/sda5. No problem, I thought, I'll boot from the Suse install DVD, use repair, and away I go. Wrong. After grinding, it started mentioning about generating something for sda13, which is my last partition ... NTFS! So I bailed before it got too far. I even tried "rescue" option on the DVD, command prompt, and grub commands to reinstall via "setup .....". No luck. Then I tried to use Super Grub Disk (.97xx) to reinstall the PBR, stage 1 and stage 2 loaders. Didn't change a thing. So then I used Grub4DOS and got into my Suse 11.1 installation using this in its menu.lst: title openSUSE 11.1 - 2.6.27.45-0.1 root (hd0,5) kernel /boot/vmlinuz initrd /boot/initrd ... as opposed to 11.1's menu.lst which says (just the pertinent part): title openSUSE 11.1 - 2.6.27.45-0.1 root (hd0,5) kernel /boot/vmlinuz-2.6.27.45-0.1-pae root=/dev/disk/by-id/ata-WDC_WD3200AAKS-00VYA0_WD-WCARW0763312-part6 resume=/dev/disk/by-id/ata-WDC_WD3200AAKS-00VYA0_WD-WCARW0763312-part11 splash=silent showopts vga=0x375 initrd /boot/initrd-2.6.27.45-0.1-pae Worked fine, and is now my (only) method of booting to 11.1. So obviously it's bypassing stage 1 and 2 files, using it's native Grub4DOS code. But then I tried Yast-Bootloader to reinstall Grub's files. No difference. Then I used the advanced part to "write bootloader code to disk" No difference. Even tried "propose a new boot scheme" (or whatnot) ... no difference. After looking at all this, I've come to the conclusion that the PBR code in sda5 is scraunched, and/or stage 1 code (although it's still the original date), or stage 2 (which definitely had a new timestamp of when I committed the fatal error by executing PCLOS's "install.sh". So my question is this: How do I do a good COMPLETE re-install of Suse's version of the grub files? Because, for sure, grub commands like "setup --stage2=/boot/grub/stage2 (hd0,5), and variations thereof, certainly aren't doing it? My reasoning is that I should make sure that all the boot files get restored/confirmed as "originally installed by Suse". TIA. (Distributions)