Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GRUB madness.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
JollyRoger
n00b
n00b


Joined: 24 Mar 2006
Posts: 24

PostPosted: Thu Jan 11, 2007 5:27 am    Post subject: GRUB madness. Reply with quote

I'm having a pretty strange problem with GRUB. I just did an emerge -NDu world and installed some new packages. So I reboot my system and instead of GRUB normally working it just prints the word "GRUB". ONLY ONCE!!!! Searching online I could only find cases where GRUB prints "GRUB" infinitely. Mine only prints it once.

I have one SATA hard drive with WinXP and Gentoo installed. NTLDR is installed on the MBR and GRUB is installed on the Gentoo partition. NTLDR works normally and gives me a choice between Gentoo and WinXP. WinXP boots fine. Normally, If I select Gentoo, GRUB will come up and I hit enter to select my main kernel. However, like I said, it now only prints "GRUB" one time.

Here is my grub.conf:

Code:

default 0
timeout 10
splashimage=(hd0,2)/boot/grub/splash.xpm.gz

title=Gentoo Linux 2005.1 Kernel 2.6.17-r4
root(hd0,2)
kernel /boot/vmlinuz root=/dev/sda3 vga=792 video=vesafb:ywrap,mtrr splash=silent,fadein,kdgraphics,theme:Linux fbcon=scrollback:128K quiet CONSOLE=/dev/tty1 idle=halt
initrd /boot/fbsplash-Linux-1024x768


My menu.lst symbolic link points to the right place. I've looked throught the Gentoo GRUB error message guide but I couldn't find anything. I've also tried chrooting into the Gentoo environment from a LiveCD and running grub-install /dev/sda3 (my Gentoo partition) or grub-install --root-directory=/boot /dev/sda3 but I just get the error message: "Could Not Find Device For /boot/boot: Not Found Or Not a Block Device". And yes, I made sure that my /etc/mtab is correct.

Any ideas? Why would this start happening all of a sudden with myself making no changes to Grub?
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Thu Jan 11, 2007 6:34 am    Post subject: Reply with quote

Standard solution:
start a livecd, reinstall grub. dd the boot record of your gentoo partition again and copy it to your windows partition.

Does your windows "see" the linux partitions (do you have a filesystem driver installed)? It seems something has overwritten the bootrecord of your gentoo partition.
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
JollyRoger
n00b
n00b


Joined: 24 Mar 2006
Posts: 24

PostPosted: Thu Jan 11, 2007 7:16 am    Post subject: Reply with quote

I tried your "standard solution" with a live CD. Like I said, I get the following error when I run grub-install:

Code:

Could Not Find Device For /boot/boot: Not Found Or Not a Block Device


The Gentoo Grub Error Guide suggests that I make sure I copied /proc/mounts to /etc/mtab but I did do that.

The command I run is:

Code:

# grub-install --root-directory=/boot /dev/sda3


Where /dev/sda3 is my Gentoo ext3 partition (sda2 being swap space and sda1 being NTFS).

Yes, I can mount the ext3 partition from Windows and read/write files properly with the Windows ext3 driver.
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Thu Jan 11, 2007 7:36 am    Post subject: Reply with quote

do you have a link boot in /boot that links to . (the current directory)?

grubinstall did never work right for me

type in
Code:

grub
root (hd0,2)
setup (hd0,2)
exit

to use the grub shell install method.
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
JollyRoger
n00b
n00b


Joined: 24 Mar 2006
Posts: 24

PostPosted: Thu Jan 11, 2007 5:20 pm    Post subject: Reply with quote

That seems to have worked. I also dd'ed the boot record of the Gentoo Partition into Windows and GRUB now works properly.

Two questions:

1. What's up with grub-install not working? Shouldn't that do the same thing as the grub shell method?

2. I want to find out what caused this. What could possibly do this keeping in mind that I made not changes to GRUB (I did not even run grub)? Since I just updated a whole bunch of new packages I suspect that one of those may have created the problem. Is there a way to see last group of packages that I updated?

Thanks.
Back to top
View user's profile Send private message
dundas
Guru
Guru


Joined: 16 Dec 2004
Posts: 317
Location: China, Earth

PostPosted: Fri Jan 12, 2007 1:50 am    Post subject: Reply with quote

fangorn wrote:
do you have a link boot in /boot that links to . (the current directory)?

grubinstall did never work right for me

type in
Code:

grub
root (hd0,2)
setup (hd0,2)
exit

to use the grub shell install method.



I solved my prob after

I manually copied in the lines from /proc/mounts to /etc/mtab, and emerging the new grub again, and then do the grub root and setup, however
I think the above line for setup should be

setup (hd0)

EDIT: by that I guess it means using grub as the primary boot loader, so don't do it when u need NTloader as the primay

hope that helps
_________________
Appreciate Gentoo: Best Devs, Best Forums. YOU could help too: Help Answer
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum