[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum  |  Linux in General  |  Linux Tutorials & How To's  |  Topic: booting Linux from windows boot loader How to (Dual boot) -A
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
Pages: [1] 2
  Print  
Author Topic: booting Linux from windows boot loader How to (Dual boot) -A  (Read 18306 times)
0 Members and 2 Guests are viewing this topic.
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2215


View Profile
« on: October 26, 2003, 08:20:59 AM »

Linux boot loader like GRUB and Lilo can virtually boot to any Operating System but we can also load linux from windoz boot loader. This how to describe how we can do that!

This will work if you have win2K or WinXP.It don't work on win98 and winME.

1. First install your win2K or winXP as usual.

2. Now install linux. During install when prompted, choose Lilo as bootloader and install it on first sector of linux root partition instead of MBR.(This all is asked during the installation of most Linux distributions).At the end of installation create Linux boot floppy so that we can boot linux for first time.

3.After installing the linux,  boot linux from the floppy which we have created during install.

4. Now log into Linux as root and find lilo.conf. It is situated in /etc.Edit /etc/lilo.conf. In the begenning find a entry
Code:
boot=/dev/hda
If this entry is not pointing towards your linux root partition then edit to do so. Here I am taking /dev/hda9 as your linux root partition. So now entry should look like.
Code:
boots=/dev/hda9
If you don't remeber where is your Linux root partition then see the entry "image" containing the entry "root" which tells the root partition like below
Code:
root=/dev/hda9

5. Now execute lilo by giving the followinbg command so that it can write boot record to /dev/hda9
Code:
lilo
If you see any errors here ignore those because it is not going to harm our main MBR.

6. Here we have created the boot sector now we have to copy this to file so that windoz boot loader can refer to it.
Code:
cd
dd if=/dev/hda9 bs=512 count=1 of=bootsect.lnx

7. Now we have created the file of linux boot sector. Copy this file to windows C:\ drive so that windoz boot loader can read it.You can do this by copying this file in a floppy then to c:\ drive if u don't have access to windoz partition from LInux.
Code:
mcopy bootsect.lnx /mnt/floppy
Or
If you have access to windoz partition from Linux. (Here I am assuming that windoz C:\ drive is accessible under /mn/windows/C)
Code:
mcopy bootsect.lnx /mnt/C

8. After copying start windoz and write the following line to boot.ini found on C:\ of windoz.
Code:
C:\bootsect.lnx="GNU/Linux"

Finished in eight Steps.

Next time when u start the computer you should see the choice to boot to windoz or LINUX.
Logged
siu
New Member

Offline Offline

Posts: 2


View Profile
« Reply #1 on: December 03, 2003, 12:47:15 AM »

Hi, first of all I would like to thank you for contributing how-to's so that newbies on Linux like me can learn y take as reference. I followed your steps and didn't work.

My linux is pointing to hda6
I noticed when I am in step 5 and executed:



I get the following errors:

Warning: device 0x0306 exceeds 1024 cylinder limit
Fatal: sector 83909106 too large for linear mode (try 'lba32' instead)

then when I go to step 6

where I execute:



I noticed that when I edited bootsect.lnx, the file was somewhat empty but realized there where spaces because I can select up to 4 lines where I don't seem to see something.

Anyway ignored everything and copied the bootsect.lnx to floopy disk, then copied from disk to C:\ and edited my C:\boot.ini and rebooted. When asked to choose between WinXP, 2003 Server and GNU Linux and choose the last one, I get an error that windows xp couldn't load ntdlr and rebooted my computer.

What can possibly be the problem?

I'll appreciate any help.
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2215


View Profile
« Reply #2 on: December 03, 2003, 01:53:05 AM »

Quote
Hi, first of all I would like to thank you for contributing how-to's so that newbies on Linux like me can learn y take as reference.
Thank you! for that..

Now you have got every thing messed up.. but now..
first of all keep the linux boot disk handy
Secondly.. take the windows installation cd and load windows recovery console by booting your computer from installation  cd of winXP..
There it will ask for password of your windoz administrator  then run the following command !!
Code:
fixboot
and
Code:
fixmbr
Now windoz will load normally...
-------------------------
Now boot linux from linux boot disk ...
Open your /etc/lilo.conf and add following lines to it..
Code:
lba32

Now again follow the above steps...  but do not ever try to edit bootsect.lnx...
You will be fine...
Logged
siu
New Member

Offline Offline

Posts: 2


View Profile
« Reply #3 on: December 04, 2003, 12:53:26 AM »

Thank you! again, what I did was to replace the line:

Code:
linear

with

Code:
lba32

and followed everything and had no problems. Thank you! for everything. Smiley
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2215


View Profile
« Reply #4 on: December 04, 2003, 01:06:40 AM »

Oh..

I forget to tell u to remove the "linear" from lilo.conf..
Logged
wombat53
Linux Noob !
*
Offline Offline

Posts: 14


View Profile
« Reply #5 on: March 25, 2004, 09:41:40 PM »

Ricky
You wrote:
" After copying start windoz and write the following line to boot.ini found on C:\ of windoz." (referring to the C:\bootsect.lnx= ......line)

Are you saying that we over-write the entire boot.ini file with this single line? Or that we include it in the existing file?
Thanks
George
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2215


View Profile
« Reply #6 on: March 26, 2004, 02:47:31 AM »

Ya ofcourse I am saying to add that line in boot.ini U can edit ur boot.ini from linux if you have access to windoz C:\ partition..
Logged
ajathsatru
New Member

Offline Offline

Posts: 3


View Profile
« Reply #7 on: April 28, 2004, 11:21:28 PM »

Hi

I faced the same problem... but in my case i could not find the boot.ini file in the C:( and also in the entire MyComputer)

So i did n't run the lilo.. i think boot.ini should be present after installling windows itself

what should i do now Huh?
Logged
ajathsatru
New Member

Offline Offline

Posts: 3


View Profile
« Reply #8 on: April 28, 2004, 11:37:15 PM »

FYI,

I have enabled the Show hidden files options and still i culd not find the boot.ini file ! what cud be the reason Huh
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2215


View Profile
« Reply #9 on: April 29, 2004, 01:24:20 AM »

You must be on M$ windows XP.. there is in folder options a option which is enabled , disable it. It is Hide protected system files..
Logged
ali
New Member

Offline Offline

Posts: 2


View Profile
« Reply #10 on: August 11, 2004, 02:06:17 AM »

Is this work for both NTFS and FAT WINDOWS DISK format?
Logged
GNUrag
Tux Awared
**
Offline Offline

Posts: 41


View Profile WWW
« Reply #11 on: August 11, 2004, 07:42:49 AM »

Quote from: "ali"
Is this work for both NTFS and FAT WINDOWS DISK format?
It works only for FAT partitions.
Logged
ali
New Member

Offline Offline

Posts: 2


View Profile
« Reply #12 on: August 17, 2004, 01:27:51 AM »

Is there a solution (other than reinstalling Linux) if the disk format is NTFS.
Logged
dubey_anild
New Member

Offline Offline

Posts: 3


View Profile
« Reply #13 on: October 27, 2005, 07:05:36 AM »

Hi linux group

                  I install first LINUX 9.0 then Winxp.But Later i formatted winxp & then again install winxp.But there was no grubto choose betw'n to OS.I boot through Linux cd & root prompt writeused linux rescue,but i got # and i was not able to recover linux again.Once i had done but this time i foget command.
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2215


View Profile
« Reply #14 on: October 27, 2005, 02:36:30 PM »

after going to recover mode ie linux rescue then you have to follow the instruction and mount the system under /mnt/sysimage

then simply run :
Code:
grub-install /dev/hda1

If after that you are not getting linux then you probably have deleted linux partitions also while formatting.
Logged
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
   

 Logged
Pages: [1] 2
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
how to add second linux to a dual boot? Miscellaneous samkupar 8 1608 Last post May 30, 2005, 10:38:07 AM
by Ricky
How to have dual Linux Boot? Linux Installation Support wittyguysuku 2 1413 Last post May 11, 2004, 12:38:20 PM
by Ricky
how to dual boot mepis linux and windows 98 Linux Installation Support jagjot 1 1315 Last post December 15, 2004, 08:15:36 AM
by Ricky
Problem with Boot Loader and Boot Sectors Linux Installation Support mohit_kakkar 5 1027 Last post April 08, 2006, 02:10:44 AM
by dalek
Dual linux boot and dual windows boot together? Distribution Specific Stuart36 3 910 Last post March 20, 2007, 02:50:10 PM
by Ricky
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 04, 2008, 06:19:33 PM

Login with username, password and session length
Navigation
Recent Discussions
[Today at 02:53:39 AM]

[Today at 02:45:38 AM]

[December 03, 2008, 10:18:57 AM]

[December 02, 2008, 11:32:02 AM]

[November 29, 2008, 02:23:49 PM]

[November 29, 2008, 02:14:14 PM]

[November 29, 2008, 04:00:36 AM]

[November 28, 2008, 07:05:28 AM]

[November 28, 2008, 07:04:39 AM]

[November 28, 2008, 06:58:16 AM]
Members
Total Members: 6262
Latest: abhijitabhijit
Stats
Total Posts: 8290
Total Topics: 2261
Online Today: 19
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 5
Total: 5
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc