View previous topic :: View next topic |
Author |
Message |
subzero349 Apprentice
Joined: 04 Nov 2003 Posts: 153
|
Posted: Wed Feb 11, 2004 2:28 pm Post subject: Grub.conf |
|
|
Alright, this is a question that will make some peopple think I'm lazy... but I'm not lazy... I'm dumb!
Can somebody tell me what my grub.conf file should look like?
hda1 -> windows xp
hda5 -> linux boot (ext3)
hda6 -> linux swap
hda7 -> linux root (reiserfs)
I used genkernel to compile mm-sources (kernel-2.6.3-rc1-mm1, initrd-2.6.3-rc1-mm1).
obviously I want a dual boot... I've had lilo working b4 but it is causing me a prob right now and i want to switch to grub anywayz...
I understand that hda5 would be (hd0,4).. but it still confuses me what to put where...
any example files... pleeeeease _________________ subzero349 |
|
Back to top |
|
|
subzero349 Apprentice
Joined: 04 Nov 2003 Posts: 153
|
Posted: Wed Feb 11, 2004 2:32 pm Post subject: |
|
|
I did once try that weird grub editor thing where you type root (hd0,blah) and setup (blah, blah) but on setup I got a weird error (like error 13 or something... so I just want to mak ethe conf file...
also I need where to put the initrd= real_root= and root= _________________ subzero349 |
|
Back to top |
|
|
Earthwings Bodhisattva
Joined: 14 Apr 2003 Posts: 7753 Location: Germany
|
|
Back to top |
|
|
subzero349 Apprentice
Joined: 04 Nov 2003 Posts: 153
|
Posted: Wed Feb 11, 2004 4:11 pm Post subject: |
|
|
ugh... I already looked there...
the install docs are outdated... if you look at the lilo and grub they are not complete and at one point they say I should add boot info in a root spot... it's just not clear to me... (plus I already tried from docs and when I boot up all I got was 99999999999999999999 printed all over my screen)
too much information - I can't get a working one made out of it...
I'll give you an example from the link you sent me:
Quote: | grub> root (hd0,0) (Your boot partition) |
Ok... so the command is root and I'm adding my BOOT partition?? Counter-intuitive?? I think so...
What I really would like if possible is if someone with a windows/gentoo dual boot would post there grub.conf file and let me know which partitions where boot, root, and swap...
I would really appreciate that... especially someone using 2.6 kernel... thank you _________________ subzero349 |
|
Back to top |
|
|
michaelb l33t
Joined: 06 Jun 2002 Posts: 686 Location: Ann Arbor, MI
|
Posted: Wed Feb 11, 2004 4:17 pm Post subject: |
|
|
Here's the thing, requests along the lines of, "just do it for me" tend to not be very popular around here.
Take a look at this section of the install docs. If you have any specific questions as to how these examples relate to your environment, ask away and I will help you in any way I can. I will not, however, write your grub.conf for you, because I think it is an important learning step for you to at least try and do it on your own. If you have already made attempts, then post what you tried and how it didn't work. _________________ Behold, The power of SEARCH! |
|
Back to top |
|
|
subzero349 Apprentice
Joined: 04 Nov 2003 Posts: 153
|
Posted: Wed Feb 11, 2004 4:24 pm Post subject: |
|
|
Ok... I understand the "just do it for me approach" is not popular.
Since some people already will have a grub.conf file I am just asking them to post it.
THe reason is I HAVE read all the docs that I can find from various links (and the printed out version of the install docs I have). I have installed gentoo before from the docs and I did it all by myselft. I am running into problems with 2.6 kernel and I would like to use grub.
I have already run into problems where I have frozen my computer so many times at boot (because of my bootloader) that I have corrupted one or more partitions. After I corrupt a partition I have to start all over from the beginning. Not to mention the dozens of times I need to boot from the cd and chroot and mount and stuff.
I do not want to corrupt my partitions again, so I do not want to keep "experimenting" with grub when there must be people out there who have it working.
So, if anyone would be willing to take the time to post there grub.conf file (if similar to my situation) I would appreciate it greatly. I try and help out others when I can... Although my knowledge is limited _________________ subzero349 |
|
Back to top |
|
|
subzero349 Apprentice
Joined: 04 Nov 2003 Posts: 153
|
Posted: Wed Feb 11, 2004 4:35 pm Post subject: |
|
|
Ok... I'll ask some questions.
michaelb after reading your response more clearly I will attempt to write a grub.conf file and ask for your help in editing it.
Here is my setup:
hda1 windows xp
hda5 boot (ext 3)
hda6 swap
hda7 root (reiserfs)
Code: |
default 0
timeout 30
splashimage=(hd0,0)/grub/splash.xpm.gz #is this a default image and location?
title=Gentoo Linux
root (hd0,4) #from the weird instruction this is my BOOT?
kernel (hd0,6)/kernel-2.6.3-rc1-mm1 root=/dev/ram0 init=/linuxrc vga=788 elevator=cfq
real_root=/dev/hda7
#would the kernel by ROOT then?
initrd (hd0,6)/initrd-2.6.3-rc1-mm1
#initrd root?
#should there be a "setup" line?
setup (hd0) #to specify the drive I am booting off??
# Only in case you want to dual-boot
title=Windows XP
root (hd0,0) #is this correct?
chainloader +1 |
The '#' are my questions. I would appreciate any help you could offer.
Is there anything i am missing at all for this file to function properly? (Like location of loader (MBR or hard drive)...
The last time I tried something similair to this (maybe not exact) and I got a bunch of 9999999999999999999999999999999 displaying instead of a nice bootloader _________________ subzero349 |
|
Back to top |
|
|
michaelb l33t
Joined: 06 Jun 2002 Posts: 686 Location: Ann Arbor, MI
|
Posted: Wed Feb 11, 2004 5:21 pm Post subject: |
|
|
Much better.
Code: | splashimage=(hd0,0)/grub/splash.xpm.gz #is this a default image and location? |
Not quite. Think of the line being a complete path to the file in question. In your environment, the splash.xpm.gz file lives at /dev/hda5/grub/splash.xpm.gz so in grub parlance, that translates to Code: | splashimage=(hd0,4)/grub/splash.xpm.gz
|
Note here that grub sees /dev/hda5 as (hd0,4). Since you have /boot set to mount at /dev/hda5, anything you see in /boot (when it's mounted) grub will see in (hd0,4). Once you understand this, configuring grub becomes a breeze.
Code: | root (hd0,4) #from the weird instruction this is my BOOT? | Yes, because you are telling the bootloader portion of grub, which sits on your master boot record, where the grub config files and so forth live. In other words, where can I find /grub?
Code: | kernel (hd0,6)/kernel-2.6.3-rc1-mm1 root=/dev/ram0 init=/linuxrc vga=788 elevator=cfq
real_root=/dev/hda7
#would the kernel by ROOT then? | Again, you want to look at this as telling grub the explicit path to find your kernel image, the file you have named as kernel-2.6.3-rcl-mml, so what do you think should be in between the parens? The real_root argument is the only thing in the grub conf that should be pointing to the mount point of / (/dev/hda7). I don't know what the command elevator does, and I couldn't find it anywhere in the grub manual. What is it for? Lastly, you want all of this to be on one line in the grub.conf file.
Code: | initrd (hd0,6)/initrd-2.6.3-rc1-mm1
#initrd root? | See above, and tell me where you think you should point grub to find the file initrrd-2.6.3-rc1.mm1?
Quote: | #should there be a "setup" line?
setup (hd0) #to specify the drive I am booting off?? | No, the setup line you use when you actually install the grub application, it tells grub to put the bootloader on the MBR of (hd0), which grub sees as /dev/hda. In the link I provided, go back and reread the section titled installing grub. The commands it tells you to issue are commented and pretty easy to follow. Remember, when you say root to grub, you are talking about the location of the directory /grub, and not the location of /
Your Windows section looks fine, but I have had better success with using rootnoverify rather than root as the command, ie
Code: | title=Windows XP
rootnoverify (hd0,0)
chainloader +1 |
_________________ Behold, The power of SEARCH! |
|
Back to top |
|
|
subzero349 Apprentice
Joined: 04 Nov 2003 Posts: 153
|
Posted: Wed Feb 11, 2004 5:27 pm Post subject: |
|
|
Thank you very much for clearing that up Michael.
The one thing I actually understood was that hda5 would be (hd0, 4)
the elevator command I would use to change the schedular mode of my system... (I'll leave that out for now and maybe test it later).
I have another question for you:
Currently I'm using lilo with limited success.
It boots, but it always asks me to specify my root partition (I think... it may be boot... I wish I could remember)
after I specify it the kernel continues to load and all is good.
everytime I go to compile xfree it freezes at random spots. I have tried the release and the newest ebuild... both freeze my computer
would this be releated to the problem I am having at boot up? _________________ subzero349 |
|
Back to top |
|
|
michaelb l33t
Joined: 06 Jun 2002 Posts: 686 Location: Ann Arbor, MI
|
Posted: Wed Feb 11, 2004 5:32 pm Post subject: |
|
|
I'm not sure if the problems are related, but they could be. I'm not really familiar with the mm patch set, but I have heard they're pretty bleeding edge and occasionally break things. It could be as simple as that.
As for lilo, post your config and we'll have a look. _________________ Behold, The power of SEARCH! |
|
Back to top |
|
|
subzero349 Apprentice
Joined: 04 Nov 2003 Posts: 153
|
Posted: Wed Feb 11, 2004 5:35 pm Post subject: |
|
|
I will, but I don't have it with me right now...
one thing i remember though -
root=/dev/ram0 init=/linuxrc vga=788 real_root=/dev/hda7
doesn't seem to make much of a difference to
root=/dev/hda7 init=/linuxrc vga=788
any comments on that?
Also, do you have any comments on "stable" 2.6 kernels? I tried gentoo-dev-sources (2.6.1-r1) and got the same prob. _________________ subzero349 |
|
Back to top |
|
|
michaelb l33t
Joined: 06 Jun 2002 Posts: 686 Location: Ann Arbor, MI
|
Posted: Wed Feb 11, 2004 5:50 pm Post subject: |
|
|
The first method is mounting / to a RAM disk, and the second is mounting it directly on the hardware. I personally don't use initrd, so I use the second method but that may cause problems with preloading modules. It looks from your post like you used genkernel to compile your kernel, and that thing relies on the initrd, so you may be stuck with the first method, I really don't know.
I am currently running gentoo-dev-sources 2.6.1 without any troubles. _________________ Behold, The power of SEARCH! |
|
Back to top |
|
|
subzero349 Apprentice
Joined: 04 Nov 2003 Posts: 153
|
Posted: Wed Feb 11, 2004 5:57 pm Post subject: |
|
|
yeah... I used genkernel --menuconfig all
it allowed me to tweak the kernel and all the making and copying at the end is taken care of.
If you are running 2.6.1 no probs then maybe I picked a wrong option in the kernel...
Did you compile xfree from 2.6.1 or was it already compiled from a previous kernel?
thanks for your help... I know 2.4 kernel works... I guess maybe I should go back to that _________________ subzero349 |
|
Back to top |
|
|
michaelb l33t
Joined: 06 Jun 2002 Posts: 686 Location: Ann Arbor, MI
|
Posted: Wed Feb 11, 2004 6:08 pm Post subject: |
|
|
I definately compiled xfree under the 2.6 kernel. I am currently recompiling GCC to the latest ebuild, and when that is finished I will redo xfree and let you know how it goes. _________________ Behold, The power of SEARCH! |
|
Back to top |
|
|
subzero349 Apprentice
Joined: 04 Nov 2003 Posts: 153
|
Posted: Wed Feb 11, 2004 6:22 pm Post subject: |
|
|
Thank you... much appreciated.
DO you have an nvidia card?
I tried this:
emerge -k nvidia-kernel
and after doing all the appropriate steps I tried xfree - froze
I tried this:
emerge -k /media-video/nvidia/nvidia-kernel[latest ebuild]
and after doing all the appropriate steps I tried xfree - froze
Just curious what version you are using?
What version of xfree would you emerge? Just the release? I tried that first... but I got the same results with the latest ebuild. _________________ subzero349 |
|
Back to top |
|
|
michaelb l33t
Joined: 06 Jun 2002 Posts: 686 Location: Ann Arbor, MI
|
Posted: Wed Feb 11, 2004 6:38 pm Post subject: |
|
|
I do have an nVidia card, but the nVidia drivers are only needed if you want acclelerated 3D rendering, which I don't use, so I never bother with them.
Currently compiling xfree by just issuing _________________ Behold, The power of SEARCH! |
|
Back to top |
|
|
subzero349 Apprentice
Joined: 04 Nov 2003 Posts: 153
|
Posted: Wed Feb 11, 2004 6:39 pm Post subject: |
|
|
Does that mean you are doing a verbose update? (I'd do a man emerge if I were at home on my linux box) _________________ subzero349
Last edited by subzero349 on Wed Feb 11, 2004 6:40 pm; edited 1 time in total |
|
Back to top |
|
|
michaelb l33t
Joined: 06 Jun 2002 Posts: 686 Location: Ann Arbor, MI
|
Posted: Wed Feb 11, 2004 6:40 pm Post subject: |
|
|
Indeed. _________________ Behold, The power of SEARCH! |
|
Back to top |
|
|
subzero349 Apprentice
Joined: 04 Nov 2003 Posts: 153
|
Posted: Wed Feb 11, 2004 6:41 pm Post subject: |
|
|
What exactly does verbose do? _________________ subzero349 |
|
Back to top |
|
|
michaelb l33t
Joined: 06 Jun 2002 Posts: 686 Location: Ann Arbor, MI
|
Posted: Wed Feb 11, 2004 6:46 pm Post subject: |
|
|
man grub wrote: | --verbose (-v)
Tell emerge to run in verbose mode. Currently this flag causes emerge to print out GNU info errors, if any, and to show the USE flags that will be used for each package when pretending. |
_________________ Behold, The power of SEARCH! |
|
Back to top |
|
|
subzero349 Apprentice
Joined: 04 Nov 2003 Posts: 153
|
Posted: Wed Feb 11, 2004 6:58 pm Post subject: |
|
|
Thanks...
Please let me know how that works out... although I bet it will work for you...
It's probably something in the kernel I didn't add or something... _________________ subzero349 |
|
Back to top |
|
|
subzero349 Apprentice
Joined: 04 Nov 2003 Posts: 153
|
Posted: Thu Feb 12, 2004 4:05 pm Post subject: |
|
|
michael any luck with the update here? _________________ subzero349 |
|
Back to top |
|
|
michaelb l33t
Joined: 06 Jun 2002 Posts: 686 Location: Ann Arbor, MI
|
Posted: Thu Feb 12, 2004 9:08 pm Post subject: |
|
|
Oh yeah, sorry. I updated to the latest ebuild of xfree without any hassle. I think you're best bet at this point is to start another thread over in the desktops forum detailing the problem you're having with the install. _________________ Behold, The power of SEARCH! |
|
Back to top |
|
|
subzero349 Apprentice
Joined: 04 Nov 2003 Posts: 153
|
Posted: Thu Feb 12, 2004 9:18 pm Post subject: |
|
|
Ok... thanks for help...
I have decided this is not a xfree problem - it's just that xfree is the first program I try and install after reboot from livecd...
SO either the kernel has a bad option in it or my bootloader is not loading the drives properly.. _________________ subzero349 |
|
Back to top |
|
|
|