LinuxQuestions.org
Register a domain and help support LQ
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 02-01-2005, 05:09 AM   #1
jarnix
LQ Newbie
 
Registered: Jan 2005
Distribution: Mandrake 10.0
Posts: 4

Rep: Reputation: 0
Configuring XP boot.ini for Dual Boot


I did a little digging on this topic before I posted this question, because everyone seems to have the nt/linux dual boot issue and I didn't want to beat a dead horse, but I wasn't able to find anything that really answered my question.

Here's what's going on. After a little hassle, I finally got ubuntu 4.10 and XP installed on my computer. I have ubuntu on my 10 gig primary and XP on my 80 gig slave. I was able to get both to boot by doing a little research, editing my grub.conf file, and then copying ntdetect.com and ntldr back onto my XP drive after installing ubuntu. I can get into XP and ubuntu, which has me very very happy.

However...

Windows complains when I boot that there isn't a boot.ini file. My question is, how would I write a boot.ini file for xp so that it doesn't give me that error message, or do I even need to? Would making a new boot.ini mess up grub?

Just in case...here's my fdisk/grub:

##########

title Ubuntu, kernel 2.6.8.1-3-386
root (hd0,0)
kernel /boot/vmlinuz-2.6.8.1-3-386 root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.8.1-3-386
savedefault
boot

title Ubuntu, kernel 2.6.8.1-3-386 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.8.1-3-386 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.6.8.1-3-386
savedefault
boot

title WindowsXP
rootnoverify (hd1,0)
makeactive
map (hd0,0) (hd1,0)
map (hd1,0) (hd0,0)
chainloader +1
boot

title Memory test
root (hd0,0)
kernel /boot/memtest86+.bin
##########

##########
Disk /dev/hda: 10.0 GB, 10005037056 bytes
16 heads, 63 sectors/track, 19386 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 18522 9335056+ 83 Linux
/dev/hda2 18523 19386 435456 f W95 Ext'd (LBA)
/dev/hda5 18523 19386 435424+ 82 Linux swap

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 9728 78140128+ 7 HPFS/NTFS
##########

Thanks,
Jeremy
 
Old 02-01-2005, 05:36 AM   #2
PhilDEE
LQ Newbie
 
Registered: Dec 2004
Location: Sydney, Australia
Distribution: Fedora Core 3 & Ubuntu 4.10
Posts: 19

Rep: Reputation: 0
I was originally going to post this in Linux - General but because of my low post count was unable to post the URLs (I hope bypassing this rule doesn't get me in trouble from the moderators/admins):

Hello. Im actually a almost complete Linux so please don't flame me if I have posted something many people already know or if this is in the wrong section.

Prior to installing Fedora Core 3 I thought I'd search Google for some effective methods to dual boot Windows with a Linux install (especially to keep Windows on the MBR to prevent problems in Windows). I came across several methods but this one is the one I am using right now (and it works great!).

First off read this HOWTO:

www dot geocities dot com slash epark slash linux slash grub-w2k-HOWTO dot html

It shows how to dual boot with Windows 2000 (XP is pretty much identical) while using grub and maintain Windows on the MBR so you can use the Windows boot menu to boot to either system. The lower section of the guide is the more complex method in my opinion though as I have found other sites that make the process simpler.

A tutorial to triple boot Windows 2000/XP, Windows 98, Linux:

www dot tweak3d dot net slash articles slash multibootlinux slash

Most of us will not want to install Windows 98 so anything relating to that can be ignored if you wish. I have done a Windows 98 install in the past on this system and it worked well, although i got rid of it as it had no hardware support etc. The most important parts of the guide relate to using the program BootPart which can be found here:

www dot winimage dot com slash bootpart dot htm

BootPart is a great proggy that makes dual (or multi) booting much simpler even with Windows on the MBR. Non-Microsoft operating systems can be placed on the Windows XP/2000 boot menu.

I hope this all makes your dual booting experience simpler.

Last edited by PhilDEE; 02-01-2005 at 05:44 AM.
 
Old 02-01-2005, 05:40 AM   #3
PhilDEE
LQ Newbie
 
Registered: Dec 2004
Location: Sydney, Australia
Distribution: Fedora Core 3 & Ubuntu 4.10
Posts: 19

Rep: Reputation: 0
I tried to edit my post to make an adjustment but it doesn't seem to work. I'm still not used to how this board operates. Anyway I meant to say that unfortunately I'm also not entirely sure how relevant this is after looking back on your post a second time.

Edit: Ahh wait I didn't realise the buttons are at the bottom. Sorry.

Last edited by PhilDEE; 02-01-2005 at 05:41 AM.
 
Old 02-01-2005, 06:15 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,429

Rep: Reputation: 1055Reputation: 1055Reputation: 1055Reputation: 1055Reputation: 1055Reputation: 1055Reputation: 1055Reputation: 1055
Re: Configuring XP boot.ini for Dual Boot

Quote:
Originally posted by jarnix
Here's what's going on. After a little hassle, I finally got ubuntu 4.10 and XP installed on my computer. I have ubuntu on my 10 gig primary and XP on my 80 gig slave. I was able to get both to boot by doing a little research, editing my grub.conf file, and then copying ntdetect.com and ntldr back onto my XP drive after installing ubuntu.
Bleh !!! - don't understand the reason for this copying. And where did you copy it from ???.
Maybe you should illuminate the world as to your "little hassle".
Quote:
Windows complains when I boot that there isn't a boot.ini file. My question is, how would I write a boot.ini file for xp so that it doesn't give me that error message, or do I even need to? Would making a new boot.ini mess up grub?
Don't screw with installs
Me, I'd put the map's before the rootnoverify, but shouldn't affect XP - that doesn't enter the picture until grub chainloads it.
The bootloader is the guy looking for the boot.ini - needs to be in the c:\ directory. To see it from Windows you need to select options to show hidden files AND not hide system critical files.
You could use Notepad to create one in need - hopefully it will be found just by being located in C:\
grub couldn't care less - it has transferred control by the time this is used.
With the drive mapping you have, you might try something like;
Code:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP" /fastdetect /NoExecute=OptIn
Just saw PhilDEE's post(s) - remember in this case Windows is not on the primary disk.
Messes up Windoze no end.
 
Old 02-01-2005, 09:05 AM   #5
jarnix
LQ Newbie
 
Registered: Jan 2005
Distribution: Mandrake 10.0
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the replies, I'll let you guys know how it works when I get it done later on tonight.

As far as the hassle goes, when I installed ubuntu I erased the 10 gig drive with the partitioning tool, so the xp boot record got overwritten. Every time I tried to boot into xp I'd either get an error message about ntldr or ntdetect and I'd have to restart.

Perhaps my solution isn't the most efficient way, but I am also very much of a Linux noob so right now I just care about getting it to work!

Thanks again for the insight.
 
Old 02-02-2005, 03:37 AM   #6
loikuazjo
LQ Newbie
 
Registered: Dec 2004
Location: Vietnam
Distribution: Slackware 9.0
Posts: 3

Rep: Reputation: 0
I wondered whether my reply here is late to you

Firstly, please install Linux first, then configure your Linux loader (maybe GRUB of LILO - depends on your choice). If you don't do this, please be pretty sure that you have had a decision to install the Linux loader onto the FIRST SECTOR OF LINUX PARTITION. If you install Linux to MBR, you won't be able to have a dual boot normally and easily.

1, When you install Linux (insome release such as Mandrake, Redhat, and Slackware) you will be prompted to choose where you want your boot loader is installed. Please read the Release Notes carefully (especially for newbie) and you will notice that they recommended installing it on FIRST SECTOR OF LINUX PARTITION in order to config a dual boot.

2, Login into Linux as root and issue the following command
#dd if=/dev/hdxx bs=512 count=1 of=/mnt/mountpoint/lnxboot

/dev/hdxx: Your Linux partition
/mnt/mountpoint: Your NTFS mountpoint (assume that your kernel was re-configured so that it can read NTFS systems)

3, Once again, assume that you have re-compiled your kernel to enable your system to read a NTFS system. Let's do this:

#cd /mnt/mountpoint
(Go into your NTFS system)

Edit your BOOT.INI file to a form similar to this (of mine)

# -------------------------------------------------------------------------------------------------------------------

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Professional" /fastdetect
C:\lnxboot="Slackware Linux 8.0 For Hackers"

# -------------------------------------------------------------------------------------------------------------------

So, all you have to do now is testing. Wish you success!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Dual boot XP(internal IDE HDD) Debian(external USB-IDE HDD) using boot.ini PolarDog Linux - Laptop and Netbook 2 07-01-2005 10:50 PM
Dual Boot - XP & Suse 9.1 - Need help with boot.ini johnnytriumph Linux - Newbie 1 04-05-2005 07:18 AM
Using dual boot with boot.ini and grub? Darrell22 Programming 1 12-07-2004 06:26 PM
Dual Boot Win2000Pro & RH 8 w/Boot.ini JinxU1 Linux - Newbie 9 01-31-2003 10:49 PM
Editing boot.ini for dual boot nixdisciple Linux - General 1 06-02-2002 12:40 PM


All times are GMT -5. The time now is 10:58 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration