LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   win XP won't boot EVERY time!! (https://www.linuxquestions.org/questions/linux-newbie-8/win-xp-wont-boot-every-time-528972/)

njac 02-14-2007 08:48 AM

win XP won't boot EVERY time!!
 
Hi ! at my workplace, i have 64bit machine with two ata hard discs. first is for win xp and second is for SUSE 10.1 and bootloader installed is GRUB. problem is that XP won't boot every time. it's thrue, sometimes it will, and sometimes it won't in dependence of how SUSE was shut down. when suse is in failsafe mode, and i swich off computer using 'halt' so that i have to turn it off with button, windows will boot next time. elsewhere, it will (when i select win in bootloader) just display text from grub's menu.lst file
chainloader(hd0,0)+1
I have tried many things, including grub configuring, but without sucess. grub is instaled on MBR. does it have something to do with ACPI?
i am waiting for your help,
thanks!

PTrenholme 02-14-2007 09:55 AM

The customary GRUB entry for an XP boot looks like this:
Code:

title WinXP
        rootnoverify (hd0,0)
        chainloader +1

Your chainloader (hd0,0)+1 should work, although the "noverify" part may be why GRUB is complaining.

Try a temporary edit when GRUB displays the chainloader message: Press the "e" key to open the editor, and replace the "chainloader" line with the two lines shown above (edit instructions a shown on the GRUB edit screen), and press "b" to boot from the temporary new lines. If they work, replace the single chainloader line in your GRUB configuration file with those two lines.

Another alternative is to use the XP boot loader, and set C:\boot.ini to offer Linux as an option. To do that:

1) Copy the current MBR to a file on the XP C: drive. If you've mounted the XP drive as, say, /mnt/WinXP/c, something like
Code:

sudo dd if=/dev/hda of=/mnt/WinXP/c/linux.bin b=512
should do the trick.

2) Boot XP (however you can do that) and edit C:/boot.ini to look like this:
Code:

$ cat /mnt/WinXP/c/boot.ini
[boot loader]
timeout=5
default=C:\linux.bin

[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP" /noexecute=optin /fastdetect
C:\linux.bin="Fedora"

(The timeout, default, and labels in quotes are all, of course, whatever you want to use. What you see are my choices, and suggestions only.)

3) Boot from your XP installation CD, go into rescue mode, and use the fixmbr to replace the GRUB MBR with XP's one.

4) Reboot, and -- if all goes well -- XP should boot and (if you used my values) after 5 seconds the GRUB boot screen should be displayed.

Note: I don't know if this will "fix" your problem. (Which sounds quite strange:scratch: -- how you shut down Linux should have no effect, whatsoever, on the MBR. It might have some effect your next Linux boot, but XP should be unaffected.)

skarland 02-14-2007 10:01 AM

Because Windows Xp needs to assume it is the first drive, otherwise it won't boot. So it's better to add the following in the /boot/grub/menu.lst

map (hd0) (hd1)
map (hd1) (hd0)

after Windows XP entry.

Quote:

Originally Posted by njac
Hi ! at my workplace, i have 64bit machine with two ata hard discs. first is for win xp and second is for SUSE 10.1 and bootloader installed is GRUB. problem is that XP won't boot every time. it's thrue, sometimes it will, and sometimes it won't in dependence of how SUSE was shut down. when suse is in failsafe mode, and i swich off computer using 'halt' so that i have to turn it off with button, windows will boot next time. elsewhere, it will (when i select win in bootloader) just display text from grub's menu.lst file
chainloader(hd0,0)+1
I have tried many things, including grub configuring, but without sucess. grub is instaled on MBR. does it have something to do with ACPI?
i am waiting for your help,
thanks!



All times are GMT -5. The time now is 02:02 PM.