Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub troubles - I lost my Linux entry?!?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
MB[dk]
n00b
n00b


Joined: 15 May 2003
Posts: 23
Location: Aalborg, Denmark

PostPosted: Thu Jan 08, 2004 11:50 am    Post subject: Grub troubles - I lost my Linux entry?!? Reply with quote

Hello, I just did a stage 2 install, and after configuring grub, i rebooted(dual boot), and it told me, that I had to put the kernel before initrd! Ok then, i booted from the cd, and rearranged the entries. Now, when I boot, my Linux entry is gone! The only choice is Windows XP!

Quote:

title=Genkernel 2.4.22
root (hd0,0)
kernel (hd0,0)/boot/kernel-2.4.22-gentoo-r3 root=/dev/hdc3
initrd (hd0,0)/boot/initrd-2.4.22-gentoo-r3


Any ideas?
Back to top
View user's profile Send private message
Janvw
n00b
n00b


Joined: 08 Jan 2004
Posts: 4
Location: Antwerp, Belgium

PostPosted: Thu Jan 08, 2004 12:22 pm    Post subject: Reply with quote

Hey

Try to folowing:

kernel (hd0,0)/kernel-2.4.22-gentoo-r3 root=/dev/hdc3
initrd (hd0,0)/initrd-2.4.22-gentoo-r3

If it won't work post /boot/grub/grub.conf

Jan
Back to top
View user's profile Send private message
nE0
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2002
Posts: 146
Location: The Netherlands, Breda

PostPosted: Thu Jan 08, 2004 12:50 pm    Post subject: Reply with quote

Janvw wrote:
Hey

Try to folowing:

kernel (hd0,0)/kernel-2.4.22-gentoo-r3 root=/dev/hdc3
initrd (hd0,0)/initrd-2.4.22-gentoo-r3

If it won't work post /boot/grub/grub.conf

Jan

Looks to me, that he is missing the complete section for his linux boot.
Only the section for Windows is still there.

@TopicStarter: Alas, but you can boot the live CD and try again, and again, and again.. Try to do that with Windows ;)
_________________
All things considerring! I'm considerring to...never mind!
Back to top
View user's profile Send private message
Arasi
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jan 2004
Posts: 75
Location: Canada

PostPosted: Thu Jan 08, 2004 1:45 pm    Post subject: Reply with quote

Quote:
Alas, but you can boot the live CD and try again, and again, and again.. Try to do that with Windows


So true :)

Quote:
If it won't work post /boot/grub/grub.conf


Acutally just post it first before you try anything and that will go a long way to helping you :)

And include a listing of your devices/partitions in use.

Arasi
Back to top
View user's profile Send private message
MB[dk]
n00b
n00b


Joined: 15 May 2003
Posts: 23
Location: Aalborg, Denmark

PostPosted: Thu Jan 08, 2004 2:05 pm    Post subject: Reply with quote

This is my grub.conf

Quote:

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


title=Genkernel 2.4.22
root(hd0,1)
kernel(hd0,1)/boot/kernel-2.4.22-gentoo-r3 root=/dev/hdc3
initrd(hd0,1)/boot/initrd-2.4.22-gentoo-r3


title=Windows XP
root(hd0,0)
chainloader (hd0,0)+1


Partitions:
hdc1: NTFS
hdc2: /boot (ext3)
hdc3: / (reiserfs)
hdc4: some weird MS partition
hdc5: swap
Back to top
View user's profile Send private message
MB[dk]
n00b
n00b


Joined: 15 May 2003
Posts: 23
Location: Aalborg, Denmark

PostPosted: Thu Jan 08, 2004 2:09 pm    Post subject: Reply with quote

Arasi wrote:
Quote:
Alas, but you can boot the live CD and try again, and again, and again.. Try to do that with Windows


So true :)



Easy! Boot from cd, go into repair mode, and use "fixmbr".

Much easier than Linux, won't you say?
Back to top
View user's profile Send private message
mrchuckles
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2002
Posts: 125
Location: Severn, MD

PostPosted: Thu Jan 08, 2004 2:22 pm    Post subject: Reply with quote

MB[dk]:

Since /boot is on its own partition, your lines should look like this...

kernel(hd0,1)/kernel-2.4.22-gentoo-r3 root=/dev/hdc3
initrd(hd0,1)/initrd-2.4.22-gentoo-r3

Also, you can edit the boot lines right from the Grub prompt (although these changes are temporary). This should allow you boot into your live install, then make the changes permanent in your grub.conf file (remember to mount /boot to edit).
Back to top
View user's profile Send private message
Arasi
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jan 2004
Posts: 75
Location: Canada

PostPosted: Thu Jan 08, 2004 2:38 pm    Post subject: Reply with quote

Quote:

Easy! Boot from cd, go into repair mode, and use "fixmbr".

Much easier than Linux, won't you say?


Ahh yes that is easy enough if you have Windows XP, or 2003, otherwise its not, and then linux becomes universally much easier since the steps to do something does not change as a marketing ploy to sell new software :lol: :lol: As well it has been known to kill the mbr and not fix it...so while its there we often recommend you not to race off and just do it as an early repair option.

Anyway, there are many other things about the install where you can resume where as in windows you have 2 or 3 points depending on what version that you could possibly hit the reset button and resume from.

Aside from that....back to actual problem.

Quote:


Since /boot is on its own partition, your lines should look like this...

kernel(hd0,1)/kernel-2.4.22-gentoo-r3 root=/dev/hdc3
initrd(hd0,1)/initrd-2.4.22-gentoo-r3


I don't think that will change anything...after all my /boot is on a seperate partition and my lines still include kernel(hd0,0)/boot/kernel-etc etc etc

Quote:

Partitions:
hdc1: NTFS
hdc2: /boot (ext3)
hdc3: / (reiserfs)
hdc4: some weird MS partition
hdc5: swap


Why hdc? do you have more than one physical hard drive in here or are the cables backwards?

If you do not have more than one hard drive and the cables are set so the hard drive is first ide standard primary then you should be using hda in the grub.conf

Arasi
Back to top
View user's profile Send private message
MB[dk]
n00b
n00b


Joined: 15 May 2003
Posts: 23
Location: Aalborg, Denmark

PostPosted: Thu Jan 08, 2004 6:01 pm    Post subject: Reply with quote

My hd is hdc because it's a S-ATA drive (third controller).
I can boot into Gentoo by typing manually into grub, but nothing has helped.
Back to top
View user's profile Send private message
mrchuckles
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2002
Posts: 125
Location: Severn, MD

PostPosted: Thu Jan 08, 2004 6:05 pm    Post subject: Reply with quote

I'm confused. What do you mean you can boot into Gentoo manually, but nothing has helped? If you can boot after changing the Grub line during the boot processes, then make those same changes to /boot/grub/grub.conf and all should be good.
Back to top
View user's profile Send private message
MB[dk]
n00b
n00b


Joined: 15 May 2003
Posts: 23
Location: Aalborg, Denmark

PostPosted: Thu Jan 08, 2004 6:08 pm    Post subject: Reply with quote

mrchuckles wrote:
I'm confused. What do you mean you can boot into Gentoo manually, but nothing has helped? If you can boot after changing the Grub line during the boot processes, then make those same changes to /boot/grub/grub.conf and all should be good.


The changes to grub.conf didn't help. I can still only choose Windows XP on the menu. But if I get a commandline I can type the entries followed by "boot" and gentoo starts up.

And it looks like /boot isn't mounted automatically either.
Back to top
View user's profile Send private message
mrchuckles
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2002
Posts: 125
Location: Severn, MD

PostPosted: Thu Jan 08, 2004 6:13 pm    Post subject: Reply with quote

Quote:
The changes to grub.conf didn't help. I can still only choose Windows XP on the menu. But if I get a commandline I can type the entries followed by "boot" and gentoo starts up.

Can you post your entire /boot/grub/grub.conf. Also, ensure you don't have a /boot/grub/menu.lst.

Quote:
And it looks like /boot isn't mounted automatically either.

It's not supposed to be.
Back to top
View user's profile Send private message
MB[dk]
n00b
n00b


Joined: 15 May 2003
Posts: 23
Location: Aalborg, Denmark

PostPosted: Thu Jan 08, 2004 6:19 pm    Post subject: Reply with quote

[quote="mrchuckles"]
Quote:
Can you post your entire /boot/grub/grub.conf. Also, ensure you don't have a /boot/grub/menu.lst.

Code:

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


title=Genkernel 2.4.22
root(hd0,2)
kernel(hd0,1)/kernel-2.4.22-gentoo-r3 root=/dev/hdc3
initrd(hd0,1)/initrd-2.4.22-gentoo-r3


title=Windows XP
root(hd0,0)
chainloader (hd0,0)+1


I checked, there is no menu.lst
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Thu Jan 08, 2004 10:25 pm    Post subject: Reply with quote

I would re-install grub from the Gentoo CD and try that. I think something is bum fuzzled.

:? :? :D :D :D
_________________
My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
MB[dk]
n00b
n00b


Joined: 15 May 2003
Posts: 23
Location: Aalborg, Denmark

PostPosted: Thu Jan 08, 2004 11:01 pm    Post subject: Reply with quote

dalek wrote:
I would re-install grub from the Gentoo CD and try that. I think something is bum fuzzled.

:? :? :D :D :D


If I emerge grub, will it overwrite the previous one?
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Thu Jan 08, 2004 11:18 pm    Post subject: Reply with quote

MB[dk] wrote:
dalek wrote:
I would re-install grub from the Gentoo CD and try that. I think something is bum fuzzled.

:? :? :D :D :D


If I emerge grub, will it overwrite the previous one?


I would write down what you need to have and re-install and if it does over-write it, just type it back in. That is the beauty of grub, you don't have to run it before it will take changes like lilo. You will likely need to chroot in there to install it but that should fix the bug.

I have done that before and it didn't overwrite it on mine. It mostly just writes it to the MBR.

Hope that helps.

:D :D :D :D
_________________
My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
MB[dk]
n00b
n00b


Joined: 15 May 2003
Posts: 23
Location: Aalborg, Denmark

PostPosted: Fri Jan 09, 2004 12:15 am    Post subject: Reply with quote

Quote:

I would write down what you need to have and re-install and if it does over-write it, just type it back in. That is the beauty of grub, you don't have to run it before it will take changes like lilo. You will likely need to chroot in there to install it but that should fix the bug.

I have done that before and it didn't overwrite it on mine. It mostly just writes it to the MBR.

Hope that helps.

:D :D :D :D


Thanks, I will try that.
Back to top
View user's profile Send private message
vers_iq
Apprentice
Apprentice


Joined: 18 May 2002
Posts: 264

PostPosted: Fri Jan 09, 2004 12:19 am    Post subject: Reply with quote

mrchuckles wrote:
Quote:
Can you post your entire /boot/grub/grub.conf. Also, ensure you don't have a /boot/grub/menu.lst.

Code:

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


title=Genkernel 2.4.22
root(hd0,2)
kernel(hd0,1)/kernel-2.4.22-gentoo-r3 root=/dev/hdc3
initrd(hd0,1)/initrd-2.4.22-gentoo-r3


title=Windows XP
root(hd0,0)
chainloader (hd0,0)+1


I checked, there is no menu.lst


remove the root line
_________________
"You know the world is going crazy when the best rapper is a white guy, the best golfer is a black guy, the Swiss hold the America's cup, France accusing the US of arrogance and Germany doesn't want to go to war."


Last edited by vers_iq on Fri Jan 09, 2004 12:43 am; edited 1 time in total
Back to top
View user's profile Send private message
MB[dk]
n00b
n00b


Joined: 15 May 2003
Posts: 23
Location: Aalborg, Denmark

PostPosted: Fri Jan 09, 2004 12:23 am    Post subject: Reply with quote

[quote="vers_iq"]
MB[dk] wrote:
mrchuckles wrote:
Quote:
Can you post your entire /boot/grub/grub.conf. Also, ensure you don't have a /boot/grub/menu.lst.

Code:

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


title=Genkernel 2.4.22
root(hd0,2)
kernel(hd0,1)/kernel-2.4.22-gentoo-r3 root=/dev/hdc3
initrd(hd0,1)/initrd-2.4.22-gentoo-r3


title=Windows XP
root(hd0,0)
chainloader (hd0,0)+1


I checked, there is no menu.lst


remove the root line


There are 3 root lines in there, which one?
Back to top
View user's profile Send private message
vers_iq
Apprentice
Apprentice


Joined: 18 May 2002
Posts: 264

PostPosted: Fri Jan 09, 2004 12:41 am    Post subject: Reply with quote

Code:
root(hd0,2)

_________________
"You know the world is going crazy when the best rapper is a white guy, the best golfer is a black guy, the Swiss hold the America's cup, France accusing the US of arrogance and Germany doesn't want to go to war."
Back to top
View user's profile Send private message
Arasi
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jan 2004
Posts: 75
Location: Canada

PostPosted: Fri Jan 09, 2004 1:25 am    Post subject: Reply with quote

Quote:
remove the root line


Question, why is he removing that line?

I have it in mine and mine works great is there something about multiboot that prevents that key/value being there?

Arasi
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Fri Jan 09, 2004 2:11 am    Post subject: Reply with quote

Try adding a space after each GRUB command (root, kernel, initrd, chainloader).
Code:
default 0
timeout 30
splashimage=(hd0,1)/boot/grub/splash.xpm.gz


title=Genkernel 2.4.22
root (hd0,2)
kernel (hd0,1)/kernel-2.4.22-gentoo-r3 root=/dev/hdc3
initrd (hd0,1)/initrd-2.4.22-gentoo-r3


title=Windows XP
root (hd0,0)
chainloader (hd0,0)+1

I think unrecognized commands in grub.conf simply get ignored. Look at what happens with and without a space.
Code:
grub> root(hd0,0)
                                                                               
Error 27: Unrecognized command
                                                                               
grub> root (hd0,0)
 Filesystem type is ext2fs, partition type 0xfd


Last edited by cyrillic on Fri Jan 09, 2004 11:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
Janvw
n00b
n00b


Joined: 08 Jan 2004
Posts: 4
Location: Antwerp, Belgium

PostPosted: Fri Jan 09, 2004 3:54 pm    Post subject: Reply with quote

Quote:


Quote:
remove the root line


Question, why is he removing that line?

I have it in mine and mine works great is there something about multiboot that prevents that key/value being there?

Arasi



This is the reason:

Code:


title=Genkernel 2.4.22
root (hd0,1)
kernel /kernel-2.4.22-gentoo-r3 root=/dev/hdc3
initrd /initrd-2.4.22-gentoo-r3



is just the same as:

Code:


title=Genkernel 2.4.22
kernel hd(0,1)/kernel-2.4.22-gentoo-r3 root=/dev/hdc3
initrd hd(0,1)/initrd-2.4.22-gentoo-r3



with root(hdx,x) you tell grub witch partion to yous as root, so if you change your boot partion you only have to change the line wiht root(hdx,x).

But in MB[dk] grub.conf root = hd(0,2) and his kernel image is on hd(0,1)

So can it be that grub is confused about this??

Sorry for my english
and correct me if I sed somting that's wrong

Jan[/code]
Back to top
View user's profile Send private message
MB[dk]
n00b
n00b


Joined: 15 May 2003
Posts: 23
Location: Aalborg, Denmark

PostPosted: Fri Jan 09, 2004 9:44 pm    Post subject: Reply with quote

Im starting to think a kernel recompile will help out, grub seems correct to me.
Back to top
View user's profile Send private message
javlinz
n00b
n00b


Joined: 15 Nov 2003
Posts: 29

PostPosted: Fri Jan 09, 2004 10:21 pm    Post subject: Reply with quote

Janvw is correct. Your root should be (hd0,1) instead of (hd0,2). That is very likely your problem. If you still have the problem, reinstall grub to the MBR of your hard drive.
Code:
#grub
#root (hd0,1)
#setup (hd0)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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