LinuxQuestions.org
Review your favorite Linux distribution.
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
  Search this Thread
Old 06-08-2009, 07:22 AM   #1
hirohitosan
LQ Newbie
 
Registered: Apr 2007
Posts: 28

Rep: Reputation: 15
Installing GRUB


Hi there.

I have on my old computer Win98SE, Mandrake9.2 and FreeBSD7.2.
I installed Grub on Linux partition.
My partition table looks like this:
Code:
/dev/hda1/ ---- Win98SE
/dev/hda2/ ---- LinuxSWAP
/dev/hda3/ ---- Linux
/dev/hda4/ ---- FreeBSD
GRUB is installed on /dev/hda3/
/boot/grub/menu.lst looks like:
Code:
timeout 100
color black/cyan yellow/cyan
i18n (hd0,2)/boot/grub/messages
keytable (hd0,2)/boot/us.klt
altconfigfile (hd0,2)/boot/grub/menu.once
default 0

title linux
kernel (hd0,2)/boot/vmlinuz root=/dev/hda3 acpi=ht resume=/dev/hda2
initrd (hd0,2)/boot/initrd.img

title windows
root (hd0,0)
chainloader +1
After booting the grub promt appear and the system doesn't boot.
If i try
Code:
grub> root (hd0,2)
    Filesystem type is ext2fs, partition type 0x83
grub> kernel /boot/vmlinuz
Error 18: Selected cylinder exceeds maximum supported by BIOS
I don't know what to do next.
Can someone guide me how to boot my computer?

thanks a lot!
 
Old 06-08-2009, 07:33 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Why dont you try and install grub on the mbr of the drive and then see what happens?
 
Old 06-08-2009, 08:22 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Where was GRUB before you installed in on the partition?

OR--how did you boot up before you put GRUB on the partition?

Keep in mind that there always must be boot code in the MBR---if you have GRUB in a partition, then something needs to point to it.
 
Old 06-08-2009, 08:26 AM   #4
hirohitosan
LQ Newbie
 
Registered: Apr 2007
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by linuxlover.chaitanya View Post
Why dont you try and install grub on the mbr of the drive and then see what happens?
How? Since I cannot boot in any OS?
 
Old 06-08-2009, 08:42 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Quote:
Originally Posted by hirohitosan View Post
How? Since I cannot boot in any OS?
Thats the beauty of Linux. Just boot distribution cd that you have either in Live mode or in rescue mode and install it.
If in live mode
sudo grub-install /dev/hda

Or if in rescue mode

grub-install /dev/hda.

And you have got enough explanation why you can not boot, from pixellany.
 
Old 06-08-2009, 08:56 AM   #6
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,665

Rep: Reputation: 487Reputation: 487Reputation: 487Reputation: 487Reputation: 487
hirohitosan:

I have not yet tried Mandrake, but to be sure there are two ways (or many ways) of solving your problem.

1.) Edit your erroneous /boot/grub/menu.lst --DO THIS:

herohito@host-$: sudo gedit /boot/grub/menu.lst (you can use other editors, vi, vim, etc.) <enter password if required>

(Once the editor opens menu.lst put this entry into one stanza--)

title linux
root (hd0,2)
kernel /boot/vmlinuz root=/dev/hda3 acpi=ht quiet splash
initrd /boot/initrd.img
boot

Save the menu.lst and quit the editor.
Reboot your machine, see if this works.

Another way is--

2) Boot your Linux installer, once booted mount your Linux partition then go to grub prompt:

installer@host-$: sudo grub

grub> root (hd0,2)
grub> grub-install /dev/hda
grub> quit

Reboot.

In the No.2 solution you have written stage 1 to MBR, so your win98 will not be chainloaded at grub until you have editted again your /boot/grub/menu.lst.

You can edit the menu.lst at your linux by doing this--

herohito@host-$: sudo gedit /boot/grub/menu.lst (you can use other editors, vi, vim, etc)

Put this stanza into the menu.lst--

title windows
root (hd0,0)
makeactive
chainloader +1

You will have multiboot running in grub.

There are other ways of solving or playing with grub to meet your needs. Let me advise your good self to read this tutorial http://www.dedoimedo.com/computers/grub.html

Hope this helps.

Good luck.

Last edited by malekmustaq; 06-08-2009 at 09:04 AM.
 
Old 06-08-2009, 09:03 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,999

Rep: Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219
Quote:
Originally Posted by hirohitosan View Post
After booting the grub promt appear and the system doesn't boot.
That would seem to imply that grub is indeed already in the MBR. Perhaps we could offer some assistance to the OP huh folks ?.
Quote:
Error 18: Selected cylinder exceeds maximum supported by BIOS
This is a BIOS limitation, not a grub one - simply re-installing grub won't fix it.
If you have a (Linux) liveCD let's see the output from "fdisk -l" (from a terminal session). You may be able to get away with a re-install, putting the root at /dev/hda2 rather than the swap. This assumes all the files in /boot fit within the first 1024 cylinders (say 8 Gig). Better would be to allocate a /boot partition and ensure it is within those limits.

If you can get a BIOS update that will probably make this problem go away without anything else needing to be done.
 
Old 06-08-2009, 09:32 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
We might be giving better help if OP would answer my earlier questions.........
 
Old 06-08-2009, 10:50 AM   #9
hirohitosan
LQ Newbie
 
Registered: Apr 2007
Posts: 28

Original Poster
Rep: Reputation: 15
Thanks guys. Grub was installed during Mandrake installation. At that time I didn't create rescue disk. I just have a live CD Slax6.
Here is my fdisk -l output
Code:
Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         638     5124703+   b  W95 FAT32
/dev/hda2            4826        4864      313267+  82  Linux swap
Partition 2 does not end on cylinder boundary.
/dev/hda3             639        1276     5124735   83  Linux
Partition 3 does not end on cylinder boundary.
/dev/hda4   *        1277        4825    28507122   a5  FreeBSD
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order
and here is my /boot/grub/menu.lst after modyfing
Code:
timeout 100
color black/cyan yellow/cyan
i18n (hd0,2)/boot/grub/messages
keytable (hd0,2)/boot/us.klt
altconfigfile (hd0,2)/boot/grub/menu.once
default 0

title linux
root(hd0,2)
kernel /boot/vmlinuz root=/dev/hda3 acpi=ht quiet splash
initrd /boot/initrd.img
boot

title windows
root (hd0,0)
chainloader +1

Last edited by hirohitosan; 06-08-2009 at 11:19 AM.
 
Old 06-08-2009, 02:34 PM   #10
hirohitosan
LQ Newbie
 
Registered: Apr 2007
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by syg00 View Post
This is a BIOS limitation, not a grub one - simply re-installing grub won't fix it.

You may be able to get away with a re-install, putting the root at /dev/hda2 rather than the swap. This assumes all the files in /boot fit within the first 1024 cylinders (say 8 Gig). Better would be to allocate a /boot partition and ensure it is within those limits.
so you suggest to re-partition again the whole HDD?

Last edited by hirohitosan; 06-08-2009 at 04:27 PM.
 
Old 06-08-2009, 05:47 PM   #11
hirohitosan
LQ Newbie
 
Registered: Apr 2007
Posts: 28

Original Poster
Rep: Reputation: 15
solved

Thanks guys!
Finally I installed LILO and it works just fine
here's my lilo.conf
Code:
boot=/dev/hda
map=/boot/map
vga=normal
default="linux"
keytable=/boot/us.klt
prompt
nowarn
timeout=1000
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
        label="linux"
        root=/dev/hda3
        initrd=/boot/initrd.img
        append="devfs=mount acpi=ht resume=/dev/hda2"
        read-only
other=/dev/hda1
        label="windows"
        table=/dev/hda
other=/dev/hda4
        label="FreeBSD"
        table=/dev/hda
and it boots all OS

thanks again
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub not installing Cichlid Linux - Software 4 05-31-2009 12:25 PM
installing GRUB 2, grub-install problem r00tb33r Linux - Software 1 02-26-2007 10:42 PM
Why grub prompt after installing Grub inder Debian woody 3.0r2? velan Debian 1 04-20-2004 05:55 AM
Installing GRUB 4ohfour Linux - Newbie 2 01-24-2004 06:42 PM
Installing Grub Drogo Linux - Software 2 09-09-2003 01:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:54 AM.

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