LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-17-2003, 02:04 PM   #1
Comreak
Member
 
Registered: Jan 2003
Distribution: Ubuntu 5.04
Posts: 32

Rep: Reputation: 15
Dualbooting WinXP/Linux with Lilo <resolved>


I recently installed Slackware 9.0 and I'd like to dual boot it and windows xp. I'm going to say exactly what I've done.

-I have two hard drives. Before I installed slackware 9.0, I had Win98 on the first drive and WinXP on the second. The OSs were installed in that order (win98, then winxp).

-When I installed slackware, I used cfdisk to delete the partition win98 was on and I created a swap partition and a Linux partition and I installed the bootloader in the first sector of the linux partion (don't know if this is right or not, all I know is that I chose not to install the bootloader in the MBR).

-I noticed that windows didn't show up in the lilo boot menu so I tried to use liloconfig to add it (delete the old lilo.conf, then add both linux and windows to the new). Here's what my windows entry looks like in lilo.conf:

other = /dev/hdb1
label = Windows
#map-drive = 0x80
# to = 0x81
#map-drive = 0x81
# to = 0x80
table = /dev/hdb

-The windows entry shows up in the lilo boot menu but when I select it, I get the message that "Windows is loading" (or whatever) but nothing actually happens.

What I'd ultimately like to do is get it so I can dual boot both Linux and WinXP so I can access all of my WinXP data again. I've had this problem before and never figured it out. Thanks in advance.

EDIT://Sorry about the title. I meant 'with' lilo not 'and' lilo.

Last edited by Comreak; 06-18-2003 at 08:43 PM.
 
Old 06-17-2003, 03:37 PM   #2
Mojojo
Member
 
Registered: May 2003
Location: Philadelphia/PA
Distribution: Arch
Posts: 452

Rep: Reputation: 35
Just get rid of XP and run linux. Windows hates linux it won't reconize the filesystems of linux, and you'll end up pulling your hair out to dual boot, when the real problem is windows.
 
Old 06-17-2003, 03:48 PM   #3
Comreak
Member
 
Registered: Jan 2003
Distribution: Ubuntu 5.04
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Mojojo
Just get rid of XP and run linux. Windows hates linux it won't reconize the filesystems of linux, and you'll end up pulling your hair out to dual boot, when the real problem is windows.
I'll tell you, it's tempting to just do what you said but I can't. I've had WinXP installed far too long to just throw it all away. Among other things, I don't want to lose all the work I've done in Hammer (Half-Life editor). Plus, I'd rather just figure this out. How am I going to learn linux if I give up at the first sign of trouble?

A has to learn somehow (sorry, couldn'y resist).
 
Old 06-17-2003, 03:59 PM   #4
Mojojo
Member
 
Registered: May 2003
Location: Philadelphia/PA
Distribution: Arch
Posts: 452

Rep: Reputation: 35
If your a newbie why don't you try out mandrake 9.1, it may convince you to dump xp it did for me.
 
Old 06-17-2003, 04:27 PM   #5
Comreak
Member
 
Registered: Jan 2003
Distribution: Ubuntu 5.04
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Mojojo
If your a newbie why don't you try out mandrake 9.1, it may convince you to dump xp it did for me.
Like I said, I actually want to learn linux. I've used both Red Hat 9.0 and Mandrake 9.1 and I didn't actually feel like I was learning anything. As for dumping XP, I'm not going to do this. I'm working on my programming skills and I need to know the windows environment (graphics APIs and whatnot). I also play alot of games (shoot me) in windows and until wine runs them better, I can't just dump windows.

There has to be a solution for my problem.
 
Old 06-17-2003, 04:38 PM   #6
Mojojo
Member
 
Registered: May 2003
Location: Philadelphia/PA
Distribution: Arch
Posts: 452

Rep: Reputation: 35
You should of installed the bootlader in the MBR but before you do that. I would switch your setup and have windows XP on the master then linux on the slave drive. Then install the bootloader onto the MBR of the XP drive. If windows isn't running install the XP setup disc and go to recovery mode.
 
Old 06-17-2003, 04:58 PM   #7
Comreak
Member
 
Registered: Jan 2003
Distribution: Ubuntu 5.04
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Mojojo
You should of installed the bootlader in the MBR but before you do that. I would switch your setup and have windows XP on the master then linux on the slave drive. Then install the bootloader onto the MBR of the XP drive. If windows isn't running install the XP setup disc and go to recovery mode.
Thanks, I'll try that out and report back with the results.
 
Old 06-17-2003, 05:22 PM   #8
Mojojo
Member
 
Registered: May 2003
Location: Philadelphia/PA
Distribution: Arch
Posts: 452

Rep: Reputation: 35
Warning: Backup any data you want to save after windows is up and running again.
 
Old 06-18-2003, 01:34 PM   #9
robtheJobNorflk
LQ Newbie
 
Registered: Apr 2003
Distribution: Slackware 10.0
Posts: 28

Rep: Reputation: 15
In my experience I have found it easier to use Windows XP bootloader, and stick lilo on the 1st boot sector of the linux partition.

I have Windows XP on the first drive, and installed first. I then put on Slackware but told it to put lilo at the start of the disk. Then copied the first 512 bytes, to the XP partition and pointed the NT loader to it.

This works great, and leaves alone XP to it's own devices.

Note: The only snag is that you must remember to update the copy on XP partition/drive every time you run lilo...
 
Old 06-18-2003, 02:40 PM   #10
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
As Mojojo indicated, XP hates Linux, but setting up a dual boot system with XP and Slack can be done, it just takes a little work. First of all, to my knowledge, the only way it will work is to let Windows live in the first partition of the primary disk, and then to install Slack afterwards. Based on what you've written, it sounds like the first partition originally contained Win98, then you installed XP on the second drive, and then you wiped Win98 and replaced it with Slack. As a result, what I suspect may have happened is that you've inadvertently ended up with things backward, with Slack on /dev/hda and Windows on /dev/hdb (which seems to be supported by the contents of your lilo file.) If this is the case, the bottom line is that Windows will simply refuse to accept that configuration, and won't boot.

To fix it, I think you may have several options. First, before doing anything else, as noted before, do a backup of any important data that you do not want to lose. Don't make any changes until you do the backup. Assuming you've done that, Option #1 would be to simply blow away your entire system, and reinstall everything. Repartition the drives (if desired), reinstall XP (which should put itself on /dev/hda aka the C:\ drive), and then install Slack, putting the bootloader into the MBR. This should give you the dual boot system you desire, and the only remaining task would be to restore the data that you backed up onto your XP system. I've ended up doing this several times myself as I was learning, and although it seems a bit intimidating at first, it turns out not to be such a big deal in the end. As you know there are several bootloader options, but for me, I've always used the MBR option and it has worked well for me.

Option #2 would apply to the situation where you are in a spot where you need to temporarily put Slack on hold but you definitely need to get XP up and running again. If this is the case, it might be a bit more difficult because as I've mentioned Windows will insist that it live on the first partition of the primary drive, and this (apparently) is not the condition of your system which would be a complicating factor. If your current system is basically hosed, you've tried everything you can think of but you still can't boot either Slack or XP, then a last resort type of attempt to restore things might be to run the DOS "fdisk /mbr" command. This is an undocumented, unsupported, and risky command, however, it does exist and is intended to restore the MBR to a Windows-friendly state. If you do want to try it, use the Windows boot disk to boot to the C:\ prompt, then enter: fdisk /mbr Again, this is a high risk maneuver, and could hose your system completely. Repeat: Do a backup before attempting it. That being said, if your system is already hosed, you figure you've got nothing to lose, and you accept the risks, it might do the trick. I've done it a couple of times, and it has worked, however, these attempts were always done on a system where Windows was installed on the primary drive. I don't know what might happen with your system since it appears you've got Linux on the primary drive with Windows on your secondary drive. As they say in math class, the result may be undefined.

Finally, Option #3 might be to just open your box, disconnect your second drive (the one with XP), then do a clean install of XP on drive one. Once that's done and you've got a functioning XP system, you could then reconnect the second drive (which would become D:\) let the hardware wizard detect that you've added new hardware, and in theory you would be able to transfer anything you needed from D:\ back to C:\ To finish it off, install Slack on the second drive, putting the bootloader in the MBR. End result = XP on the first drive, Slack on the second. Wild celebrations ensue.

Sorry for the long winded reply, but I've been in similar (but not exactly) the same situation before, and hopefully some of this might prove to be useful. You really do need to do a backup of your important data though before doing anything else. Don't give up on Slack though, it is awesome and way better than anything from Microsoft. Good luck with it. -- J.W.
 
Old 06-18-2003, 02:46 PM   #11
DaOne
Member
 
Registered: Jan 2003
Location: USA
Distribution: Slackware
Posts: 498

Rep: Reputation: 30
See this thread for an exact how-to if you want to use the Windows boot loader to dual/triple boot. It's easy to do and only takes a few minutes.

http://www.linuxquestions.org/questi...threadid=64166

Once you get Windows back up and running, you can boot into Slack using the CD, then re-install Lilo to /
 
Old 06-18-2003, 07:59 PM   #12
Mojojo
Member
 
Registered: May 2003
Location: Philadelphia/PA
Distribution: Arch
Posts: 452

Rep: Reputation: 35
J.W nice post, But if you have windows on the primary drive and linux on the secondary.With the XP/Linux bootloaders on each of the drives MBR's. XP will cancel out linux you will not be able to boot into linux without editing the boot.ini file in Windows which sucks. "Never really did get that working." Or disabling the master drive in the bios. The way I said to do it was the easiest way i have found. Although thats just my opinion. Some use bootpart and others never really figure it out and end up reverting back to windows. In all the fact of the matter is microsoft hates linux and they will never really make it easy to dual boot with linux. Another reason why everyone should dump windows and go linux.
 
Old 06-18-2003, 08:41 PM   #13
Comreak
Member
 
Registered: Jan 2003
Distribution: Ubuntu 5.04
Posts: 32

Original Poster
Rep: Reputation: 15
In Reply To J.W.:

Looks like I went with option 1. I had to blow away both slack and xp (backing up data first). I installed xp on the first drive; slack on the second drive; and I put the bootloader into the MBR of the xp drive (first drive). Everything was detected and it worked.

Slackware is truly a nice distro; by far the best I've come across so far. I love the fact that the package managment is built around tar/gzip files. The more I use RPMs, the more they seem to annoy me.

Thanks for the help guys.

Last edited by Comreak; 06-18-2003 at 08:43 PM.
 
Old 06-18-2003, 10:05 PM   #14
kendo
Member
 
Registered: Nov 2001
Location: Vladivostok, Russia
Distribution: Slackware 13.0, PCBSD 7.1
Posts: 83

Rep: Reputation: 15
I have been running this setup for almost a year and before had done it several ways, but it screws up your setup by using any other way, but this. XP on first partition or drive and Linux on second or slave.

How to-Dual boot XP and Linux

I realize this has been done before, but this is my take on it, as it has worked very well for me and is easy to recover in the eventuality something goes astray with your installation down the road.

This assumes that you will create a bootdisk during your Linux install.


For reference, during linux install, I chose to use LILO, and to
put LILO in the first part of /boot instead of in the MBR. (It is preferrable, to create a small partition for /boot during partition set-up, about 20mb's is usually enough)

To get everything working right, here is what I did (all as root):

Boot into linux and get a command prompt (you have to use a boot disk to boot
into linux at this point).

To see where the Linux boot partition is

cat /etc/lilo.conf | more

At the beginning of the file it will have a line showing the boot partition, something like
boot=/dev/hda5

Type the following command, replacing "/dev/hda5" with the partition you made
/boot:

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

This copies the first 512 bytes of the specified partition into the file
bootsect.lnx

You will need to copy this file to your windows system drive root folder, in my
case C: You can do this very easily if you have mounted your windows drive(s) in
linux. Otherwise, copy it to a floppy, then boot into windows and copy it from
the floppy to your windows system drive.

Once in windows, use notepad or another text editor and open C:\boot.ini

Windows will try and hide the file from you, but it is usually there.
Add the following line to the end of the file:

C:\bootsect.lnx="Redhat 7.2 Enigma"

Note that you can replace the text in quotes above with whatever text you want
to appear in the windows bootloader menu list. Save your changes and close the
file.

Open Start>>Settings>>Control Panel>>System. Click on the advanced tab, then
click on Startup And Recovery. In the dialog box, you can choose the default OS
to boot, and the timeout. Make any changes, then close the dialog box and
reboot.

Choosing windows from NT's boot menu will load windows, and choosing linux will
load LILO. You can change LILO defaults (like you just did to windows) by
editing the LILO.conf file. Don't forget to run the command "lilo" after changing configuration. Every time you make changes to Lilo after this you must make a new bootsec.lnx and copy it to your C:\ and replace the old one.


This solution worked for me; your milage may vary.

__________________
 
Old 06-19-2003, 02:51 AM   #15
elliore
LQ Newbie
 
Registered: Jun 2003
Distribution: Slackware
Posts: 17

Rep: Reputation: 0
another useful site for newbie is http://jetblackz.freeservers.com. u'll find many things here, including step by step dualboot.....
 
  


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
dualbooting with LILO errors Brnzwngs Slackware 2 06-12-2005 02:49 PM
dualbooting gentoo 2004.2 and winXP on laptop gauntalus Linux - Laptop and Netbook 1 12-22-2004 11:37 PM
dualbooting gentoo 2004.2 and winXP on a laptop gauntalus Linux - Software 3 12-22-2004 11:10 PM
Problem dualbooting XP and Linux. Lilo isn't cutting it... Lepinski Linux - Newbie 5 04-05-2004 07:40 PM
Dualbooting Linux and Windows using lilo kLUMSY bOT LinuxQuestions.org Member Success Stories 1 02-11-2004 02:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

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