LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Win XP installation and Grub (https://www.linuxquestions.org/questions/linux-software-2/win-xp-installation-and-grub-384175/)

AndreiCiprian 11-17-2005 07:34 PM

Win XP installation and Grub
 
I have installed my Suse 9.2 version on a single hard disk with multiple partitions and a Win Xp OS at that time. Now due to a series of problems I was forced to format the Windows partition so as to reinstall the system.
I have set booting from cdrom first in bios and then expected to run the windows setup, yet grub starts all of the time.
I have read in the administrator's guide grub related issues. I have restored the previous MBR, yet I can't boot from the Win bootable CD.
Please help!!!

chemdawg 11-17-2005 07:46 PM

I've seen this before. Rather than try to boot from cdrom first, try removing your hd (not physically) as an option for boot (in the bios). In other words, you should have only one boot device listed in your bios, and that is your CDRom. You will still be able to access your hd, just not boot from it. After you are finished, just reboot and change your bios back. Most of the time this will work.

doralsoral 11-17-2005 08:04 PM

i had a similar if not exact same problem and i solved it by removing the makeactive line in grub.conf

AndreiCiprian 11-17-2005 08:41 PM

the makeactive line was already removed in the /etc/grub.conf
bios boot options are:
1.cdrom
2.cdrom
3.cdrom
so your hypotheses fall

Here's a listing of the files:
/etc/grub.conf
root (hd0,2)
install /grub/stage1 d (hd0) /grub/stage2 0x8000 (hd0,2)/grub/menu.lst
quit

/boot/grub/menu.lst
# Modified by YaST2. Last modification on Fri Nov 18 02:58:28 2005

color yellow/red white/light-orange
default 0
timeout 30
gfxmenu (hd0,2)/boot/message

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
root (hd0,0)
chainloader +1

###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE LINUX 9.2
kernel (hd0,2)/boot/vmlinuz root=/dev/hda3 vga=0x31a selinux=0 splash=silent resume=/dev/hda5 desktop elevator=as showopts
initrd (hd0,2)/boot/initrd

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE LINUX 9.2
kernel (hd0,2)/boot/vmlinuz root=/dev/hda3 showopts ide=nodma apm=off acpi=off vga=normal noresume selinux=0 barrier=off nosmp noapic maxcpus=0 3
initrd (hd0,2)/boot/initrd

/boot/grub/device.map
(hd0) /dev/hda

tinybit 11-18-2005 09:01 PM

GRUB and LILO always conflict with Windows.

So try GRUB for DOS please. It is a cross-platform boot loader based on GNU GRUB. The GRUB.EXE can be started from DOS/Win9x; and GRLDR can be started from BOOT.INI of Windows NT/2K/XP/2003; and even more, the GRUB.EXE can be started from LINUX via the KEXEC tool.

By using GRUB.EXE or GRLDR, you don't have to touch your MBR. It is the safest way coexisting with DOS/Windows.

You needn't install GRUB for DOS. Just run GRUB.EXE from DOS, or append a line of "C:\GRLDR=START GRUB" into your BOOT.INI(restart and select the "START GRUB" menu item), that will do.

Download GRUB for DOS here: http://freshmeat.net/projects/grub4dos/

There is a fat12grldr.img file with the GRUB for DOS release. You can create a GRUB bootable floppy with this fat12grldr.img file.

Or, you can just copy GRUB.EXE to your DOS floppy and run GRUB.EXE to enter the GRUB environment.

AndreiCiprian 11-22-2005 12:21 AM

Thank you very much, yet there are still 2 minor issues:
1. I don't have a boot.ini as my WinXP system has been erased, I only have SuSe now.
2. I don't use a floppy disk

tinybit 11-22-2005 01:44 AM

You may have a try with sbm.bin and memdisk(google could locate them). After download, boot from grub:

kernel (hdX,Y)/memdisk
initrd (hdX,Y)/sbm.bin
boot

This will give you a chance to boot your CDROM.

----------
Just in case you cannot enter grub:

I have noticed that you can boot to LINUX, so you may update your kernel to 2.6.13.1 or later and enable the KEXEC option. Download two utilities KEXEC and GRUB4DOS, and run this way:

kexec -l grub.exe
kexec -e

this will enter the grub environment and you can boot the memdisk and sbm.bin as stated above.

tinybit 11-22-2005 02:00 AM

BOOTCD.IMG is an alternative to SBM.BIN. If SBM.BIN failed, you may try BOOTCD.IMG:

kernel (hdX,Y)/memdisk floppy c=80 h=2 s=18
initrd (hdX,Y)/bootcd.img
boot

Google for "memdisk c=80 h=2 s=18" to get more examples.

download link for bootcd.img:
http://blog.linuxeden.com/resserver....rce=bootcd.img

AndreiCiprian 11-22-2005 05:22 AM

thanks a lot, i have tried to make a bootable cd option in grub but haven't succeeded.
as i was very irritated i purged the mbr to it's initial values.
too late.
i will try your alternative as soon as i get the chance.

tinybit 11-22-2005 05:44 AM

kernel (hdX,Y)/memdisk
initrd (hdX,Y)/sbm.bin
boot

if the size of sbm.bin is not 1.44MB, the above kernel line should be:

kernel (hdX,Y)/memdisk floppy c=80 h=2 s=18

I am sorry I am late too.

AndreiCiprian 11-23-2005 07:58 AM

Here's what I did:
I downloaded grub4dos.
Using the yast2 or yast menu in Suse I restored the MBR to the state prior to the Linux distribution install. Therefore when I boot grub doesn't start anymore. I finally managed to boot from cdrom and installed winxp.
Obviously xp started automatically. (power on self :-) )
While in xp I installed totalcommander and a plugin to view reiserfs and ext3 partitions. I backed up all my important files from Linux, archived
them,mailed them and copied them to the ntfs partitions.
I also copied the grldr and grldr.mbr files from the grub_for_dos-0.4.1pre32.tar.gz to my c:\ ntfs partition where winxp is installed. I opened c:\boot.ini and appended the following line
"C:\GRLDR=START GRUB" to the end of the file.
Now when I boot there are 2 options: XP and STARTGRUB.
When I choose STARTGRUB there I find the options in my /boot/grub/menu.lst

tinybit 11-23-2005 07:16 PM

Congratulations! Thank you for informing of the success.


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