LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-20-2004, 11:32 PM   #1
c31c
Member
 
Registered: Mar 2004
Location: Planet Earth
Distribution: Arch Linux
Posts: 106

Rep: Reputation: 15
Dual Boot Slack and WinXP


Hi
I've been looking around the forums to find a solution to my problem, but I think none of them really matches, and I tried the solutions offered...
So, I want to be able to boot either WinXP or Linux(Slackware).
I have 2 drives, Primary is Linux, LILO on MBR, and Slave is WinXP, NTFS....
How do I set up LILO to be able to boot WinXP without a boot disk or something like this?
I've already tried out the WinXP boot loader, but that didn't work for me...
Thanks in advance for help!
 
Old 03-21-2004, 12:21 AM   #2
Kovacs
Member
 
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607

Rep: Reputation: 30
I think you will need to modify your /etc/lilo.conf to include this:

# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda1
label = Slackware
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends
# DOS bootable partition config begins
other = /dev/hdb1
label = WinXP
table = /dev/hdb
# DOS bootable partition config ends

and then run lilo again to write it to the mbr.
 
Old 03-21-2004, 12:46 AM   #3
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Re: Dual Boot Slack and WinXP

Quote:
Originally posted by c31c
Hi
I've been looking around the forums to find a solution to my problem, but I think none of them really matches, and I tried the solutions offered...
So, I want to be able to boot either WinXP or Linux(Slackware).
I have 2 drives, Primary is Linux, LILO on MBR, and Slave is WinXP, NTFS....
How do I set up LILO to be able to boot WinXP without a boot disk or something like this?
I've already tried out the WinXP boot loader, but that didn't work for me...
Thanks in advance for help!
You can run liloconfig as root and choose the expert install.
You'll choose:
Begin Start LILO.....
kernel parameters - if you have a CD-RW or DVD-RW put them in there like ->
hdx=ide-scsi (where x is the drive letter)
hda = primary ide controller, master
hdb = primary ide controller, slave
hdc = secondary ide controller, master
hdd = secondary ide controller, slave
Frame buffer...just hit enter :}
Select LILO target location....choose MBR
Confirm location...maybe Slack picks the right one - /dev/hdb for you
LILO timeout...whatever you can live with - 5 secs. for me
then
Linux Add Linux partition...this is your Slack root partition, and if you
don't know it, issue the command df -h and it's the one marked /
then name it...I chose Slack, you might want to name it Freedom from M$
then
DOS Add a DOS/Windows....you gotta do that :}
Slack should have a * by the bootable partition - yours should be /dev/hdb1
then name it...I chose Windoze, you might want to name it Slavery
ahh....
finished....
now you're back at the root prompt
#
and you should issue the command
# /sbin/lilo to save your changes
which will return you to another prompt after telling you what it did
and you may now do the three finger salute (Ctrl + Alt + Del) and
proceed to reboot the rascal and try it out!
 
Old 03-21-2004, 01:54 AM   #4
c31c
Member
 
Registered: Mar 2004
Location: Planet Earth
Distribution: Arch Linux
Posts: 106

Original Poster
Rep: Reputation: 15
thanks, but it still doesn't work...
I used liloconfig the way Chinaman told me to, and the result in lilo.conf looked like Kovacs described it. But there are two more lines under that:
image="/dev/hdb1"
root="/boot/vmlinuz"
that's two times the root thing in my lilo.conf!?

@Chinaman
excuse me if say something stupid, but I have Linux on my Master drive, so why should I install lilo to the slave? and: does the slave have a MBR? I don't know...I'm a little confused...

When I rebooted, and chose Windows (alias Slavery ) there was only something like "Loading Windows..."
and then it just won't go on, you know.

I guess the problem is that my windows drive is partitioned with ntfs.
I used to have fat32 (win9x) and everything went fine. But now it just won't work....
Thanks for your help anyways!!
Any more ideas how I could solve this?
 
Old 03-21-2004, 03:30 AM   #5
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Sounds like the Win bootloader in the MBR is messed up.

Which system did you install first?
When you reached the step in liloconfig where it said:
Select LILO target location, did you choose MBR?
Which partition did Slack suggest?

Could you please post the output of
$ cat /etc/lilo.conf
so we can actually look at it.
When you post it, please put [_code_] without the underscores
before your post, and [_/code_] without the underscores after
your post so that the formatting is easier to read.

Sorry if I told you something incorrect.

Last edited by Bruce Hill; 03-21-2004 at 03:32 AM.
 
Old 03-21-2004, 04:06 AM   #6
c31c
Member
 
Registered: Mar 2004
Location: Planet Earth
Distribution: Arch Linux
Posts: 106

Original Poster
Rep: Reputation: 15
Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
append="hdc=ide-scsi;hdd=ide-scsi"
boot = /dev/hda
#compact        # faster, but won't work on all systems.
prompt
timeout = 50
# VESA framebuffer console @ 1024x768x256
vga = 773
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# ramdisk = 0     # paranoia setting
# End LILO global section
# Linux bootable partition config begins

image="/boot/vmlinuz"
	root="/dev/hda1"
	label="Slackware"
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends
# DOS bootable partition config begins

other = /dev/hdb1
	label="Windows"
#  map-drive = 0x80
#   to = 0x81
#  map-drive = 0x81
#   to = 0x80
  table = /dev/hdb
# DOS bootable partition config ends

image="/dev/hdb1"
	root="/dev/hda1"
so that's it, sorry
First I installed slack, then windowsXP.
Slack is on the master drive, winXP on the slave.
Slaves don't "have" MBRs, right??
I did choose MBR, Slack suggested /dev/hda

Until now I don't think you told me anything incorrect!
In fact just through some things you said I've just learned about Linux a litte bit better!!

So, right now, I'm writing from Windows. If I want to change which OS I boot, I have to change it in the BIOS...very annoying, and slow
But both partitions boot properly. But I want LILO to be able to boot both.

Thanks again for your help
 
Old 03-21-2004, 04:45 AM   #7
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Quote:
First I installed slack, then windowsXP.
Slack is on the master drive, winXP on the slave.
Slaves don't "have" MBRs, right??
I did choose MBR, Slack suggested /dev/hda
At the end of the ROM BIOS bootstrap routine, the BIOS reads and executes the first physical sector of the first floppy or hard disk on the system. This first sector of the hard disk is called the master boot record (or sometimes the partition table or master boot block). There is a small program at the beginning of this sector of the hard disk. The partition information, or partition table, is stored at the end of this sector. This program uses the partition information to determine which partition is bootable (usually the first primary DOS partition) and attempts to boot from it.

You should have installed Windows first. And since Slack suggested /dev/hda let's change it to that rather than /dev/hdb - that is a mistake I posted. You are correct, the MBR is on DISK0 which is /dev/hda. Rather than running liloconfig again, just use an editor as root and make the changes to /etc/lilo.conf and then run /sbin/lilo afterwards to save the changes. If this doesn't fix it, you may need to do fdisk/mbr to get the Windows bootloader working properly - then I think you'd have to basically do the liloconfig routine again.

How did all that extra stuff get into your lilo.conf file? It looks like the trick I had to use to get my comp to boot when I had Linux on /dev/hda and Win2K on /dev/hdb but that was using GRUB rather than LILO. So, in lieu of removing it (since there may be a very vaild reason for having it), comment out the indicated lines (by putting # in front of them):

Code:
# Linux bootable partition config begins

image="/boot/vmlinuz"
	root="/dev/hda1"
	label="Slackware"
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends
# DOS bootable partition config begins

other = /dev/hdb1
	label="Windows"
#  map-drive = 0x80
#   to = 0x81
#  map-drive = 0x81
#   to = 0x80
  table = /dev/hdb                              <--- comment this out
# DOS bootable partition config ends

image="/dev/hdb1"                               <--- comment this out
	root="/dev/hda1"                        <--- comment this out
 
Old 03-21-2004, 05:02 AM   #8
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Quote:
How did all that extra stuff get into your lilo.conf file?
Afaik, that's the stuff to "fool" WinXP into thinking it's on the first primary partition, which is required for Windows to boot.

Honestly, C31c, if I was you I'd wipe the whole drive and start over, installing XP first (on the first primary partition) and then Slack (preferably on a logical partition, to prevent XP from trying to give the Slack partition a drive letter when you boot XP-- as this will fail and be very annoying).

Mostly because it keeps the bootloaders straight, and that's a good thing.

In the first place, the Windows bootloader will always overwrite any bootloader present on the MBR. If successful, this would make you unable to boot Linux without a boot disk (since Linux will not be listed on your Windows boot menu, because Windows does not know or care that you have Linux installed). It is possible to add Linux to the Windows boot menu, but imo it's a big pain.

In the second place, evidence seems to indicate that if the Windows bootloader tries to overwrite LiLO, it will be only partly successful (possibly because Windows doesn't know squat about LiLO, so cannot properly erase it), so you wind up with 2 non-working bootloaders, and are unable to boot any of the OSes on your system.

If, on the other hand, you install XP first, to the location it demands (first primary partition), then Slack, LiLO will be correctly written, and can pick up the Windows install and add it to the menu correctly.
 
Old 03-21-2004, 05:07 AM   #9
c31c
Member
 
Registered: Mar 2004
Location: Planet Earth
Distribution: Arch Linux
Posts: 106

Original Poster
Rep: Reputation: 15
nope, won't work. same thing again...Loading Windows............
but at lease now I got that about MBR and stuff right. thx
but you know it ain't no dos, but ntfs partition....
what is that thing about fdisk /mbr ?? Can you tell me more about this?

What do you mean by "You should have installed Windows first." ??
Should I have put it on my Master, or just install it before installing Slackware?? If it is the just the time, I can install it again, no problem.
Do you think that would help?
 
Old 03-21-2004, 05:17 AM   #10
c31c
Member
 
Registered: Mar 2004
Location: Planet Earth
Distribution: Arch Linux
Posts: 106

Original Poster
Rep: Reputation: 15
Code:
[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
@motub
that's what is in my boot.ini
and as mentioned before...winXp is *NOT* trying to overwrite the MBR on my Linux Drive, and there is *NO* problem during boot of either OS...
I just have to switch the priority of the harddrives in the BIOS. I don't know why that is...
Don't you think there's another method than removing and re-installing XP?
I just installed it 2 days ago, installed all appz and tools and stuff, so I really would hate to do that again...and it is a pain in the ass to make win just "safe", or as safe as it gets with M$ patches. I only have ISDN
 
Old 03-21-2004, 05:17 AM   #11
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
The Windows bootloader will always install to the MBR.

What we meant was that you should have installed Windows before installing Slackware, to avoid exactly this problem. And you also should have, preferably, installed Windows to the first primary partition on the first drive, rather than a secondary drive.

fdisk /mbr is one of the ways to restore the Windows bootloader (via a floppy disk)-- but the preferred way (under Win 2000 and XP) is to boot from the XP CD, go to the Recovery Console, log in as Administrator and type FIXMBR, which will also restore your Windows bootloader.

However, you will then no longer be able to boot into Linux unless you have a boot disk (or use CD 1 to do a rescue boot), because the Windows bootloader will not contain a Linux entry (unless you copy the boot sector from the Linux partition to the bootsector of the Windows partition and add Linux to the Windows boot menu manually).

On the whole, it's much easier to install Windows first (to the partition that Windows expects to be installed to), and then install Linux, as Linux is much more aware of how to work with Windows (if present) then Windows is aware of how to work with Linux.
 
Old 03-21-2004, 05:28 AM   #12
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Sorry, posted while you were posting.

OK, then switch the priority of your hard drives, then. The reason is that Windows wants to be (and expects to be) on the first primary partition of the first hard drive (hda1, in Linux terms), and is not happy otherwise.

There is a bunch of documentation about how to set this permanently (I think), but a fast Google search has not turned up anything relevant (most likely I've framed the query wrong).

I'll look some more.
 
Old 03-21-2004, 05:37 AM   #13
c31c
Member
 
Registered: Mar 2004
Location: Planet Earth
Distribution: Arch Linux
Posts: 106

Original Poster
Rep: Reputation: 15
ok. I got it. thx

what if I would just edit my boot.ini so that the next time before I boot I change my Win drive to master? and put the linux drive beneath it, and then just reinstall linux?
Is that possible?
 
Old 03-21-2004, 06:36 AM   #14
c31c
Member
 
Registered: Mar 2004
Location: Planet Earth
Distribution: Arch Linux
Posts: 106

Original Poster
Rep: Reputation: 15
sorry. my english is a little f*cked up, you know
with "I got it" I wanted to say that I understand what you mean, not that the problem is solved
just for the case...
 
Old 03-21-2004, 02:36 PM   #15
jsmarshall85
Member
 
Registered: Aug 2003
Posts: 386

Rep: Reputation: 30
motub is exactly right. but you can try using a thrid party boot loader too. i use system comander. but to make life easier for you, install winxp first, then slack. with system comander i had XP installed and then installed system comander. sys-com also lets you partition the drives. and then install slack. when you do things this way you have to tell slack to install lilo to the root partiton (for me that is /dev/hdb2) and not to the MBR or it will over write sys-com.

i know this isnt really a solution to your ptoblem, but just another alternative. but the easiest thing to do is to install XP first on the first drive, then install slack and let it put lilo on the mbr. it will see that XP is there and add the correct entries for you. then when you reboot, lilo should load and present you with two options, windows xp and slackware.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual boot WinXP/Debian, grub error booting WinXP ChemBot Linux - General 5 02-22-2007 04:13 PM
dual boot hangs - slack & winxp timoioi Linux - Software 5 10-09-2005 10:18 PM
Advice (and some) Needed: Dual-HDD, Dual-Boot - Linux, WinXP elnomadkvn Linux - General 1 03-28-2004 10:11 AM
vmware Slack (Host)/WinXP - dual-boot issues gearsmithy Linux - Software 0 01-28-2004 10:42 AM
Dual boot - Slack 9.1, WinXP Pro blade00 Linux - General 10 12-30-2003 09:07 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration