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 - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-29-2003, 03:59 PM   #1
jpence
LQ Newbie
 
Registered: Jan 2003
Location: Fullerton, CA
Distribution: Fedora 32
Posts: 7

Rep: Reputation: 0
RedHat 9 Install Somehow Corrupted WinXP Boot


Recently, I installed RedHat 9 in place of Suse 8.1 on my laptop, on which I also have WinXP in a dual boot arrangement. The configuration with SuSE was using LILO in the active partition, with an option in the LILO config to boot Windows.

During the RH installation, I chose to use Grub as the boot loader. After finishing the install, nothing would boot, so I created a boot floppy and was able to successfully get RH9 up and running. I was also able at least once to boot Windows using the same boot floppy.

The partitions are as follows:
hda0 Windows Fat32
hda1 Linux /boot
hda2 Linux /
hda3 Windows extended
hda4 Linux swap

The next step was to eliminate the need for the boot floppy. I tried using Grub's setup command on hda0. This turned out to be a big mistake, as I can no longer boot from that partition. The system only says "disk error".

It turned out that by booting WinXP's recovery console and using their "fixmbr" command, the system finds the linux boot partition, and starts Grub with no problems. But the damage has already been done to the windows partition, and I cannot get it to boot.

I have no trouble reading the files on the windows partition from Linux and from the Windows recovery console, so I know that the damage is limited to the boot process.

Does anyone know what kinds of changes Grub's setup command makes, and how to reverse them? Or more generally, how to recover my lost ability to boot Windows?
 
Old 07-29-2003, 07:13 PM   #2
pxlpluker
LQ Newbie
 
Registered: Jul 2003
Posts: 13

Rep: Reputation: 0
How to solve this problem?
Boot from the win Install CD and choose Repair Instalation or something like that. Press "c" for console prepair. In console there are few commands you can use for repairing. Type 'chkdsk /R' and wait few hours depending on how big your HDD is. Then type 'fixboot X:' where X is your boot partiton and try to reboot. If there is still blue screen switch back to rescue command line and type 'fixmbr'.

search google 'repair boot record winxp'

if that doesnt work. it should. get a win95/98 boot (or xp cd) floppy and boot to it. then do whats called a dirty install and reinstall xp without formating. it will FIX the boot record. read grub/lilo docs to see how to duel boot with MS nt kernal os. its pretty easy to do (with directions)
 
Old 07-29-2003, 07:54 PM   #3
pxlpluker
LQ Newbie
 
Registered: Jul 2003
Posts: 13

Rep: Reputation: 0
ripped from http://snakefoot.fateback.com/tweak/winnt/install.html

18. Installing Recovery Console in Win2k/XP Post Comment
This is probarly something you will only think of when the accident has happened, and your Windows is not working anymore. (Like creating the Emergency Recover Disks)
But if you are smart then you can install Recovery Console, so you can pick it in the standard boot menu without needing to make boot disks or have the Windows CD-ROM around.

Inside Windows run the following command (X: is your CD-Drive containing the Windows CD-ROM)
X:\i386\winnt32.exe /cmdcons

Even though one haven't installed the Recovery Console locally one can still access the Recovery Console by booting from the Windows CD-ROM or floppy disk. Just press F10 when the screen says "Welcome to Setup".

Note one still need to have a floppy disk with 3rd party drivers for SCSI and such, when booting with the Recovery Console.

Note that if the system drive is mirrored, then you need to break the mirror before installing Recovery Console and then create the mirror again with Disk Administrator.

Note that the NT5 recovery console can also be used on NT4 installations.

Some of the better commands in the Recovery Console :

FIXBOOT - which allows you to restore the boot sector in case another OS like Win98 has overwritten it
FIXMBR - which allows you to restore the master boot record(MBR) in case a virus or similar has corrupted it
DISKPART - which allows you to partition you hdd (Similar to FDISK in DOS)
LISTSVC - when launched in the WINNT\SYSTEM32 folder it will show the services installed on the machine
DISABLE <service name> - when launched in the WINNT\SYSTEM32 folder it will disable the service (Which might keep your system from booting)
ENABLE <service name> - when launched in the WINNT\SYSTEM32 folder it will enable the service (Which might enable your system to boot)
BOOTCFG - which makes it easier to configure the boot manager boot.ini (WinXP+ only). More info MS KB Q291980 More info MS KB Q317521
Note one can lessen the security for the recovery console to have easier access. Run "secpol.msc" and go here "Local Policies" -> "Security Options"
"Recovery Console: Allow Automatic Administrative Logon" : Then you don't need to remember your admin password (People still need to get physical access to the machine)
"Recovery Console: Allow floppy copy and access to all drives and all folders" : To give you access to the whole machine
 
Old 08-17-2003, 05:01 AM   #4
darkknight_9
Member
 
Registered: Dec 2002
Distribution: Fedora Core 3
Posts: 34

Rep: Reputation: 15
I have exactly the opposite problem. After a new installation of Windows, my GRUB boot loader is missing. It was originally installed into the MBR. Is there anyway I can fix this problem without installing RH9 all over again?
 
Old 08-17-2003, 07:50 AM   #5
pxlpluker
LQ Newbie
 
Registered: Jul 2003
Posts: 13

Rep: Reputation: 0
you could just install grub. to MBR. but then xp would not start. NT kernal must have the MBR.
you can make a boot disk from an image using rawwrite and make a linux boot image boot to RH and reinstall grub to MBR.
or; you could burn a knoppix image to a blank cd and boot fro that. though i personally am having a problem with knoppix right now. it wont load on my PC.
 
Old 08-17-2003, 09:22 AM   #6
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Quote:
but then xp would not start. NT kernal must have the MBR.
Not true.
GRUB (or Lilo) can boot any windows OS.
You will have to make modifications in the configuration file -> /boot/grub/grub.conf.
There are many threads on LQ concerning windows and GRUB.

When you install any windows OS on a hard drive, windows will overwrite the MBR and install its bootloader.

To install GRUB in the MBR, type:
Code:
/sbin/grub-install /dev/hda
If you do not have a boot disk, you can use the RedHat CDs to boot in Rescue Mode.
http://www.redhat.com/docs/manuals/l...mode-boot.html
 
Old 08-17-2003, 09:57 AM   #7
darkknight_9
Member
 
Registered: Dec 2002
Distribution: Fedora Core 3
Posts: 34

Rep: Reputation: 15
thx a lot guys .. yeah .. I knew that GRUB could load Windows OSs.. but I couldn't get GRUB-INSTALL to work ... I tried the exact same command but it didn't work .. anyway my solution was:

1. Run the Linux installer in upgrade mode
2. Install just a kernel package (so that the loader would install)
3. Re-install GRUB.
 
Old 09-03-2003, 08:38 PM   #8
troyzeng
LQ Newbie
 
Registered: Jul 2003
Location: PR China
Posts: 6

Rep: Reputation: 0
Way to fix GRUB after new installations of Windows

Hi, darkknight_9!

The problem with your system was exactly mine yesterday.

Just boot your RH9 using a boot disk or installation cd (type vmlinuz root=/dev/hd?? when you get boot:, /dev/hd?? is your root (/) partition). Then edit the file /etc/grub.conf. There should be 2 parts, one for RH9, another for WinXP. They are something similar with the following:

default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
password --...

title Red Hat Linux 9 ...
root (hd0,0)
kernel /vmlinuz-2.4.8-3.2 ro root=/dev/hda7
initrd /initrd-2.4.8-3.2.img

title Windows XP
rootnoverify (hd0,2)
chainloader +1

Note things like (hd0,2) and /dev/hda7, and modify them as your situation. They are critical parts!!

The next step is to reinstall GRUB:
# cd /sbin
# grub-install /dev/hda (Or /dev/hdb according to your situation)
If any errors occured, try:
# grub-install --recheck /dev/hda

After successful installation of GRUB, just get out the boot disk or cd and reboot your system. Then you would get the GRUB interface. Cheers...

Last edited by troyzeng; 09-03-2003 at 08:42 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 3/winXP corrupted partition tables frankinmerth Linux - Newbie 4 04-13-2005 04:06 PM
Re-install corrupted windows on dual-boot pete-wilko Linux - Newbie 3 04-28-2004 12:46 PM
Redhat 9 & winxp dual boot -xp won't boot opivy Red Hat 3 01-02-2004 01:08 PM
MBR corrupted when dual booting WINXP and RH 7.3 cliveleung Linux - Hardware 3 06-19-2003 04:05 PM
Using GRUB to boot RedHat and WinXP monroepq Linux - Newbie 6 05-28-2002 03:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:56 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