|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Install/Boot/Login Questions about installation, login, boot issues, partitioning, file systems, software that runs at boot (GRUB, LILO, boot scripts) |
![]() |
|
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello,
I'm going to reinstall the Windows partition for testing purposes. It will of course overwrite GRUB. How do I get it back in openSuse? In Debian I'd do "dpkg-reconfigure grub", in Gentoo I'd simply re-emerge it. What's the openSuse way of doing this? I don't want to download the whole installation DVD just to repair GRUB, I'm going to boot Gentoo CD, chroot and then repair it from within. Will just grub-install do? Or is there any "better" way, like something in Yast? Thanks in advance! |
|
|||
|
The best thing would be to download supergrub before installing windows:
Super Grub Disk Homepage and burn it to a CD. That will later restore your grub. HTH Lenwolf |
|
|||
|
Also look at the comprehensive tutorial at:
HowTo Boot into openSUSE when it won't Boot from the Grub Code on the Hard Drive Lenwolf |
|
|||
|
Thank you for your replies!
Quote:
Quote:
. I always keep Gentoo netinst CD handy, it's very useful. SystemRescue CD is based on it IIRC. Anyway, I usually need it only only to chroot into unbootable system.I'll just try a shot in the dark: reinstall Windoze and then "grub-install /dev/sda" in chrooted openSuse. It works in Gentoo, so why shouldn't it here, after all . Debian's "dpkg-reconfigure grub" does more or less the same. It will (should) install GRUB into MBR, while it's in root now, but what the heck, it should just work. Then I'll try to uninstall and re-install GRUB with Yast if the first didn't help, but I believe it will be just fine. I only fear that Yast won't like what I did and it will not find GRUB after I install it manually, let's hope it won't cause problems (it seems to me that Yast usually adds work and complicates things, but I admit that I don't understand it very well ).I'll keep you informed .EDIT (new post appeared before I finished this one): Quote:
Last edited by tadeas_moravec; 30-Sep-2009 at 01:59. Reason: new post appeared before I finished this one |
|
|||
|
Quote:
After you reinstall Windows, you just need to run a grub shell as root from anywhere, typically a live CD. Then type two commands: grub> root (hd0,x) - where x refers to the SuSE partition (probably 1 if Windows is at 0 - grub counts from 0) grub> setup (hd0) grub> quit That ought to reinstate the grub in your MBR. (you can confirm the address of the SuSE partition by using the grub command 'find /boot/vmlinuz') What is going on is that when you originally installed SuSE alongside Windows, SuSE created a GRUB menu at /boot/grub/menu.lst. This file defines the Grub OS selections. This menu should still be ok even if you reinstall Windows. When you execute the grub setup command it reinstalls the bootloader based on the menu.lst. If your HD is not the first HD in the bios boot sequence it gets more complicated. Let's leave that on the assumption that this is not your situation. See also (somewhat helpful): GNU GRUB Manual 0.97
__________________
OS: Linux 2.6.27.29-0.1-default x86_64 System: openSUSE 11.1 (x86_64) KDE: 4.1.3 (KDE 4.1.3) "release 4.10.4" |
|
|||
|
Quote:
So if your wife were to reinstall Windows I reckon you'd lose your GRUB and you wouldn't be able to access SuSE in the second partition. See also: Master boot record - Wikipedia, the free encyclopedia
__________________
OS: Linux 2.6.27.29-0.1-default x86_64 System: openSUSE 11.1 (x86_64) KDE: 4.1.3 (KDE 4.1.3) "release 4.10.4" |
|
|||
|
For the record
I imagine that to recover an overwritten GRUB you can use any live linux CD or USB. So you could probably use a Knoppix live CD or fedora USB stick to run linux, then open a command terminal, become root and run grub. IOW I don't think you need to use a SuSE grub to fix your SuSE bootloader because the grub instructions are contained in menu.lst in your SuSE /boot/grub directory.
__________________
OS: Linux 2.6.27.29-0.1-default x86_64 System: openSUSE 11.1 (x86_64) KDE: 4.1.3 (KDE 4.1.3) "release 4.10.4" |
|
||||
|
Quote:
Given the many recovery boot CDs I have, I'm not worried, and it should be a good learning experience to see what happens when I try different things. Edit - for educational purposes (ie educate myself) the 1st thing I will try is simply change the active partition from /dev/sda1 to /dev/sda2. |
|
|||
|
Quote:
Quote:
This explains why, when you change the active flag, that Windows' bootloader starts up and you don't see a GRUB menu. In the case of a dual boot system where Windows is on hd0 and SuSE is on hd1 and the system boots off hd0 the GRUB bootloader must replace the Windows bootloader on hd0. In this case, if Windows is reinstalled the GRUB bootloader gets overwritten. If all this is true, then for a dual-boot off the same HD, all one needs to do is reset the active partition to the SuSE one after a Windows repair/reinstall. But for a dual boot off different HDs where the Windows HD is the first boot device, one must reinstall the grub bootloader. This makes this configuration a pest and I think it should be avoided. The better approach is to make the SuSE HD the first boot device, have the GRUB bootloader on the SuSE HD and not touch the Windows HD at all.
__________________
OS: Linux 2.6.27.29-0.1-default x86_64 System: openSUSE 11.1 (x86_64) KDE: 4.1.3 (KDE 4.1.3) "release 4.10.4" |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|