How to reaload GRUB after Windows XP re-installation?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to reaload GRUB after Windows XP re-installation?
Hello all,
I was having windows XP and Fedora Core 1 installed and working properly with GRUB bootloader. Recently I had to reinstall windows. After that the boot loader disappeared. Now when I boot it directly goes to windows XP. What should I do to get the bootloader back without harming both OS?
Thank you..
take your boot-disk/floppy and boot your system with that - then reinstall grub (run the command to write the boot information to disk as you did the first time)
and you are all set again - Windows does this each time you install it - you cannot do anything about that - except: having a boot disk/floppy!
...I suppose, you do not have eigther one? (surely during install you where given the opportunity to create one)
This procedure from masand could work - I do not know, if you can boot your system up by using the Install-CD or if you are booting a rescue system when you are using you CD
Depending on what is the case - it could work. But I would make sure!
If it is a rescue-system:
type "mount" to see if and where _your_ system is mounted - I suppose it is not mounted - and for sure not by typing "chroot ..." !
if it was not mounted - mount it i.e on /mnt/rescue
mount /dev/hda? /mnt/rescue
chroot /mnt/rescue
/usr/bin/env -i HOME=/root PATH=/bin:/usr/bin:/sbin:/usr/sbin
--> to chean the environment and set a path
bash --login
--> to read the environment from _your_ system
grub-install /dev/hda
exit --> log out of bash
exit --> get out of chroot
reboot
If it brings you to your normal system - skip the chroot and only do:
grub-install /dev/hda
all is assuming that your system is on /dev/hda? (the first disk on primary controller) and the ? is the partition-number where your / partition is
Oh! It seems a little bit complicated... Ya, I'll try to understand it and do...May be an experimentation.....
Thank you for your help. I'll let you know the status.
hi there
the procedure i was talking about
it works
i have treied it many a times
also the chroot thing
it is specified when we go into the 'linux rescue'
mode from the 1st CD
that we need to run the chroot command
then at the prompt we need to run lilo or grub,whatever required
IF the 1st CD does start a rescue-system - and IF the original system (I mean the / partition of the linux-system which can't be booted) is really automatically - and without giving any further commands - mounted on /mnt/sysimage - THEN it will (probably) work.
Since I don't have that CD - I was making sure it would work anyway - and with ANY other rescue-system - too (like a Knoppix-CD for instance...)
But thank you - I'm using lilo and the instructions I gave here, where written for the use of lilo. I took the command you gave (grub-install /dev/hda) and put it where I would have written "lilo -v"
I do not use grub and do not know, how to install it - I just trusted you, that this command would be correct.
Distribution: Knoppix, Kubuntu, Gnoppix, Slax, Windows 98 & XP
Posts: 54
Rep:
Had the same prob. But its no prob!Just get a win98 boot disk and wait until you can type fdisk/mbr. Nothing will appear just restart the system and you back on!Don't have a win98 boot disk? Download one off the internet on another computer bys searching google. Don't have another comp, than i can't help you
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.