LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GRUB not loading SUSE or Windows (https://www.linuxquestions.org/questions/linux-newbie-8/grub-not-loading-suse-or-windows-412405/)

Dougal 02-06-2006 07:12 PM

GRUB not loading SUSE or Windows
 
I have a Windows ntfs partition on my first HDD. And my second HDD has one slave partition to Windows, then a SUSE and swap partition on it. At first when I installed, it gave my error 17. But then I did the SUSE rescue system that "fixed" it. It tells me that there is an error in the GRUB conf files. But when I look at what it shows me, they are all right.

Now I just get a GRUB prompt, and nothing I type in seems to do anything. I've gone into SUSE before, but that was the first time after the install. I could probably get into it again trhough the installation CD, if it is needed. But I need to get into windows and set up GRUB.

There is probably more information need, if so, just ask.

Dougal 02-06-2006 07:46 PM

I'm gettong somewhere. I change my HDD parameters from Auto to large, because I think I heard someone talk about it. And it loads GRUB now, and I can boot into SUSE!

But when I choose Windows it says

"chainloader (hd0,0) +1"

And stops. Could it be booting the wrong partition?

AlanQ 02-06-2006 08:20 PM

Quote:

Could it be booting the wrong partition?
Yes.
Check what you've got in
Code:

/boot/grub/device.map
This will tell you what grub thinks is (hd0) and (hd1)

Also, you may need to 'map' the two devices so that Windows 'thinks' it's on the first disk -- it's temperamental like that.

Compare your enty in menu.lst with mine:

Code:

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdb1
title          Windows NT/2000/XP
root            (hd1,0)
map    (hd0)  (hd1)
map    (hd1)  (hd0)
savedefault
chainloader    +1

HTH
Al

Dougal 02-06-2006 09:16 PM

All the menu.lst said for Windows was,

Code:

title Windows
chainloader (/dev/hda0) +1

What should it be? Windows is installed on hda0 I think. First harddrive first partition.

AlanQ 02-06-2006 10:05 PM

That doesn't look right: /dev/hda0 ?
I'm used to using the 'usual' grub notation (hd0), (hd1,2), etc.

Try creating a device.map file.
Yours should look (something) like:
Code:

(hd0)  /dev/hda
(hd1)  /dev/hdc

The translation will be that
/dev/hda is (hd0)
/dev/hdc is (hd1)
/dev/hda1 is (hd0,0)
etc

Then, change your Windows entry to:
Code:

title          Windows
root            (hd0,0)
savedefault
chainloader    +1

Or maybe you need to point to the 'slave' partition?
In which case, perhaps root should be (hd1,0).

If it still doesn't work, add the 'map' lines like I have.

If you have no joy after that, have a read of the documentation at:
http://www.gnu.org/software/grub/

There are also good HOWTOs that cover dual-booting at:
http://www.tldp.org/

I've got to log-off now.
Re-post if you're still stuck.
If you fix it, post what worked, I'd like to know.

Cheers
Al

Dougal 02-07-2006 01:21 PM

My device.map looks like that, but with floppy, and hd1 is /dev/hdb. I don't know why you put c. So I wrote in exacly what you said into menu.list, and it gives me error 23, error while parsing number.

RedShirt 02-07-2006 01:50 PM

No, he was being kind of generic...

Partions work this way.

Devices can have 4 primary partitons(let's not get into extended or logical...)
IDE drives are
HDA
HDB
HDC etc
SATA and SCSI are
SDA
SDB etc

This deliniation is set by the bios's boot order. Now, assuming you have multiple partions on each drive, lets say all 4 you have something like hda1 hda2, hda3, hda4. Now, that goes for each device... hdb1, hdb2... etc.

So assuming you normal boot drive is hda on the 1st partion(hda1), grub sees that as (hd0,0)they start at 0, not 1.
So hda is hd0 and hda1 is the same as (hd0,0).

Are you in the grub CLI trying this? or recovery console you can use "grub" at? Then you could just tab and autocomplete paths to know for sure they are accurate.

AlanQ 02-07-2006 02:24 PM

Quote:

I don't know why you put c
It's typical for a system to have a CD/DVD drive at b.

OK. Lets start from square one.

Open a terminal (command line).
You will need to be root to do this
or use sudo
or use a root terminal
(I haven't used SuSE for some time.)

For each of your hard disks:
Code:

fdisk /dev/hda
similarly for hdb and any others you have.

When fdisk is running, type 'p'.
Copy the output and post it in a reply (between 'code' tags so it's easy to view).

Also post what's in your device.map file and all of your menu.lst.

Is your slave partition simply a mirror of your Windows partition, or something else?

Al

Dougal 02-07-2006 03:26 PM

First HDD

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        9066    72822613+  7  HPFS/NTFS

Second HDD

Code:

Disk /dev/hdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hdb1              1      10448    83915968+  7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/hdb2          10449      10579    1052257+  82  Linux swap / Solaris
/dev/hdb3          10580      14593    32242455  83  Linux


Dougal 02-09-2006 02:55 PM

You there?

RedShirt 02-09-2006 03:06 PM

You have 1 drive... (HDA1 and HDA1)"Both" are NTFS, which couldn't run linux. Please post the other drive.

Dougal 02-09-2006 05:07 PM

Sorry fixed it.

pljvaldez 02-09-2006 05:24 PM

I think the grub file should be:

title Windows
rootnoverify (hd0,0)
makeactive
chainloader +1

Dougal 02-09-2006 05:55 PM

that did not work pljvaldez. Didn't even give me an error. Just sat there with root and makeactive code.

pljvaldez 02-09-2006 05:58 PM

Maybe remove the makeactive... The rootnoverify I think needs to be there since it's NTFS...


All times are GMT -5. The time now is 08:01 AM.