LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-29-2009, 05:33 PM   #1
Cichlid
Member
 
Registered: Jan 2002
Location: Montreal
Distribution: Ubuntu 8.10
Posts: 178

Rep: Reputation: 30
Grub not installing


Hi All,

Long story and I hope the history will help.
I was running Ubuntu 8.04 and Windows 2000 on the same HDD. I also have a separate partition for misc linux files (pictures mainly).

Using GParted, I moved and shrunk /dev/sda3 and moved and grew /dev/sda2 (windows). /dev/sda1 is my root. /dev/sda4 is my swap.

I then went an install windows xp over win2K. Of course windows would boot OK. I d/l Ubuntu 9.04 Live CD to install grub. I followed the directions found on the Ubuntu forum and other sources on the Web.

Whenever I though I had install grub, I would reboot, get the splashscreen for my Compaq presario R3000 and be left with a dim flashing cursor, then a regular bright cursor. Grub never loads.

So, I go back to the live CD and try to install again using alternate methods. When I check the /boot/grub/menu.lst file, it is never at the current date.

Finally, I came across the instructions here :https://help.ubuntu.com/community/Re...tallingWindows. Under the title: Overwriting the Windows bootloader. I would mount /mnt/root and /mnt/root/boot. I would check my files to make sure I mounted the correct directory. What I found interesting was to view the contents of /mnt/root/boot. I would have to browsed (in the terminal) to /mnt/root/boot/boot. ???

When I run the grub-install command, it does follow /root/boot/boot.

So, why do I have boot twice. If I open Nautilus, I only have /boot/grub (they way it should be right). If this is just something weird that happens when mounting from a live CD, how do I tell grub-install to look in /root/boot/boot????


Thank you all.


Additional info:

Below you can see the steps that I've taken. Very standard isn't it.
Well, when I browse to /boot/grub/menu.lst the file was still not created today? and grub will still not start at boot time???


ubuntu@ubuntu:~$ sudo grub
Probing devices to guess BIOS drives. This may take a long time.

[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> find /grub/stage1
find /grub/stage1
(hd0,0)
grub> root (hd0,0)
root (hd0,0)
grub> setup (hd0)
setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.
grub> quit
quit


Please let me know if you need further information.

Last edited by Cichlid; 05-29-2009 at 07:33 PM. Reason: Steps taken to install grub.
 
Old 05-30-2009, 09:17 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware, Ubuntu
Posts: 9,977

Rep: Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329
I would suggest your run the command: sudo fdisk -l, compare the output to that of the geometry (hd0) command run from the Grub prompt. If you moved and resized partitions the numbering may have changed.
 
Old 05-30-2009, 04:20 PM   #3
Cichlid
Member
 
Registered: Jan 2002
Location: Montreal
Distribution: Ubuntu 8.10
Posts: 178

Original Poster
Rep: Reputation: 30
Hmmm, both are the same.
I'll keep plugging away.
 
Old 05-31-2009, 09:29 AM   #4
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 218

Rep: Reputation: 46
Quote:
Originally Posted by Cichlid View Post
Hi All,


Finally, I came across the instructions here :https://help.ubuntu.com/community/Re...tallingWindows. Under the title: Overwriting the Windows bootloader. I would mount /mnt/root and /mnt/root/boot. I would check my files to make sure I mounted the correct directory. What I found interesting was to view the contents of /mnt/root/boot. I would have to browsed (in the terminal) to /mnt/root/boot/boot. ???

When I run the grub-install command, it does follow /root/boot/boot.

So, why do I have boot twice. If I open Nautilus, I only have /boot/grub (they way it should be right). If this is just something weird that happens when mounting from a live CD, how do I tell grub-install to look in /root/boot/boot????
I don't think you should mount /mnt/root/boot. That is only if you have a separate boot partition which you do not mention having. In your case the boot directory is on your root partition which you say is /dev/sda1. So according to the directions on that page you should:

Code:
mkdir /mnt/root
mount /dev/sda1 /mnt/root
I left off the '-t ext3' part, because it shouldn't be needed.

Code:
ls /mnt/root/boot
That should show you some files that look like kernel and System map and also a grub directory.

Code:
sudo grub-install --root-directory=/mnt/root /dev/sda
That is the command that is supposed to install grub for you in the MBR. Now, the problem I'm thinking you may have is that you have 8.04 installed and are using 9.04 disk to install grub. There is a newer version of grub in 9.04 I think and I think this may be a problem since your grub menu.lst, etc. was created with the older version and may not be compatible with the version of grub being installed in the MBR. I do not know. You may want to get the live cd for 8.04 to do this job if you still have problems.

Last edited by ajlewis2; 05-31-2009 at 09:31 AM. Reason: There are other files besides the menu.lst in /boot/grub
 
Old 05-31-2009, 11:25 AM   #5
Cichlid
Member
 
Registered: Jan 2002
Location: Montreal
Distribution: Ubuntu 8.10
Posts: 178

Original Poster
Rep: Reputation: 30
Thanks Everyone for your suggestions. The system is back up and booting.

I had to change the boot flag back to the windows partition. Then I booted into recovery mode through the windows CD. At the prompt I typed "fixmbr"
Windows was then able to boot.
I searched on how to install GRUB through windows and followed the directions.
At the GRUB prompt I was able to enter the standard commands or root and setup.
BAM everything works again.

Thanks All
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing XP using grub kennybob Linux - General 2 03-11-2007 07:05 PM
installing GRUB 2, grub-install problem r00tb33r Linux - Software 1 02-26-2007 09:42 PM
Why grub prompt after installing Grub inder Debian woody 3.0r2? velan Debian 1 04-20-2004 04:55 AM
installing GRUB Interceptor Linux - Newbie 4 07-31-2003 11:20 AM
Installing Grub dark_light Linux - General 2 10-09-2002 07:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration