grub error 2, system boots with cd

This is something weird for me. When I boot machine I get this “grub error 2”, but if I put suse boot cd in cd drive and wait couple of second it starts booting cd. ok.
when I select “Boot from harddisk” from cd menu, computer boots ok.
So without this cd I am not able to boot ny brand new system :slight_smile:

I am littlebit confused with this so here is some information:
Installation of suse is made to /dev/sdd and bios is set to boot from that disk first. Do I have to put bootcode to /dev/sda or where? hmm… it works with cd, but not without.

linux-z0zp:/home/z0zp # fdisk -l

Disk /dev/sda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00011546

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2611    20972826   83  Linux
/dev/sda2            2612       24792   178168882+  83  Linux

Disk /dev/sdb: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xe53a5b5a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          31      248976   83  Linux
/dev/sdb2              32       14946   119804737+   5  Extended
/dev/sdb5              32       14946   119804706   8e  Linux LVM

Disk /dev/sdc: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xae3f9991

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1        3824    30716248+  83  Linux
/dev/sdc2            3825       14945    89329432+   f  W95 Ext'd (LBA)
/dev/sdc5            3825        8923    40957686   83  Linux
/dev/sdc6            8924        9054     1052226   82  Linux swap / Solaris
/dev/sdc7            9055       14945    47319426   83  Linux

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0002c8fc

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *           1        2611    20972826   83  Linux
/dev/sdd2            2612       60572   465571732+  83  Linux
/dev/sdd3           60573       60801     1839442+   f  W95 Ext'd (LBA)
/dev/sdd5           60573       60801     1839411   82  Linux swap / Solaris

and here is menu.lst madeby Yast :slight_smile:
default 0 boots if helped with cd and is onlyone needed :smiley:

linux-z0zp:/boot/grub # cat menu.lst
# Modified by YaST2. Last modification on Tue May 19 10:59:08 EEST 2009
default 0
timeout 8
gfxmenu (hd3,0)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.1 - 2.6.27.21-0.1 (default)
    root (hd3,0)
    kernel /boot/vmlinuz-2.6.27.21-0.1-default root=/dev/disk/by-id/ata-ST3500630AS_6QG08CRG-part1 resume=/dev/disk/by-id/ata-ST3500630AS_6QG08CRG-part5 splash=silent showopts vga=0x314
    initrd /boot/initrd-2.6.27.21-0.1-default

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.1 - 2.6.27.21-0.1
    root (hd3,0)
    kernel /boot/vmlinuz-2.6.27.21-0.1-default root=/dev/disk/by-id/ata-ST3500630AS_6QG08CRG-part1 showopts ide=nodma apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x314
    initrd /boot/initrd-2.6.27.21-0.1-default

###Don't change this comment - YaST2 identifier: Original name:  openSUSE 11.1 - 2.6.27.21-0.1 (/dev/sda1)###
title openSUSE 11.1 - 2.6.27.21-0.1 (/dev/sda1)
    rootnoverify (hd0,0)
    chainloader +1

###Don't change this comment - YaST2 identifier: Original name:  openSUSE 10.2 (/dev/sdc7)###
title openSUSE 10.2 (/dev/sdc7)
    root (hd2,6)
    configfile /boot/grub/menu.lst

need some more info?

OK I think your problem is …
Did you change the disk order in bios after setting up?

Any way its not required…

You have it as the first disk now Grub is related to bios. Now you told it to boot first so if I was to guess hd3 is wrong…

To test at the first grub screen press esc to get to a non-graphical grub. Highlight the entry press e. Now change the root line to
root (hd0,0)
Now press b if that boots you need to change menu.lst to make it persistent.

“Did you change the disk order in bios after setting up?”

no. I left it as is :slight_smile:

go edit grub menuTo test at the first grub screen press esc to get to a non-graphical grub. Highlight the entry press e. Now change the root line to
root (hd0,0)
Now press b if that boots you need to change menu.lst to make it persistent. 

I think that haveto be done from booted system modify that hd, because computer halts to “grub error 2”. and if your hd 3,0/hd0,0 is right… why booting with cd brings me that grub what it should have and hd(3,0) works fine? I think hd order wont change no matter which one I boot cd or hd. am I right?

Anyway I give this a try, thanks for help.

mmm I presumed you got the choice of OS in grub to boot, then the error.

My fix is for a second part of grub failing if this is failing on the first bit then you need to reinstall the 1st bit of grub to the mbr of the first disk you’re using.

I’m wondering whether this has installed it to sda(As for how grub is seeing this can’t tell bios will tell you).

If the first bit use yast and reinstall grub but you need it to go to the mbr of the disc you’re booting first.

As for CD it won’t be looking for the menu.lst or any bits of grub from the HDD afaik. I guess it is looking for files and structure, then it asks you if it finds more than one linux distro which HDD.

hd 0,0 3,0 did not work.

"I guess it is looking for files and structure, then it asks you if it finds more than one linux distro which HDD. "

No it wont ask :slight_smile: it brings me grub menu what it should. it weird how cd knows which grub to load.

“you need to reinstall the 1st bit of grub to the mbr of the first disk you’re using.”

Yep… trying it, but only if it is only possible way. I don’t like that my hdd:s depends each other. There is possibility that one of disks broke or I just want one of then out of machine and it causes that I can’t boot without tricks’n tracks and reinstall of grub etc.

awww… problem solved.

It’s weird that I don’t remember that I would changed disk order from bios, but it seems that I had done that.

Changing sdd to place 3 did that as you told.
Still it is weird how thtat bootcd knew which grub to load. every disk has got somekind of grub tho :slight_smile:

thaks for help.

They don’t need to depend you have sooooo many ways…

It sounds like it is in the wrong mbr so a fix with yast should be the easiest.

As for ways…

1st disk 1st part on mbr another disk with OS 2nd part of grub.

Dedicated grub partition 1st disk 1st part mbr 2nd part same disk boot any disk/OS.

Same as first way then you could chain load and boot another OS from still another disk/OS.

Same as second way except you could chain load and boot second part of grub from other disk.

Every disk has individual grubs that you control by changing bios and even then each individual grub could still include the other disks/OS…

Grub on other media flashpen, floppy, CD again you could still make it more of a mess and point it to different places as the earlier examples.

Then you have the possibility to install the 1st part not into mbr(Don’t ask me never felt the need)

So no it doesn’t have to depend on another disk at the moment that is what you’re trying to fix. It has the 1st part on the disk you’re not booting first. When you’ve fixed it both parts will be on the same disk.

Edit
OK you solved it but the above should help you understand you can use grub many different ways. Grub has a 1st part that then finds the 2nd part. It was the first part it couldn’t find.