Recovering SUSE 9.1 Boot Loader

Status
Not open for further replies.

Vishal Gupta

Microsoft MVP
Guys!
There r 3 OS installed in my sys: Win 98, Win XP and SUSE 9.1
If something goes wrong and I reinstall 98 or XP, the Boot Loader of SUSE linux is overwritten and lost.
I want to know how to recover it?
The Red Hat Linux trick to recover its boot loader doesnt work!
Pls tell me the solution.
 

ujjwal

Padawan
Boot into any live cd which supports your hardware and the filesystem used by Suse (preferably, use a rescue disk if you can).

Mount your linux partitions under a certain directory, say /mnt/linux (Note that if you have a different partition for /boot, you will need to mount it under /mnt/linux/boot). Now chroot to /mnt/linux (chroot /mnt/linux) and run grub-install /dev/hda to install GRUB to your MBR.

If you used a suse rescue disk, it would probably mount your linux partitions automatically at a certain locations, probably somewhere and /mnt. All you would need to do is the chroot'ing and the grub-install bit :)

If some partition layout had changed after GRUB was wiped out, you will need to make the necessary adjustments to the file /boot/grub/menu.lst to reflect them.
 
OP
Vishal Gupta

Vishal Gupta

Microsoft MVP
thnx for the tip ujjwal!
But is there no other way to reflect the changes in /boot/grub/menu.lst file automatically?
 
OP
Vishal Gupta

Vishal Gupta

Microsoft MVP
ujjwal!
Can u pls tell me step-by-step method to recover it?
I lost SUSE boot loader after i installed XP again.
Now I hv no recovery floppy disk only hv SUSE setup CD.
Can u pls tell me what should i do now to reinstall the boot loader?
I hv xp installed on C:\drive, 98 installed on D:\ drive and rest for SUSE partitions.
thnx in advance...
 

ujjwal

Padawan
Sorry I cannot give you step by step instructions, as I do not use Suse, but try booting in the Setup CD, and see if you either have a "rescue" mode, or some other mode which will give you a console. If you cannot find this, press CTRL+ALT+F2, and you should get a login prompt. From here, you can try the steps I mentioned in the previous post.
 
OP
Vishal Gupta

Vishal Gupta

Microsoft MVP
Yes!
It shows Rescue mode.
But can u tell me the command to mount the partition?
I mean which partition I hv to mount?

I hv xp installed on C:\drive, 98 installed on D:\ drive and rest for SUSE partitions.

pls.
thnx in advance!
 

ujjwal

Padawan
Post the output of fdisk -p here, that will give an idea of the partitions to mount. I would guess, if there is no seperate /boot partition, and the swap partition lies before the linux partition, the commands you need would be

Code:
mkdir /mnt/linux
mount /dev/hda7 /mnt/linux
chroot /mnt/linux
grub-install /dev/hda

If it does not work replace hda7 with hda6,8,9 and see (ls /mnt/linux) if the layout of /mnt/linux is similiar to the root of your linux partitions.
 
Status
Not open for further replies.
Top Bottom