View previous topic :: View next topic |
Author |
Message |
travisl n00b
Joined: 14 Oct 2004 Posts: 10 Location: UK
|
Posted: Thu Oct 21, 2004 10:06 am Post subject: Grub doesn't seem to load properly a really hard question |
|
|
Hi All,
Thanks for taking the time to read my email. My problem is when I reboot I go straight into grub (with splash screen) but I have no options none of the titles are comming up all I get is "grub>" prompt.
Help I have checked and rechecked my fstab and grub.conf, does anyone have any ideas? It is driving me mad
System Details : Dell C600, Dual Boot XP, Gentoo. One HD.
dev\hda1 - NTFS
dev\hda2 - Boot (ext2)
dev\hda3 - swap
dev\hda4 - Root (Reiserfs)
grub.conf (didn't use genkernel)
default 0
timeout 30
splashimage=(hd0,1)/grub/splash.xpm.gz
Title=Gentoo Linux 2.6.8-r10
root(hd0,0)
kernel /kernel-2.6.8-gentoor10 root/dev/hda4
Title=Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1
fstab
/dev/hda2 /boot ext2 defaults,noatime 1 2
/dev/hda4 / reiserfs noatime 0 1
/dev/hda3 none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
none /proc/bus/usb usbfs defaults 0 0
/dev/hda1 /mnt/windows ntfs defaults,users 0 0
Please help I am pulling my hair out (what little I have left).
thanks
Travis _________________ Practitioner of Common Sense |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Thu Oct 21, 2004 10:15 am Post subject: |
|
|
Not really.
Read your partition list again and correct it.
You'll have to boot from the CD again to edit grub.conf, but I guess you knew that already _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
rj686 Apprentice
Joined: 12 Oct 2004 Posts: 199 Location: In my room playing my guitar or Sitting at my damn computer trying to get my fuckin gentoo to work:)
|
Posted: Thu Oct 21, 2004 10:30 am Post subject: |
|
|
your root line in the linux setup should be
Code: |
Tiltle=Gentoo Linux
root (hd0,1)
kernel (hd0,1) /kernel<kernel version> root=/dev/hda4
|
This is what you wrote
i hope this is a typing error
it should be this
|
|
Back to top |
|
|
travisl n00b
Joined: 14 Oct 2004 Posts: 10 Location: UK
|
Posted: Thu Oct 21, 2004 11:57 am Post subject: Still Doesn't work |
|
|
Hi all,
I have made the changes then redid grub:
# cp /proc/mounts /etc/mtab
# grub-install --root-directory=/boot /dev/hda
# exit
cdimage ~# cd
cdimage ~# umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo
cdimage ~# reboot
and I still get the same prompt "grub>"
the exact display I get is this:
GNU GRUB version 0.94 (639k lover / 260972K upper memory)
[ Minimal BASH-like like editing is supported. For this first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.]
grub>
That's it.
See what I mean about it being hard now? Well it's hard for me anyway _________________ Practitioner of Common Sense |
|
Back to top |
|
|
mholtz Tux's lil' helper
Joined: 04 Feb 2004 Posts: 110 Location: Ohio, USA
|
Posted: Thu Oct 21, 2004 12:08 pm Post subject: |
|
|
Quote: | # cp /proc/mounts /etc/mtab
# grub-install --root-directory=/boot /dev/hda
# exit
cdimage ~# cd
cdimage ~# umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo
cdimage ~# reboot |
I am not sure of your directory structure, but you might try booting your system from the Grub command line to figure out what commands you need in your grub.conf file. I have a feeling that perhaps that file is not being read by grub for one reason or another.
So, insure that /dev/hda1 (wherever it is mounted), your boot partition, contains the correct version of grub.conf. Confirm the location and filename of the kernel you are attempting to boot.
When you reboot and get the Grub command prompt, begin by typing
then hit tab to have Grub complete the possible partitions. Make sure that "1" is an option and then type it in. Then try the kernel command as discussed above -- you should be able to use tab completion to find the file on your boot partition. Then, assuming all goes well, type boot. That's it. Then you can begin modifying your grub config file to match the commands you typed to boot. |
|
Back to top |
|
|
travisl n00b
Joined: 14 Oct 2004 Posts: 10 Location: UK
|
Posted: Thu Oct 21, 2004 12:27 pm Post subject: Might have the solution |
|
|
Cheers mate,
I typed in "root(hd0,1)"
and it found that (File type is ext2fs)
Then when I typed in
kernel (hd0,1) /kernel-2.6.8-gentoo-r10 root=/dev/hda4
I get the error " Error 1: Filename must be either an absolute pathname or blocklist"
It found the /kernel-2.6.8 etc with the tab key.
Did I do this correct any ideas? _________________ Practitioner of Common Sense |
|
Back to top |
|
|
mholtz Tux's lil' helper
Joined: 04 Feb 2004 Posts: 110 Location: Ohio, USA
|
Posted: Thu Oct 21, 2004 1:04 pm Post subject: |
|
|
Quote: | Then when I typed in
kernel (hd0,1) /kernel-2.6.8-gentoo-r10 root=/dev/hda4
I get the error " Error 1: Filename must be either an absolute pathname or blocklist" |
Possiblities:
1. Make sure there is no space between the closing parenthesis of hd(0,1) and the first / of kernel.
2. Perhaps (hd0,1)/kernel-2.6.8-gentoo-r10 is not a kernel image, but a directory? Are you using genkernel? If so, I am unfamiliar with what it names its kernel images. Mine are typically named bzImage-2.6.8-xxxxxx or vmlinuz-2.6.8-xxxxxx or some such.
From the Grub docs (http://www.gnu.org/software/grub/manual/grub.html#File%20name%20syntax):
How to specify files
There are two ways to specify files, by absolute file name and by block list.
An absolute file name resembles a Unix absolute file name, using / for the directory separator (not \ as in DOS). One example is (hd0,0)/boot/grub/menu.lst. This means the file /boot/grub/menu.lst in the first partition of the first hard disk. If you omit the device name in an absolute file name, GRUB uses GRUB's root device implicitly. So if you set the root device to, say, (hd1,0) by the command root (see root), then /boot/kernel is the same as (hd1,0)/boot/kernel.
|
|
Back to top |
|
|
travisl n00b
Joined: 14 Oct 2004 Posts: 10 Location: UK
|
Posted: Thu Oct 21, 2004 2:39 pm Post subject: hmmm |
|
|
There was a space. How can I tell if it is a kernel image or a directory? I believe it is a kernel image if I do a ls -l in the /boot:
-rw-r--r-- 1 root root 2098839 kernel-2.6.8-gentoo-r10
any more thoughts? I'm stumped. Thinking I need to do a reinstall or something. Any ideas how I can boot into windows would be appreciated to (with current problems).
Cheers
Travis _________________ Practitioner of Common Sense |
|
Back to top |
|
|
robet l33t
Joined: 06 Sep 2004 Posts: 807 Location: Earth/NorthAmerica/USA/NY
|
|
Back to top |
|
|
travisl n00b
Joined: 14 Oct 2004 Posts: 10 Location: UK
|
Posted: Thu Oct 21, 2004 4:12 pm Post subject: current grub.conf |
|
|
default 0
timeout 0
splashimage=(hd0,1)/grub/splash.xpm.gz
Title=Gentoo Linux 2.6.8-r10
root (hd0,1)
kernel (hd0,1)/kernel-2.6.8-gentoo-r10 root=/dev/hda4
Title=Windows XP
rootnoverify (hd0,0)
makeactive
chainloader+1
Thats it. I think I might have stuffed the MBR big time.
Thanks for all your help BTW. _________________ Practitioner of Common Sense |
|
Back to top |
|
|
mholtz Tux's lil' helper
Joined: 04 Feb 2004 Posts: 110 Location: Ohio, USA
|
Posted: Thu Oct 21, 2004 4:21 pm Post subject: |
|
|
Quote: | -rw-r--r-- 1 root root 2098839 kernel-2.6.8-gentoo-r10 |
That looks like a kernel image to me.
So, what happens when you try these commands at the grub prompt?
Code: |
grub> root(0,1)
grub> kernel /kernel-2.6.8-gentoo-r10 root=/dev/hda4
grub> boot
|
This should boot correctly to Gentoo. Assuming it does, then probably your only problem is the grub.conf that Grub is using.
In Gentoo, try the following as root.
Code: |
# mount /dev/hda2 (if not mounted)
# cat /boot/grub/grub.conf
|
Then post the result for us.
Here is a grub.conf to try :
Code: |
default 0
timeout 30
spashimage=(hd0,1)/grub/spash.xpm.gz
Title=Gentoo Linux 2.6.8-r10
root(hd0,1)
kernel /kernel-2.6.8-gentoo-r10 root=/dev/hda4
Title=Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1
|
Make sure that you actually put this file in /boot/grub/conf with /dev/hda2 mounted.
Let us know what you find. |
|
Back to top |
|
|
mholtz Tux's lil' helper
Joined: 04 Feb 2004 Posts: 110 Location: Ohio, USA
|
Posted: Thu Oct 21, 2004 4:26 pm Post subject: |
|
|
Quote: | Code: | default 0
timeout 0
splashimage=(hd0,1)/grub/splash.xpm.gz
Title=Gentoo Linux 2.6.8-r10
root (hd0,1)
kernel (hd0,1)/kernel-2.6.8-gentoo-r10 root=/dev/hda4
Title=Windows XP
rootnoverify (hd0,0)
makeactive
chainloader+1 |
|
One thing you might try is changing the timeout to a larger number so you actually have a chance to select something. If grub is attempting to boot a kernel and fails, I believe it will leave you with a grub> prompt as you describe.
If that doesn't work, try removing or commenting out the line with the splash screen. If that doesn't work either, I suggest trying to boot the machine from the Grub prompts (as I described above) to figure out where the problem is.
I doubt your MBR is trashed -- if it were you would be having far worse problems. |
|
Back to top |
|
|
travisl n00b
Joined: 14 Oct 2004 Posts: 10 Location: UK
|
Posted: Thu Oct 21, 2004 8:40 pm Post subject: I think I have found the problem!!! |
|
|
I think I have found the problem. I couldn't boot into gentoo (using grub commands). However I think the problem has to do with a bad partition on the hda2 (my boot). When I loaded into windows it kept resetting the boot record back to hda1 (windows partition). I plan on re-installing tonight thank you everyone for your fantastic help. Hopefully I will have more luck next time. I have learnt alot and have enjoyed every minute...well almost.
Once again thanks for all the help.
Cheers,
Travis. _________________ Practitioner of Common Sense |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Wed Oct 27, 2004 1:22 am Post subject: |
|
|
There are some other posts here about win2k and XP screwing around with the partitions each time. Do a search since I have no direct experience to help you.
There is a trick about mapping the drives that apparently gets around the prob.
You could boot from a live CD and just verify you hda2 partition to be sure but I think you will find it OK>
If it is XP frigging your MBR you should be able to boot off a CD, chroot, env-update then use command-line grub to reset the bootloader.
This will should give you a clean boot if all is OK on you gentoo, until next time you boot to XP, so at least you will know where you are.
HTH
_________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Wed Oct 27, 2004 1:26 am Post subject: |
|
|
[quote=mholtz] Code: | grub> root(0,1)
grub> kernel /kernel-2.6.8-gentoo-r10 root=/dev/hda4
grub> boot | [/quote]
once you manage to boot you need to save it to the hard disk. From grub.org :
Quote: |
grub> setup (hd0)
This command will install the GRUB boot loader on the Master Boot Record (MBR) of the first drive. If you want to put GRUB into the boot sector of a partition instead of putting it in the MBR, specify the partition into which you want to install GRUB:
grub> setup (hd0,0)
|
Please check the install guide for more.
also see this https://forums.gentoo.org/viewtopic.php?p=56793#56793 _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
mholtz Tux's lil' helper
Joined: 04 Feb 2004 Posts: 110 Location: Ohio, USA
|
Posted: Wed Nov 03, 2004 1:56 pm Post subject: |
|
|
Quote: | There are some other posts here about win2k and XP screwing around with the partitions each time. Do a search since I have no direct experience to help you.
There is a trick about mapping the drives that apparently gets around the prob. |
Now that you mention it, I believe I had that problem as well with Win2k. Each time Win2k booted it would change my MBR such that Grub would no longer work and it would only boot Windows. I'll have to look a bit closer at my settings to see what I did to prevent that. |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Wed Nov 03, 2004 2:15 pm Post subject: |
|
|
Yes, if you could post that it would be very useful.
One answer is to give up control of the system to MS , give boot control to 2k/NT and add a boot option to boot.ini to allow Linux boot option.
Personally that is not the way I wish to go. I want a boot loader of my choise that lauches the OS of my choise.
So if you have a way to stop win2k screwing with my MBR every time I hand it control of the system, please share.
_________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
|