Like, I expect, many people, I dual boot Windows and OpenSUSE. Windows has once again irrecoverably failed on me (a c000021a error, if you’re interested) and I’m getting ready to reinstall again. Maybe the third time this year that that’s happened, but that’s beside the point. The point is that my SUSE install is still perfectly fine, but when I reinstall Windows it’s going to write over the SUSE bootloader and the easiest way to get that back is to reinstall SUSE. This is inconvenient, so I was thinkin’ it’d be nice if there were a recovery option on the SUSE disc that would let me just install the bootloader on a machine with the OS already present. This also comes up when I install other Linux distros - they’re polite enough to still let me boot in to SUSE, but, you know, I miss the nice green background.
I have my home directory in a separate partition so when I reinstall SUSE it isn’t a huge problem, but there are some configurational chores that I have to go through every time I do it and I’d rather avoid the headache.
Hi
Create an extended partition for the openSUSE install and then set it
to use that and let windows have the MBR and chainloading.
I have windows, SLED 11 SP2 Beta, openSUSE 11.4 and my blackbox setup
and openSUSE 12.1 RC1. SLED controls the main boot and the other two
openSUSE installs boot from their own separate boot partitions. I can
re-install any of those 4 systems without any re-install of the others.
If your windows install is not touching the linux partitions, then there is no need to reinstall.
If you are booting from grub in the MBR, then just save a copy of the MBR before you do the Windows install. Perhaps save it to a USB flash drive. Then, when ready, boot linux from a live CD or a rescue disk and restore the MBR from your saved copy.
To backup the MBR: cd to the directory on the flash drive where you want to save it.
Then:
dd if=/dev/sda of=MBR count=1
Later, to restore the MBR, first cd to the flash drive directory containing your saved copy.
Then:
dd if=MBR of=/dev/sda bs=440 count=1
The “bs=440” ensures that you don’t overwrite the partition table. Rather, you just write back the boot code for grub. Some people recommend also using “bs=440” on the command to save the MBR, as a double protection against user error.
And, note, if your hard drive is not “/dev/sda”, then you will need to modify the above commands.
On 2011-10-25 02:06, shmuck wrote:
> so I was thinkin’ it’d be nice if there were a recovery option on the
> SUSE disc that would let me just install the bootloader on a machine
> with the OS already present.
There is super grub.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
Just to update, since ya’ll were so helpful: I wound up going with nrickert’s solution and it worked perfectly. So thanks. I’ll explore my partitioning options next time I start from scratch, but for now this was easiest.
I still think that, as a feature request, some kind of recovery something-or-other on the DVD would be a good idea for jerks like me.
On 2011-10-27 05:56, shmuck wrote:
> I still think that, as a feature request, some kind of recovery
> something-or-other on the DVD would be a good idea for jerks like me.
The feature was removed two versions ago. There is the supergrub iso cd
which is useful for these situations.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
>
> Yes this is correct. It was removed.
> And I agree, supergrubdisk is very handy. I keep one ready too.
>
>
Caf is there a link to the supergrubdisk repo? I went to their website but
only found the version that uses grub2.
Really? The rescue feature of the DVD doesn’t include a repair bootloader option anymore? I haven’t noticed because I have never had to repair my Linux install (touch wood but also praised be Linux), and on my dual boot laptop which came with XP, I really really don’t want to reinstall Windows; I would have to apply 1 or 2 SPs involving 219 updates consuming 795MB download data and reboot 47 times. Maybe not those numbers, but you get the idea. >:)
I have an old CD I could image
But the point is I think, you should be able to boot practically anything you have installed with it.
If it’s openSUSE, you’d do that and then use a terminal to re-install grub.
On 2011-10-27 21:56, ken yap wrote:
>
> caf4926;2397808 Wrote:
>> Yes this is correct. It was removed.
>
> Really? The rescue feature of the DVD doesn’t include a repair
> bootloader option anymore?
The rescue features were all removed, completely. We have the “rescue
system”, which is really a mini text live Linux with which you can do
things, manually.
The old rescue, automatic and graphic, was removed completely. It had bad
problems and no maintenance.
> updates consuming 795MB download data and reboot 47 times. Maybe not
> those numbers, but you get the idea.
I do. Best thing for Windows repair is to keep backup images, from the
Linux side.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)