LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-02-2004, 11:25 AM   #1
wriggles
LQ Newbie
 
Registered: Jan 2003
Location: UK
Distribution: Redhat 8.0, Fedora Core 1
Posts: 3

Rep: Reputation: 0
multiboot problems after restart


My computer hung a few night ago, so a hard reset was called for. The following happened.

A little background.
I have 2 hard drives (each on a raid channel). One 60 gig and one 20 gig.
The 60 gig -
10 gig windows 98 se installation
40 gig (2 * 20 gig) windows XP pro install
5 gig Redhat 8 (2 kernels)
5 gig unused

The 20 gig -
All used with a Fedora Core 1 install.

I use grub as the boot manager, with fall through to DOS (windows XP and 98) as the default boot if no user intervention.

Windows notation:
C: is windows 98
D: & e: are optical media drives
F: & g: are the windows xp partitions

Now, when I tried to boot DOS from the grub menu it gives me the following output

Booting 'DOS'

Rootnoverify (HD0,0)
Chainloader +1

It hangs for around 20 - 30 second and then I get

Error 13: Invalid or unsupported executable format.

Where i previously got the windows bootloader giving me the option of windows 98 or XP.

Which means that none of my windows installs would boot.
All my Linux installs are fine, the boot ok from the initial grub splash.
The grub.conf file is fine (I've checked it).
As far as I am aware grub is installed on the MBR (I think).

I have 2 thoughts on this.

1. I had a virus which killed my windows installs somehow.
2. When windows XP hung and I hit the reset button something in the window booting areas got corrupted.

I tried (as root)
mount -t vfat /dev/hde1 /mnt/hd1 while logged into fedora
Where hde is the windows 98 partition. I get the following error
Mount: wrong fs type, bad option, bad superblock on /dev/hde; or too many mounted file systems.

As I have not changed any mounting or added any distros in months I reckon something may have been corrupted in windows.


OK so here is what I did so far.

I have got it to the situation where I can boot XP from a boot floppy and Linux from grub, but still cannot boot xp from grub. Windows 98 is lost I'm afraid but that is not important or a big loss.


Firstly I created a grub boot floppy (in case I messed the MBR).
I then booted into the XP recovery console and ran fixboot on C: (windows 98 partition) and f: (windows XP partition). Then rebooted. This improved things in that when DOS was selected from grub the next screen was not a hang, it just complained that it couldn’t find ntldr (the windows XP bootloader). I messed around with grub to try to pick up the correct partition. The initial grub commands for moving to DOS where

Rootnoverify (hd0,0)
Chainloader +1

This would be fine, but I've lost windows 98 (it was on this partition).
The error is:
NTLDR missing
Press any key to continue.

XP is installed on (hd0,5). Altering the line rootnoverify with any value as the last bracketed number will not work (including (0,5)). Some values cause a hang, some reboot, some realise I is an unsupported partition (ext3).
I then realised ntldr, ntdetect.com and boot.ini files are all missing from the XP partition. I copied them from the XP CD to root directory (modified boot.ini to boot the correct area). Still no joy.
I realised that maybe if I put these onto the C: partition (which has been made available again although all windows 98 is lost) I can get it to boot, but this does not work either.
I then created an the XP boot floppy (copy those previously mentioned 3 files onto a floppy). XP boots OK from the floppy (this proves the boot.ini file is OK).

Note when I run up windows explorer in XP it cannot see the partition windows 98 was installed onto.

So the currently the situation is that I can run up all my linux installs from grub and XP from a boot disk, but windows 98 is lost (and the partition seems to be nessed up) and I am unable to get grub to locate the windows XP bootloader (ntldr).

I know that grub is looking for the ntldr file in the wrong location , but I did put the correct files onto C:. I suspect C: may be screwed. If I format C: will it mess up the MBR for that harddrive (since c: is the first partition on the hard drive)? Also if I run fixmbr (which i think rewrites the MBR for windows not grub) at the windows recovery console will I screw the lot? (when you execute the command fixmbr it currently tells me that the MBR is not standard and may be corrupt - I reckon that it is because grub has altered it). I can always run up fedora (it is on a different harddrive), but if I format the MBR on the XP drive and it is non standard, I have read that it can fubar the boot records for each partition on that harddrive.

I think what my ideal solution (apart from a format and clean install) would be to format C: without loosing the MBR etc. and then put the correct files onto c: for grub to find. I cannot understand why grub cannot find ntldr in the XP partition.

Note C: (the old windows 98 dir) is fat32, the 2 XP dirs f: & g: are NTFS while all the rest are standard ext2 & ext3.

Anyway if you have any ideas about this please post!
 
Old 09-02-2004, 12:38 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
If you install Win98 on C:\ - /dev/hda1 it will replace the boot record to boot Win98, then you can boot linux with your floppy or recovery cd and reinstall grub to the MBR, and set it up to chainload the other OS. To do this you need to setup the partition type as a recognized format for windows like dos or fat32 or delete it so it is free space. If it's already ok you should be able to install win98 to it. If not you can use fdisk to rewrite the partition info. Try fdisk -l /dev/hda to see what you have.
 
Old 09-03-2004, 02:09 AM   #3
wriggles
LQ Newbie
 
Registered: Jan 2003
Location: UK
Distribution: Redhat 8.0, Fedora Core 1
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for that David. I will give it a try as soon as I get my Win98 CD back!

A secondary (albeit related) question. If I want to, for example, install Gentoo onto that first partition instead of windows 98 (which I no longer want anyway), will I be able to chainload the Windows XP (format ntfs) that is located in the extended partition of the same harddrive.

Would the whole thing need to use the windows bootloader as the startup bootloader, dropping into grub after the choise between DOS and Linux, or can I use Grub still as the default.

Am I causing unnessessary problems by not just burning off all the stuff from Windows XP i want to keep (mostly for my girlfriends college course) and formatting the whole drive (Fedora is on a separate drive), installing Windows XP as say C: and D: (I like two partitions for windows), then leaving some room for other distros on the extended partition of that same disk?
 
Old 09-03-2004, 12:07 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
What you have on the Win98 partition space will not change the way XP boots, so you could put anything you want there. As long as the XP partition is intact there should not be a problem booting it from grub.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiboot problems Helskov Linux - Newbie 6 01-28-2005 10:01 PM
Multiboot problems craigs1987 SUSE / openSUSE 2 12-18-2004 09:04 AM
shutdown/restart problems PiLgRiM SUSE / openSUSE 1 11-10-2004 08:17 AM
problems with network after restart carlosruiz Linux - Networking 1 03-12-2004 08:19 PM
Problems using grub to multiboot amp2000 Linux - General 2 10-18-2002 12:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:28 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
Open Source Consulting | Domain Registration