LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GRUB reinstall (https://www.linuxquestions.org/questions/linux-newbie-8/grub-reinstall-857477/)

LQ zunkie 01-20-2011 05:06 AM

GRUB reinstall
 
Hi,

I have Linux Mint 10 Julia installed in my laptop, and now I'd like to install XP.
But that will surely overwrite the MBR causing the deletion of GRUB .

So how to reinstall the GRUB after that? can I use the live CD in order to do that?

EricTRA 01-20-2011 05:11 AM

Hello,

In few words, yes you can.

A bit more in detail. Normally if you installed it the other way around (first Windoze and then Linux) you wouldn't need to be afraid for this. Have a look at this site, it shows you one possible solution:
http://www.howtogeek.com/howto/ubunt...-wipes-it-out/
It's for Ubuntu but should work in your case too.

Kind regards,

Eric

LQ zunkie 01-20-2011 05:25 AM

Quote:

Originally Posted by EricTRA (Post 4231334)
Hello,

In few words, yes you can.

A bit more in detail. Normally if you installed it the other way around (first Windoze and then Linux) you wouldn't need to be afraid for this. Have a look at this site, it shows you one possible solution:
http://www.howtogeek.com/howto/ubunt...-wipes-it-out/
It's for Ubuntu but should work in your case too.

Kind regards,

Eric

I already googled and saw this kind of content to reinstall GRUB, but I couldn't find the menu.lst file in my system, so I'm afraid thats not gonna work. Any other idea?

I don't wanted windows in my system thats why din't install it in the first place, but now I need to run an old TV tuner which works only with Windows

I tried using WINE, tvtime, metv but those din't help, then I tried to run with Virtual box which worked good to some extent, i was able to run the software and install the driver but the video I'm getting now is not coming frequently, the frame rates are inconsistent. I guess its due to the delay in the interaction between hardware and guest system kernel.
And I have doubts that using any other virtualization s/w won't solve that problem, or will it? :O

So I thought of installing windows again (The last thing I wanted).

syg00 01-20-2011 05:53 AM

Quote:

Originally Posted by LQ zunkie (Post 4231351)
I already googled and saw this kind of content to reinstall GRUB, but I couldn't find the menu.lst file in my system, so I'm afraid thats not gonna work. Any other idea?

That's because you're using grub2 rather than the original grub.
Have a read of this.

sanjaydelhi 01-20-2011 06:08 AM

I had gone through similar problem.

I tried following two solutions(grub4dos).

http://ubuntuguide.net/how-to-restor...ws-xpvistawin7

http://members.iinet.net.au/~herman546/p9.html

But unfortunately it did not work for me.

I got following error.


Error 15: File not found

Aquarius_Girl 01-20-2011 07:16 AM

Quote:

Originally Posted by LQ zunkie (Post 4231351)
but I couldn't find the menu.lst file in my system, so I'm afraid thats not gonna work. Any other idea?

menu.lst is not present in Mint, but after installing Windows I think you can insert a Mint live CD and then run the command
Code:

grub-install /dev/sdaX
This command is bound to work, I have tried it here: http://www.linuxquestions.org/questi...ectory-837603/

Hope it helps.

bryanl 01-20-2011 12:10 PM

One addition to Anisha's example for GRUB2: mount the root partition of the Linux system as, say, /mnt/newroot from the Live CD system. Then /mnt/newroot/boot will have the existing grub stuff and /mnt/newroot/etc should have the fstab which you can check to make sure the UUID's match to mount the proper partitions for your linux system. Once that is set, then

Code:

grub-install --root-directory=/mnt/newroot /dev/sdx
where sdx is the device you want to install GRUB2 to.

That should get you back to booting the Linux OS. Once you get there, you can run

Code:

grub-update
to get the boot menu updated with the XP system.

If you install GRUB2 and it doesn't boot your linux system, you can get to GRUB2's command prompt, locate the linux partition, and then boot it. Once you have that linux partition running, the grub-update should get the menu fixed.

LQ zunkie 01-21-2011 02:11 AM

Thanks everyone, I have not tried this yet but I will and let you know the result.
And I managed to find this in Mint tutorial :)
BTW, I have separate /boot partition on sda5 so I guess the commands given by you guys should be implemented on that partition only, not in the / partition?

Aquarius_Girl 01-21-2011 02:13 AM

Please have a careful look at the thread I have pointed in post 6

LQ zunkie 01-21-2011 02:32 AM

Quote:

Originally Posted by Anisha Kaul (Post 4232622)
Please have a careful look at the thread I have pointed in post 6

I read that already, I will surely run update-grub once I am able to reinstall the GRUB and boot in to Mint successfully, hope that will detect the windows partition and reflect in the GRUB menu.
And I am not planiing to install any new distro, so that won't happen unlike your case.


All times are GMT -5. The time now is 06:23 AM.