Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
Linux in General => Linux Tutorials & How To's => Topic started by: Ricky on October 26, 2003, 01:20:59 PM
-
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 entryboot=/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.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
root=/dev/hda9
5. Now execute lilo by giving the followinbg command so that it can write boot record to /dev/hda9
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.
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.
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)
mcopy bootsect.lnx /mnt/C
8. After copying start windoz and write the following line to boot.ini found on C:\ of windoz.
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.
-
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.
-
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 !!
fixboot
and fixmbr
Now windoz will load normally...
-------------------------
Now boot linux from linux boot disk ...
Open your /etc/lilo.conf and add following lines to it..
lba32
Now again follow the above steps... but do not ever try to edit bootsect.lnx...
You will be fine...
-
Thank you! again, what I did was to replace the line:
linear
with
lba32
and followed everything and had no problems. Thank you! for everything. :)
-
Oh..
I forget to tell u to remove the "linear" from lilo.conf..
-
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
-
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..
-
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 ????
-
FYI,
I have enabled the Show hidden files options and still i culd not find the boot.ini file ! what cud be the reason ???
-
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..
-
Is this work for both NTFS and FAT WINDOWS DISK format?
-
Is this work for both NTFS and FAT WINDOWS DISK format?
It works only for FAT partitions.
-
Is there a solution (other than reinstalling Linux) if the disk format is NTFS.
-
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.
-
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 : grub-install /dev/hda1
If after that you are not getting linux then you probably have deleted linux partitions also while formatting.
-
thanks for a nice.help.
May i know how to config grub like lilo as u did.
i am interested in using grub rather than lilo.so pls guide us to use to boot grub of my root partition from windows par.
-
Hi,
May i know how to config grub like lilo as u did.
i am interested in using grub rather than lilo.so pls guide us to use to boot grub of my root partition from windows par.
tq
-
What I had done was I had ubuntu running on my system. And there was a lot of unpartitioned space left on the hard disc. So then I used it and installed windows xp as well.
When I rebooted i could not see Linux installation at all! Among the options prior to booting, there was only Windows xp.
To see linux again, I made a small partition, and installed linux a second time, then I could see all the three Operating Systems...!
Could you tell me how I can overcome this problem..?