Jump to content











Photo
- - - - -

Problem getting W98 to boot with Grub4DOS


  • Please log in to reply
12 replies to this topic

#1 VeeDub

VeeDub

    Frequent Member

  • Advanced user
  • 140 posts
  •  
    Australia

Posted 28 June 2007 - 04:02 AM

Hi,

This is a fairly straight-forward configuration and I don't why I am having troubles getting W98 to boot, but I have done some reading and feel like I must be missing something obvious so thought I would post what I have tried so far.

Computer has 3 primary partitions

WIN98 1GB
XP 18GB System
Extended Partition 60GB DATA

If I don't use Grub I can boot Win98 fine. However I can't access WinXP.

If I use Grub I can boot XP fine, but I cannot boot W98, had a range of errors - latest error is:
Error 14: Invalid or unsupported executable format

Menu.lst
color white/blue black/light-gray

timeout 5



title Windows XP

find --set-root /ntldr

chainloader /ntldr



title Windows 98

root(hd0,0)

chainloader /IO.SYS

Suggestions would be helpful. Thanks.

VW

#2 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 28 June 2007 - 07:58 AM

If I don't use Grub I can boot Win98 fine.

HOW?

As always with grub/grub4dos, try troubleshooting in command line (press c) and inputting commands one by one, as to have some feedback.

However try this:

title Windows 98
find --set-root /IO.SYS
chainloader /IO.SYS


Please describe also more the situation of your partitions:
type (06-07-0b-0c-0e)
Active status
Is it First disk

Computer has 3 primary partitions

WIN98 1GB
XP 18GB System
Extended Partition 60GB DATA

Actually that makes two Primary ones + one volume inside Extended partition

Having more than one Primary partition could be part of the problem, (though I don't think that it applies to Win98) check this:
http://www.msfn.org/...showtopic=85729

jaclaz

#3 VeeDub

VeeDub

    Frequent Member

  • Advanced user
  • 140 posts
  •  
    Australia

Posted 28 June 2007 - 11:37 AM

HOW?

I am loading Grub in the Win98 partition, if I remove Grub, then Win98 boots fine. But of course without Grub I have no way to get to XP.

As always with grub/grub4dos, try troubleshooting in command line (press c) and inputting commands one by one, as to have some feedback.

However try this:
Please describe also more the situation of your partitions:
type (06-07-0b-0c-0e)
Active status
Is it First disk

I'll check on the type of the partitions shortly and update this post.
There is one physical disk which contains the two primary partitions plus the extended. The partitions are in the order outlined (i.e. Win98 is the first partition and Win98 is the Active partition).

title Windows 98

find --set-root /IO.SYS

chainloader /IO.SYS
This is actually the menu entry I tried to start with, it does not work either and the output is quite strange
find --set root /IO.SYS

(hd0,0)

Filesystem type is ntfs, partition type 07

chainloader /IO.SYS

Error 14: Invalid or unsupported executable format
The filesystem is FAT32.

VW

#4 VeeDub

VeeDub

    Frequent Member

  • Advanced user
  • 140 posts
  •  
    Australia

Posted 28 June 2007 - 12:26 PM

I think the partition info as per Grub sheds some light on what has been causing the behaviour, but I don't really understand why it reports the partition layout as it does.

According to Grub4dos the partition layout is

0 ntfs
1 ntfs
2 fat

VW

#5 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 28 June 2007 - 12:32 PM

Well, use either beeblebrox or ptedit32 and check that the actual partition entries are in the CORRECT order in the MBR.
Make ACTIVE the FAT32 partition.

jaclaz

#6 VeeDub

VeeDub

    Frequent Member

  • Advanced user
  • 140 posts
  •  
    Australia

Posted 28 June 2007 - 12:38 PM

Well, use either beeblebrox or ptedit32 and check that the actual partition entries are in the CORRECT order in the MBR.
Make ACTIVE the FAT32 partition.

jaclaz

FAT32 is definitely the Active partition, which is why Win98 boots OK if I remove Grub4dos from the autoexec.bat

But I will check the partition entries, because what is being reported by Grub looks wrong to me.

I am also going to try using (hd0,2) for Win98 and see what happens.

Thanks for your help.

VW

#7 VeeDub

VeeDub

    Frequent Member

  • Advanced user
  • 140 posts
  •  
    Australia

Posted 28 June 2007 - 12:58 PM

ptedit32 confirms that the MBR Partition Table is not in sequential order. It does not allow me to update however, but now that I know what is wrong I can fix it.

Cheers

VW

#8 VeeDub

VeeDub

    Frequent Member

  • Advanced user
  • 140 posts
  •  
    Australia

Posted 29 June 2007 - 12:10 AM

@jaclaz

Turns out this is not as straightforward as I thought.

Attached is a screenshot of the Partition Table. [attachment=2408:PartitionInfo.bmp]

Here is the beeblebrox screenshot of the same MBR [attachment=2409:Beeblebrox.bmp]

I thought it would simply be a matter of changing the order of the entries to the following:

- row 2 details were entered into row 0
- row 0 details were entered into row 1
- row 1 details were entered into row 2

I did this and then restarted the computer.

Grub4dos would try and restart the W98 installation, but return to the Grub menu. I worked through the commands manually and the correct partition was being identified and selected but W98 would not start. No error message.

The situation with XP was not so good. Again Grub correctly identified the partition, but XP fell over during startup with
Windows could not start because the following file is missing or corrupt Windows root\system32\hal.dll

I had a look at the partition using a boot disk and the file seemed intact although I noticed that the XP SYSTEM partition was now being reported as D: instead of C:. So I hid the W98 partition but no change.

I've since restored the MBR back to the above.

VW

#9 windrv

windrv

    Member

  • Developer
  • 86 posts
  •  
    China

Posted 29 June 2007 - 08:35 AM

@VeeDub,

If you have restored your MBR to the original state, may be you could try each of the following to see which suits you:

title boot 1st partition boot-sector
root (hd0,0)
chainloader (hd0,0)+1

title boot 2nd partition boot-sector
root (hd0,1)
chainloader (hd0,1)+1

title boot 3rd partition boot-sector
root (hd0,2)
chainloader (hd0,2)+1

You could also install disklessangel to use the partition editor to find out on which partition your Win98 or XP lies.

You may also wish to put your question(s) about using grub4dos to:

http://www.znpc.net/forum/

where the main grub4dos developers could further assist you.

#10 VeeDub

VeeDub

    Frequent Member

  • Advanced user
  • 140 posts
  •  
    Australia

Posted 30 June 2007 - 05:40 AM

@VeeDub,

If you have restored your MBR to the original state, may be you could try each of the following to see which suits you:

title boot 1st partition boot-sector
root (hd0,0)
chainloader (hd0,0)+1

These commands select the NTFS partition with XP on it. This is because the partition info in the MBR is out of sequence.

title boot 3rd partition boot-sector
root (hd0,2)
chainloader (hd0,2)+1

These commands select the Win98 partition. When I boot this partition I get Grub4dos, as this is the partition that boots Grub4dos.

If I change the chainloader statement to
chainloader /IO.SYS
I still get Grub4dos rather than W98.

Putting aside the issue that there is a problem with the MBR which causes Grub4dos to see the partitions in a "strange" order I think the reason that I am having trouble starting W98 (i.e. win.com) is that when I issue the command
chainloader /IO.SYS
that is loading the config.sys / autoexec.bat on the W98 partition (and these files are configured to load Grub4dos). I think the chainloader statement is working as intended, but I need a method of selecting the Win98 partition and loading win.com rather than config.sys & autoexec.bat

You may also wish to put your question(s) about using grub4dos to:

http://www.znpc.net/forum/

where the main grub4dos developers could further assist you.

Thanks for the link.

VW

#11 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 30 June 2007 - 07:47 AM

@Veedub

Well, of course you CANNOT change JUST the Partition order in the partition table, you MUST ALSO change the data (Hidden sectors) in the corresponding bootsectors or "boot records".

This info can only be seen by beeblebrox, but not edited.

On the contrary PTEDIT32 can edit this info as well (please note that the screenshot you posted is from Partition Info, NOT from PTEDIT32)

Apart from leaving the partitions as they are or attempting fixing their order, you might want to radically change the way grub4dos is started.

If I get it right, you are using a line in either config.sys or autoexec.bat on the "Win98" partition to start the DOS GRUB.EXE program. This is WRONG, in the sense that it greatly limits the amount of features that you can use.

You should use the grub4dos loader "grldr".

Here is a possible howto:
1) backup the files on the current win98 partition on stick
2) format the partition from within a 2K/XP/2003 system
3) restore the backed up files
4) remove from the restored files (either autoexec.bat or config.sys) the line(s) invoking grub.exe
5) copy to the partition:
a- the grldr file from grub4dos
b- a copy of NTLDR coming from a 2K/XP/2003
c- a boot.ini file with these contents (copy and paste):
[Boot Loader]

Timeout=5

Default=C:\grldr

[Operating Systems]

C:\grldr="Start GRUB"

Try booting from the stick, you should be in the exact same situation as before, with the difference that this time grub4dos is loaded WITHOUT loading DOS (and autoexec.bat/config.sys) BEFORE, so that the chainloader /IO.SYS entry in menu.lst will access a plain DOS/W98 environment

If everything works as expected, you can "refine" your starting environment in three ways:
1) Install the grldr.mbr (see grub4dos docs)
2) try Spacesurfer's "trick" of renaming NTLDR to something else and renaming grldr to NTLDR
3) try using my batch file here:
http://www.boot-land...EASE-t2362.html
to change the bootsector invoking NTLDR to one invoking directly grldr

jaclaz

#12 VeeDub

VeeDub

    Frequent Member

  • Advanced user
  • 140 posts
  •  
    Australia

Posted 30 June 2007 - 01:06 PM

@jaclaz
A little bit of knowledge can be dangerous (at least in my case)

Good thing I made a backup of the Partition Info before I started :1st:

If I get it right, you are using a line in either config.sys or autoexec.bat on the "Win98" partition to start the DOS GRUB.EXE program. This is WRONG, in the sense that it greatly limits the amount of features that you can use

Afraid so, and this is why I have been having so much "fun" getting the W98 GUI to start. That and the fact that the partition order is messed up, which makes the Grub4dos selection arse-about, although frankly once you know what is going on you can work-around that.

I understand your post, thanks for the step-by-step, I should be right from here.

I have learnt a few things so the exercise hasn't been a complete waste of time (for me anyway).

Cheers

VW

#13 windrv

windrv

    Member

  • Developer
  • 86 posts
  •  
    China

Posted 03 July 2007 - 12:57 AM

Without having to make so much change, you can easily try to modifiy your config.sys & autoexec.bat so that it presents a menu of choices for you select. In that way, you can use one menu choice to select grub.exe and another to select win.com, etc.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users