LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-20-2004, 06:32 PM   #1
hyperriven
Member
 
Registered: Oct 2003
Distribution: Mandrake 9.1
Posts: 61

Rep: Reputation: 15
The best way to dual boot


I am kind of curious about what the best way to dual boot Linux and Windows. The first time I dual booted I used only LILO. After a while I got fed up with Linux(getting everything to work right can be a nightmare) and when I got rid of it I had hard time trying to get WinXP to boot again(I figured WinXP would automatically boot after I got rid of LInux, I didn't know about the MBR and stuff like that). When I finally decided to give Linux a try again, I was a bit worried because I didn't want to go through the same trouble twice. Finally, I found what I think is the best way to dual boot windows(at least it works for WinXP and I think Win2000):

I dual boot WinXP and Mandrake 10.0. I use the WinXP boot loader. To use the WinXP boot loader you have to tell Mandrake to install lilo at the beginning of the root partition. You will also need to create a boot disk to boot into Mandrake for the first time. After you have booted into Mandrake with the boot disk you need to open a console and do this command as root:

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

you will need to replace hda4 with whichever partition lilo is installed on. Then copy the bootsect.lnx file(it should be located in / ) to a floppy and restart into windows. Then copy the bootsect.lnx file to c:\. Next you need to edit the boot.ini file that is located in the c:\ directory. It should look something like this:

[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" /fastdetect

you will just need to add this line to the end of the file:

c:\bootsect.lnx="Linux"

So far this seem like the best way to dual boot. I have had to make new bootsect.lnx files every once in a while(for some reason the bootsectors seem to change). This is an especially good way to go if you are not sure you want to keep Linux. All you have to do is delete the Linux partition and edit the boot.ini file.
 
Old 03-20-2004, 06:36 PM   #2
Kovacs
Member
 
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607

Rep: Reputation: 31
You can also just rewrite the mbr with fdisk /mbr with a windows boot disk... I think it might be called fixmbr on XP or something like that.
 
Old 03-20-2004, 06:49 PM   #3
hyperriven
Member
 
Registered: Oct 2003
Distribution: Mandrake 9.1
Posts: 61

Original Poster
Rep: Reputation: 15
It was a long time ago and I don't remember exactly, but I am pretty sure I tried fdisk /mbr and fixmbr and I didn't have any luck. I read a ton of posts trying to get Windows to boot again after they got rid of Linux and a lot of people had the same problem as I did with fdisk /mbr and fixmbr. I do know that I used a fixmbr type tool that came with Partition Magic and that worked. Is there a way to backup the MBR onto a floppy so that you could just restore it later?
 
Old 03-20-2004, 07:58 PM   #4
njbrain
Member
 
Registered: Jan 2004
Location: Rhinelander, WI, U.S.
Distribution: Slackware
Posts: 416

Rep: Reputation: 30
Quote:
Originally posted by hyperriven
It was a long time ago and I don't remember exactly, but I am pretty sure I tried fdisk /mbr and fixmbr and I didn't have any luck. I read a ton of posts trying to get Windows to boot again after they got rid of Linux and a lot of people had the same problem as I did with fdisk /mbr and fixmbr. I do know that I used a fixmbr type tool that came with Partition Magic and that worked. Is there a way to backup the MBR onto a floppy so that you could just restore it later?
Yes there is. You will need Windows to make the disk. First, you need to know the manufacturer of your hard drive. Now that you know that, you go to www.driverguide.com and login. User name, "drivers", password, "all". Now you run a basic search, selecting your brand of hard drive and searching "ez-drive". Download the latest version, and run it, and it will write a floppy full of good HDD utilities. With some brands you will have to copy the files to your floppy manually. Hope this helps,
Noah
 
Old 03-21-2004, 03:06 AM   #5
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1/13.37/14 RedHat 6.2/7/EL6.5 SuSE 8.2/11.1
Posts: 471

Rep: Reputation: 30
fdisk /mbr

As far as I recall, this simply removes/wipes the Master Boot Record.
 
Old 04-02-2004, 04:14 PM   #6
andyoye
LQ Newbie
 
Registered: Jan 2004
Posts: 18

Rep: Reputation: 0
Red face

I can boot w2k from hard disk ... linux from floppy, BUT not able to dual boot linux from hard disk.

I did every step ..
i.e
dd if=/hda6..... bs=512..
cp /bootsect.lnx mnt/floppy
boot windows ... copy bootsect.lnx to C:\
edit the boot.ini

after reboot .. when i select linux to boot .. screen goes black .. with a blinking cursor on the left top corner.

AGAIN

i am able to boot linux for floppy ...w2k from hard disk .. but not able to boot linux from hard disk ..
thxx
 
Old 04-02-2004, 08:56 PM   #7
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,887

Rep: Reputation: 88
I think it is good that many tasks can be done a number of ways and everyone can choose which they prefer.
My first Linux install was Linux for Windows. A Mandrake version that one could install on their Windows FAT partition and boot from DOS.
My first real Linux install involved using System Commander partitioning and booting software.
On the next major reinstall I went with Lilo instead and have never looked back. I find Lilo to be be fairly easy to use and like the fact that (once it is configured correctly) it is a dumb (as in it either works or fails, it doesn't reconfigure) program sitting on your MBR needing nothing else to do it's job.
Everyone should use what they prefer. Anyone feeling more comfortable with the Windows bootloader should use it for their dual boots.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems With Dual Boot / Dual Drive Setup Norab Linux - Hardware 1 08-07-2005 09:15 PM
Fedora Core 3 Dual Boot, Dual Hard drives, Grub Boot Loader Denali03 Linux - Newbie 1 03-04-2005 01:44 PM
hOw to dual boot linux suse with a dual boot win98/xp pc walterkai SUSE / openSUSE 1 12-14-2004 05:04 PM
Advice (and some) Needed: Dual-HDD, Dual-Boot - Linux, WinXP elnomadkvn Linux - General 1 03-28-2004 10:11 AM
Newbie needs Mandrake/Win98 dual-HD, dual boot system design help... buddha Linux - Newbie 20 09-04-2003 08:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration