LinuxQuestions.org
Help answer threads with 0 replies.
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 08-30-2003, 03:38 AM   #1
mobassir
Member
 
Registered: Jul 2003
Location: Pakistan
Distribution: Redhat , SME
Posts: 346

Rep: Reputation: 30
Arrow how can i add windows xp in Linux boot loader


Hello

Red hat linux 9 is ruing in my 18GB SCSI hard disk on p-4 machin.
now just i install windows xp on a 60gb seagate ide hard disk.

i can run both OS, but its requier Boot slection from board bios .

1- how i can add windows xp in Linux boot loader (i have lilo)
2-how can add linux in microsoft boot loader

thanks for all
 
Old 08-30-2003, 04:33 AM   #2
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
A typical entry for XP in LILO's config file lilo.conf would be

other = /dev/hda1
table = /dev/hda
label = WindowsXP

I'm not sure which channel/partition your XP is on - however -

Linux sees IDE drives like this:

/dev/hda - drive on primary master channel
/dev/hdb - primary slave
/dev/hdc - secondary master
/dev/hdd - secondary slave
 
Old 08-30-2003, 05:24 AM   #3
mobassir
Member
 
Registered: Jul 2003
Location: Pakistan
Distribution: Redhat , SME
Posts: 346

Original Poster
Rep: Reputation: 30
i add above lines in /etc/lilo.conf in the end of all text.
but it does not show any windows option in lilo jut display RedHat-9.

here is my default lilo.conf where should i type above command
i tried it two places "(2nd time i type here) (1st time i type here)
"

prompt
timeout=50
default=redhat-9
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
message=/boot/message
liner

(2nd time i type here)

image=/boot/vmlinuz-2.4.20-8
label=redhat-9
initrd=/boot/initrd-initrd-2.4.20-8.img
read-only
append="hdc=ide-scsi root=LABEL=/"

(1st time i type here)


thanks
 
Old 09-01-2003, 04:31 AM   #4
mobassir
Member
 
Registered: Jul 2003
Location: Pakistan
Distribution: Redhat , SME
Posts: 346

Original Poster
Rep: Reputation: 30
i also tried to adding linux in Xp loader but it fails.
and i used following methord.
here is detail oh drives with df -h command

Filesystem Size Used Avail Use% Mounted on
/dev/sda2 17G 3.9G 12G 26% /
/dev/sda1 99M 9.1M 85M 10% /boot
none 125M 0 125M 0% /dev/shm
/dev/hda5 42G 19G 23G 45% /mnt/Data-Drive

dd if=/dev/sda1 of=/bootsect.lnx bs=512 count=1

mount -t msdos /dev/fd0 /mnt
copy /bootsect.lnx /mnt
umount /mnt

then i copy bootsect.lnx file to root of windwos xp boot partition add following command for linux

[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="Microsoft Windows XP Professional" /fastdetect

c:\bootsect.lnx ="RedHat Linus 9"



and i also tried to use creating a bootsect.lnx file for sda1 and sda
with sad 2 and sad its do nothing just courser blinks and with sda1 its show lilo and its scroll down .

waiting for positive reply
any one can solve this with any option , xp in lilo or linix in xp loader

thanks and regards
 
Old 09-01-2003, 04:50 AM   #5
jago25_98
Member
 
Registered: Jun 2001
Posts: 302

Rep: Reputation: 30
dd method

you can image the boot section of Windows with

"dd if=/dev/win of=/boot/file.img bs=512 count=1"

and use that somehow I think also. Handy because then if win boot gets wiped you're ok i think?

nb:

- keep a linux bootdisk handy (grub especially)
- from DOS / Windows cd: "fdisk /mbr" blanks the mbr
 
Old 09-01-2003, 06:19 AM   #6
mobassir
Member
 
Registered: Jul 2003
Location: Pakistan
Distribution: Redhat , SME
Posts: 346

Original Poster
Rep: Reputation: 30
i sorry i could not understand , u mean that i should copy windows boot section as image, and add it in lilo?

please see above post #3 and guied me for that also

thanks
 
Old 09-01-2003, 08:26 AM   #7
wrw3
LQ Newbie
 
Registered: Aug 2003
Location: Dallas, TX
Distribution: RH
Posts: 16

Rep: Reputation: 0
Mobassir,

After editing your lilo.conf file, did you run the /sbin/lilo command prior to trying to use it? I did not see any mention of that step in your comments.

Check out man lilo, and consult the lilo mini-HOWTO here:
http://en.tldp.org/HOWTO/LILO.html

Cheers,
wrw3
 
Old 09-01-2003, 08:50 AM   #8
bensonlee
LQ Newbie
 
Registered: Aug 2003
Location: Philippines
Posts: 3

Rep: Reputation: 0
i am using bayanihan linux what i did to add Winxp to the booting sequence is this:

**appended this to the grub.conf file**


title Windox XP
root (hd0,0) --> if its in ihe first partition of the primary master
makeactive
chainloader +1
 
Old 09-02-2003, 03:54 AM   #9
mobassir
Member
 
Registered: Jul 2003
Location: Pakistan
Distribution: Redhat , SME
Posts: 346

Original Poster
Rep: Reputation: 30
I add these 3 line in the end of /etc/lilo.conf file ,

prompt
timeout=50
default=redhat-9
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear

image=/boot/vmlinuz-2.4.20-8
label=redhat-9
initrd=/boot/initrd-initrd-2.4.20-8.img
read-only
append="hdc=ide-scsi root=LABEL=/"

i add here
other = /dev/hda1
table = /dev/hda
label = Windows XP

and then i run /sbin/lilo , message like this add redhat-9 and
windows
but after rebboting lilo jut show redhat 9

then i moved my changes up after this folowing line
append="hdc=ide-scsi root=LABEL=/"

then again i run lilo , agian given messege sucsellfull added

but aftre reboot linux can not bot, just showing
LI

what can i do now , i dont have boot or Emergency repair disk but i have 3 Cd's set of red hat 9

thanks waiting for reply
 
Old 09-02-2003, 06:34 AM   #10
wrw3
LQ Newbie
 
Registered: Aug 2003
Location: Dallas, TX
Distribution: RH
Posts: 16

Rep: Reputation: 0
Time to Regroup

If you got LI prior to halt, it means the following, and I quote from the LILO Users Guide: "The first stage boot loader was able to load the second stage boot loader, but has failed to execute it. This can be caused by bad disk parameters in the PC's BIOS."

However more likely it is caused by the edits on your lilo.conf.

Time to regroup:

1.Use your distro CDs to gain a command prompt -- they can be used to emergency boot the system-- and restore your lilo.conf to original state. Don't forget to run /sbin/lilo

2. if you can boot linux, don't do another thing until you create a boot floppy.

3. post a complete description of your hardware components and baseline lilo.conf along with proposed edits and let's see if we can help navigate you to a solution.

Perhaps GRUB will be a better choice for boot loaders in the end?

Good luck,

Walt
 
Old 09-02-2003, 07:05 AM   #11
mobassir
Member
 
Registered: Jul 2003
Location: Pakistan
Distribution: Redhat , SME
Posts: 346

Original Poster
Rep: Reputation: 30
Thanks for urs help, i tried to repair lilo with linux rescue.

with the "linux rescue" i did these steps
rescue autometcly search and mount my drive in in /mnt/sysimage with command of "chroot /mnt/sysimage"
then i edit lilo.conf and undo last changes
and last step run lilo under /sbin
it updates changes and then i rebbot machine but still Stop on "LI"
then also try to update lilo -v it updates more things then lilo
but still stop on "LI" now my lilo.conf is default i have undo all changes but i dont know why its still not booting
remember every time i run lilo in the first line its give message
warning: /dev/sda is not on the first disk
Addesd Redhat-9 *

and with lilo -v
warning: /dev/sda is not on the first disk
mepping with /boot/boot.b
Mapping message file /boot/message
Boot image: /boot/vmlinuz-2.4.20-8
mapping RAM disk /boot/initrd-2.4.20-8.img
Addesd Redhat-9 *
/boot/boot.0800 exists - no backup copy made
Writing boot sector.

if Installation of new lilo version can solve problem i just download latest lilo version that is lilo-22.5.7.2.binary.tar.gz from this site http://lilo.go.dyndns.org/ but i am not updating till urs reply, if u think yes then guied me to update new version.

waiting for reply
 
Old 09-02-2003, 07:09 AM   #12
wrw3
LQ Newbie
 
Registered: Aug 2003
Location: Dallas, TX
Distribution: RH
Posts: 16

Rep: Reputation: 0
Booting into rescue mode

You can use your RH CD1 to boot into rescue mode.

boot: linux rescue

The system should give you a bash prompt after booting:

bash#

Next you need to mount your root partition:

mount -t ext2 /dev/sda1 /[a created / empty mount point (directory)]

Once your root partition is mounted you have access to tools like vi which can be used to edit your lilo.conf

Good luck,

Walt
 
Old 09-02-2003, 07:20 AM   #13
mobassir
Member
 
Registered: Jul 2003
Location: Pakistan
Distribution: Redhat , SME
Posts: 346

Original Poster
Rep: Reputation: 30
please see post # 11
i already able to access and edit linux.conf

need further steps

thanks for reply
 
Old 09-02-2003, 07:32 AM   #14
wrw3
LQ Newbie
 
Registered: Aug 2003
Location: Dallas, TX
Distribution: RH
Posts: 16

Rep: Reputation: 0
Still looking for a baseline

Mobassir,

I doubt an update to lilo is required and right now adding additional variables to the problem might be a bad idea.

It will be hard for people to help you accurately without knowing what your config is at this point in the recovery.

We know that your current lilo was able to boot the system at some point -- certainly prior to adding the IDE drive.

Perhaps the best bet is to restore hardware config back to that point in time, recreate the lilo config, and get the system booting linux again, then proceed more carefully to add the IDE and the XP OS to the mix.

Can you post the exact contents of lilo.conf as it now stands?

This is my last post for 10 or 12 hours -- gotta go to work. I wish you the best. Please stay patient -- there is a solution.

Walt
 
Old 09-02-2003, 08:20 AM   #15
mobassir
Member
 
Registered: Jul 2003
Location: Pakistan
Distribution: Redhat , SME
Posts: 346

Original Poster
Rep: Reputation: 30
here is my current lilo.conf file

prompt
timeout=50
default=redhat-9
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear

image=/boot/vmlinuz-2.4.20-8
label=redhat-9
initrd=/boot/initrd-initrd-2.4.20-8.img
read-only
append="hdc=ide-scsi root=LABEL=/"

thank you very much for urs brief explanation
 
  


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
How do I add Windows XP to Grub boot loader? LUB997 Linux - Software 29 10-17-2009 11:11 AM
Boot Loader than can be edited in Windows and Linux BxBoy Linux - Software 6 04-05-2006 12:50 AM
Add to boot loader oscarp Linux - Newbie 9 09-22-2004 11:15 AM
How to add a boot record which used to startup windows under my Grub boot loader? yunxiang Linux - Newbie 6 02-01-2003 02:22 AM
Add Linux to WinXP Boot loader justiceisblind Linux - Newbie 5 09-12-2002 09:54 PM

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

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

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