LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 04-27-2004, 04:19 PM   #1
Swishaa
LQ Newbie
 
Registered: Apr 2004
Distribution: Red Hat Linux 9
Posts: 9

Rep: Reputation: 0
GRUB problems


I have just installed Red Hat Linux 9 on my computer. I haveWindows XP on the system also. GRUB installed to my MBR (hda). Both of my hard drives have LBA enabled according to my BIOS.

When Grub runs on starup i get:
GRUB Loading stage1.5
GRUB loading, please wait...
Error 18


This is how my computer is set up (fdisk -l):
Code:
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      9729  78148161    7  HPFS/NTFS    <---- Windows XP
 
Disk /dev/hdb: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1             1      5483  44042166    7  HPFS/NTFS
/dev/hdb2          5484     15212  78148192+   f  Win95 Ext'd (LBA)
/dev/hdb3         15213     15343   1052257+  82  Linux swap
/dev/hdb4   *     15344     19929  36837045   83  Linux
/dev/hdb5          5484     15212  78148161    b  Win95 FAT32
My grub.conf file:
Code:
default=0
timeout=10
slashimage=(hd1,3)/boot/grub/splash.xpm.gz
title Red Hat Linux
	root (hd1,3)
	kernel /boot/vmlinuz-2.4.20-8 ro root=/dev/hdb4
	initrd /boot/initrd-2.4.20-8.img
title Windows XP
	rootnoverify (hd0,0)
	chainloader +1
I also tried to put GRUB on a floppy disk and boot from that, but i got "GRUB Geom Error".

All I can do right now is boot Linux from my boot floppy disk I made durring installation.

Last edited by Swishaa; 04-27-2004 at 10:49 PM.
 
Old 04-27-2004, 08:21 PM   #2
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
By this line:
/dev/hdb3 15213 15343 1052257+ 82 Linux swap
we see that this is a swap partition.

But your grub.conf maps this partition to be the root:
title Red Hat Linux
root (hd1,3)

Still, the output of fdisk shows that hdb4 is marked active (the *). Try to set this one to be the root.

Try to fix this, and see if it works.
Its possible that grub fails even if only one entry is bugged. One would expect grub to supply the whole stuff and boot only the good ones. But it doesn't.

There's another alternative to this situation:
You may want to overwrite grub and its stuff with winXP tools, and let linux boot from floppies always. Just run the winXP install cd, choose recovery console and run the utility to write mbr. I guess its name is something like xpboot, or makeboot or some similar .exe.
 
Old 04-27-2004, 08:35 PM   #3
Swishaa
LQ Newbie
 
Registered: Apr 2004
Distribution: Red Hat Linux 9
Posts: 9

Original Poster
Rep: Reputation: 0
Grub uses a different numbering system for its hard drives/partitions. Grub starts at (hd0, 0) where as linux starts at /dev/hda1. So /dev/hdb4 is the same as (hd1,3) (2nd hard drive, 4th partition).

I could overwrite the MBR with the windows version, but I'd kinda like to get some kind of boot loader working where I can choose windows or linux.
 
Old 04-28-2004, 03:56 AM   #4
Qucho
Member
 
Registered: Mar 2004
Location: Colorado, US
Distribution: Debian "Sarge"
Posts: 228

Rep: Reputation: 30
This might have an easy solution.
First you should just boot linux with your rescue floppy/cd and type in the comman line;
# update-grub

I hope this fix your problem.
 
Old 04-28-2004, 02:12 PM   #5
Swishaa
LQ Newbie
 
Registered: Apr 2004
Distribution: Red Hat Linux 9
Posts: 9

Original Poster
Rep: Reputation: 0
Uhh, update-grub is not a command. When I typed it into my terminal, I got
bash: update-grub: command not found
grub-update does not work either. I know that "grub-install" installs grub, but i've re-installed grub and still got the same error.
 
Old 04-28-2004, 02:41 PM   #6
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
From the GRUB manual

http://www.gnu.org/software/grub/man...roubleshooting

"Stage 1:

Geom Error

The location of the stage2 or stage1.5 is not in the portion of the disk supported directly by the BIOS read calls. This could occur because the BIOS translated geometry has been changed by the user or the disk is moved to another machine or controller after installation, or GRUB was not installed using itself (if it was, the Stage 2 version of this error would have been seen during that process and it would not have completed the install).


Stage 1.5 & Stage 2:

Error 18 : Selected cylinder exceeds maximum supported by BIOS

This error is returned when a read is attempted at a linear block address beyond the end of the BIOS translated area. This generally happens if your disk is larger than the BIOS can handle (512MB for (E)IDE disks on older machines or larger than 8GB in general).


Hmmmmm.

Last edited by WhatsHisName; 04-28-2004 at 02:58 PM.
 
Old 04-28-2004, 02:59 PM   #7
Swishaa
LQ Newbie
 
Registered: Apr 2004
Distribution: Red Hat Linux 9
Posts: 9

Original Poster
Rep: Reputation: 0
So, what do I do. I mean, I've even tried removing the slashimage line and the linux option (so all it would show is windows) since both are beyond the first 8GB, and I still get the same error. What exactly is it that has to be at the front of the hd? GRUB itself is in the MBR, which is the first 512MB. Also, does anyone know how old an 'older machine' is? I mean, I bought my computer about the time that the P4 came out, so it's not really old.
 
Old 04-28-2004, 03:14 PM   #8
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
Actually, a pointer for GRUB is in the master boot record (MBR). The MBR is only 512 bytes in size.

It may not help, but try starting at the beginning. Rewrite the MBR using either the recovery utilities on the XP installation CD or using a Win95/98/ME Startup Disk (i.e., run fdisk /mbr).

Then boot to linux using the floppy boot disk and try installing GRUB using:

grub-install --force-lba --recheck /dev/hda

where:

--force-lba = force GRUB to use LBA mode
--recheck = force probing of device map


Again, this may not help.
 
Old 04-28-2004, 05:46 PM   #9
Swishaa
LQ Newbie
 
Registered: Apr 2004
Distribution: Red Hat Linux 9
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for correcting me on the size of the MBR, i knew it was 512 something, lol. I reset the MBR and then installed GRUB again with no luck though. I still get the same error.
 
Old 04-29-2004, 02:01 AM   #10
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Rep: Reputation: Disabled
You might also use the boot-loader of XP by editing boot.ini (if it still exists ). In WinNT it looks like this
Code:
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation, Version 4.0" 
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation, Version 4.0 [VGA-Modus]" /basevideo /sos
[boot loader]
timeout=3
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
add a new line like this in the [operating systems] section
Code:
multi(0)disk(0)rdisk(1)partition(4)\Linux="Your distro here"
But I don't really remember whether you have to change the parameter of disk(0) or of rdisk(0) to 1 for hdb (or both). Just experiment, as long as you don't touch the XP-lines nothing bad will happen and you ought to make a backup beforehand anyhow...

[edit]Uargh, that's not right. First you have to copy the boot sector from your /dev/hdb4 by dd and write it to a partition XP can read, e.g. as Linux.ini. Next you have to move it to C: (into the NTFS file structure by WIn...) Then you access it by
Code:
multi(0)disk(0)rdisk(1)partition(4)\Linux.ini="Your distro here"
Selecting this in the Win-loader menu will start GRUB from /dev/hdb4

Last edited by JZL240I-U; 04-29-2004 at 02:20 AM.
 
Old 04-30-2004, 02:09 PM   #11
Swishaa
LQ Newbie
 
Registered: Apr 2004
Distribution: Red Hat Linux 9
Posts: 9

Original Poster
Rep: Reputation: 0
Alright, this is what I did. I copied my MBR to the file boot.lnx. Then I took boot.lnx and put it on my C:\ drive. Then I added 'C:\boot.lnx="Red Hat Linux 9"' to my boot.ini file. The problem is, all that this does it add a choice in boot.ini to load GRUB. I got the same error after selecting Linux from my boot.ini menu. Does anyone know of a way i can point directly to Linux from boot.ini instead of pointing to GRUB or LILO?? (all of the tutorials i've found have you copy lilo and add it into your boot.ini)
 
Old 05-01-2004, 08:52 AM   #12
Swishaa
LQ Newbie
 
Registered: Apr 2004
Distribution: Red Hat Linux 9
Posts: 9

Original Poster
Rep: Reputation: 0
I have an idea, not sure if it's possible though. What if i take the files from my rescue floppy, and put them on my c:\ drive. Then somehow have boot.ini use those files. Has anyone done this or know if it works???
 
Old 05-10-2004, 09:47 AM   #13
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Rep: Reputation: Disabled
Sorry to answer so late.

You absolutelyhave to use a bootloader to start Linux, and the Win-bootloader can't do it. So my suggestion is to check your installation of GRUB (though it works with LILO as well). I just shot down my machine and had to rebuild the whole procedure this weekend, so do I know it works -- but most times not at the first try (I think I had five tries this time, dunno why GRUB is so pigheaded or whether its just the quality of my CD-ROMs).

Oh, and as to your last question, I don't think it works, because you have to set the floppy as boot-medium, but experiment away -- and don't forget to tell us your results. And you still have to announce to the boot loader that these files are there ...
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gentoo... grub problems... "/boot/grub/stage1" exists... no halo14 Gentoo 5 02-06-2011 04:50 PM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 08:33 AM
GRUB problems allforcarrie Linux - Newbie 1 09-17-2004 05:36 PM
Problems with GRUB pandasonic Linux - Laptop and Netbook 5 11-30-2003 11:05 AM
GRUB problems... pandasonic Linux - Software 2 11-27-2003 02:34 PM


All times are GMT -5. The time now is 06:56 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration