LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Another Problem with GRUB bootloader in Ububtu/XP (https://www.linuxquestions.org/questions/linux-newbie-8/another-problem-with-grub-bootloader-in-ububtu-xp-785761/)

msbstar 01-30-2010 02:30 AM

Another Problem with GRUB bootloader in Ububtu/XP
 
Hello Everybody,

I have Ubuntu 9.10 and Windows XP installed on my laptop.
Every thing was OK, until yesterday, when I turn on my
laptop I got a black screen with the word "GRUB" on it and
nothing else happens.

I used the instruction below:

http://www.dedoimedo.com/computers/g...mozTocId842078

But it COULD bring back the GRUB menu, BUT in that menu there
is only options for Ubuntu and NO option for Windows XP to select.

By the way I encountered the same problem 2 weeks ago and the
above instruction could bring back the GRUB menu together
with Win XP and Ubuntu.

I do not know why it does not work now!!!

I would be so grateful if anyone could help me in this matter.


With best regards,
Hassan

sohail0399 01-30-2010 02:45 AM

did you reinstall the GRUB?

to remove the fault.

msbstar 01-30-2010 03:00 AM

Dear Sohail,

I followed that instruction I mentioned above
for several times but all of them gives back
ONLY the Ubuntu NOT the Windows XP.

Still need Help!!!!

Thanks.
Hassan

r3sistance 01-30-2010 03:33 AM

Hi,

You need to edit either /boot/grub/menu.lst or /boot/grub/grub.conf and add the following

title Windows
rootnoverify(hd0,0)
chainloader +1

Rootnoverify may need to be redirected to another hard-drive/partition depending on your set-up (hd<disc>, <partition>)

ZenDJiNN 01-30-2010 04:47 AM

Grub 2 Re-install from LiveCD
 
Quote:

Originally Posted by msbstar (Post 3845728)
Hello Everybody,

I have Ubuntu 9.10 and Windows XP installed on my laptop.
Every thing was OK, until yesterday, when I turn on my
laptop I got a black screen with the word "GRUB" on it and
nothing else happens.

I've had the same problem several times, especially when adding new distros etc..... This page always gets me out of trouble, so much so that i don't even worry when it happens anymore. :) It's a very simple process, and doesn't take long, hopefully it'll get you back up & running as well.

Btw, the first time this happened to me, i tried many other things first (Repairing MBR etc) none of which worked.... but this worked first time i tried it, and has worked everytime since.

Have fun.... Grub2 is way better than Grub Legacy.... it just takes some getting used to. :)

Cheers.....

ZenDJiNN 01-30-2010 04:48 AM

Quote:

Originally Posted by r3sistance (Post 3845772)
Hi,

You need to edit either /boot/grub/menu.lst or /boot/grub/grub.conf and add the following

title Windows
rootnoverify(hd0,0)
chainloader +1

Rootnoverify may need to be redirected to another hard-drive/partition depending on your set-up (hd<disc>, <partition>)

He's using Grub 2, so the above doesn't apply anymore. That's only for the old Grub. :)

msbstar 01-30-2010 05:06 AM

Dear ZenDJiNN,

Thanks for your reply.

I do not have internet connection on my Ubuntu.
Is it possible to do what you said above whitout
having internet connection?

Best regards. Hassan

ZenDJiNN 01-30-2010 09:03 AM

Quote:

Originally Posted by msbstar (Post 3845861)
Dear ZenDJiNN,

Thanks for your reply.

I do not have internet connection on my Ubuntu.
Is it possible to do what you said above whitout
having internet connection?

Best regards. Hassan

Hi Hassan, :)

It will be if you print out the following first.... :D

Code:

Reinstalling from LiveCD

If you cannot boot from GRUB 2 review the section Boot Problems & Rescue Mode. If a reinstall becomes necessary follow these instructions. Two methods are presented; both require booting from a LiveCD (Ubuntu 9.10, Karmic Koala or later version). If the first method does not work, follow the second method, which is more complex and contains more options and instructions.

SIMPLEST - Copy GRUB 2 Files from the LiveCD

This is a quick and simple method of restoring a broken system's GRUB 2 files. The terminal is used for entering commands and the user must know the device name/partition of the installed system (sda1, sdb5, etc). The problem partition is located and mounted from the LiveCD. The files are then copied from the LiveCD libraries to the proper locations and MBR. It requires the least steps and fewer command line entries than the following methods.

  1. Boot to the LiveCD Desktop (Ubuntu 9.10 or later).
  2. Open a terminal by selecting Applications, Accessories, Terminal from the menu bar.
  3.  Determine the partition with the Ubuntu installation. The fdisk option "-l" is a lowercase "L".
        1. sudo fdisk -l

            If the user isn't sure of the partition, look for one of the appropriate size or formatting.

            Running sudo blkid may provide more information to help locate the proper partition, especially if the partitions are labeled. The device/drive is designated by sdX, with X being the device designation. sda is the first device, sdb is the second, etc. For most users the MBR will be installed to sda, the first drive on their system. The partition is designated by the Y. The first partition is 1, the second is 2. Note the devices and partitions are counted differently.

  4. Mount the partition containing the Ubuntu installation.

      sudo mount /dev/sdXY /mnt

      Example: sudo mount /dev/sda1 Note: If the user has a separate /boot partition, this must be mounted to /mnt/boot
 
  5. Run the grub-install command as described below. This will reinstall the GRUB 2 files on the mounted partition to the proper location and to the MBR of the designated device.

      sudo grub-install --root-directory=/mnt/ /dev/sdX

      Example: sudo grub-install --root-directory=/mnt/ /dev/sda
 
  6. Reboot
  7. Refresh the GRUB 2 menu with sudo update-grub

Of course you could just go to the 1st link i provided & print out the whole page, but in this instance it's only the above that you need and will save you paper & ink in the process! LOL!

Let me know how it goes if you get a chance? Oh, and no, once you've printed the above out, you won't need Net access to go through the steps above. You will need your Ubuntu 9.10 Live CD though, so make sure you have that to hand.

Have fun. :)

ZenDJiNN

msbstar 01-30-2010 09:34 AM

Dear ZenDJiNN,

Thanks for your help.


All times are GMT -5. The time now is 02:49 PM.