-   Linux - General (
-   -   Installing Linux on the 1st partition and booting Windows off the 2nd (

Rav 12-04-2002 01:56 PM

Installing Linux on the 1st partition and booting Windows off the 2nd
Hi again everyone :)

Atm, I have Windows XP installed on the first partition of my primary master drive. Linux is currently installed on the second partition. However, I've had enough of this setup. It's time to deny Windows it's self professed inherent right to be there and put Linux on the throne.

The first step is easy. Repartition the first partition and install Linux there. Next step is to install Windows to what used to be the second partition. I'm going to put Windows 98SE there for now. I just need something to run a few apps and games I don't want to be without. If I boot up with a 98SE startup disk, it wont see the Linux partitions. Good. Then I'll install Windows and it will overwrite the MBR with it's own shit. Bad. Then I'll use a Linux boot disk to get into Linux and reinstall and configure LILO. Good. Then I'll reboot and have the option to boot into either successfully. I hope!

Have I missed anything? I just wanted to check here to make sure. I've googled this and it's hard to find any specific info about anything other than the "Install Windows THEN Linux" shit.

Tinkster 12-04-2002 03:39 PM

It's been a while since I last toyed with DOS,
but I do believe it (and thus Win9x/ME) WON'T
boot of anything other than C:, which has to be
the first primary partition on the first hard drive.


born4linux 12-04-2002 04:55 PM

In grub.conf, add these:

# this will fool windows
title Windows 98
map (hd0,0) (hd0,1)
map (hd0,1) (hd0,0)
rootnoverify (hd0,1)
chainloader +1

lilo can do the same. man lilo.conf for info

michaelk 12-04-2002 07:13 PM

Windows doesn't have to be on the 1st partition. On one of my PC's its the 3rd. Just set the bootable flag for that partition.

Don't know if it will work on a logical drive of an extended partition.

sandman 12-04-2002 08:44 PM

windows xp actually suggests in the book that comes with it that if you plan to dual boot with any other os to put xp on the second partition and let the other os have the first partition(c).

DavidPhillips 12-04-2002 09:45 PM

basically it will install on any partition, when you install it just use the partition you want to install it on

Rav 12-05-2002 06:47 AM

Thanks for the replies guys.

Windows wont let me do it. Not any version. It throws a wobbly because it needs to write files to a primary partition. Sure, you can install it to any partition you want, as long as it installs the boot files to a primary partition. Damnit!

Born4linux: Those instructions you gave look like the ones you use when you want to trick Windows into believing it's on the first hard drive. Cool trick, but not what I want. The second hard drive in my system is for data, temp files, preliminary backups and other general stuff. I'd like to keep it that way. The other problem is that when I installed the 2nd HD, I used Partition Magic to set it up and it doesn't contain a primary partition, so I can't install Windows on it even if I wanted to. I tried just to suss things out. It threw the same wobbly. I'm not repartitioning it. It's got about 60 GB of data on it and it will be a major hassle.

I don't like to give up when it seems that something can't be done, but should be possible to do, so I ended up coming across the following site:

It's a utility called XOSL (Extended Operating System Loader). It's free, and does look pretty cool. But I've never liked the idea of fancy boot managers at all. However, using this software, it's possible to install and boot Windows from a logical partition by installing it to a primary partition first, copying everything to a logical partition, using XOSL to hide the primary partition from Windows, and then doing a sys c: (on the logical partition that has now become c drive as far as Windows is concerned) - but XOSL has to manage it all. I understand the process involved perfectly after reading the FAQ, and it's given me an idea.

I'll have to throw in an old HD temporarily as my primary drive to install Windows. Then I could copy that installation to the logical partition I now have waiting. I'm wondering if there is any way to get LILO or grub to trick Windows like XOSL does (ie. Hide a primary partition from Windows). It's a long shot I know, but I feel it's worth asking. There'll be details to deal with I know, but if this is possible then I'll devote as much time as I need to in order to get it happening.

Thanks again everyone :)

DavidPhillips 12-05-2002 02:07 PM

that's why you can't install windows 98 over winXP, it will wipe out the boot stuff

Why not install windows, and then install linux

you can also move linux and then fix lilo to boot it, this way you can keep your linux system

Rav 12-06-2002 02:07 PM


Why not install windows, and then install linux
That's how I've always done it.

But, I really do want Linux to reside on the outside of the disk, where your primary OS should be. I could pretend that it's just because the outer edge of a HD is faster (and it is) but it's mostly because I'm very particular, and I want Linux there.

I haven't had any luck finding more info about this yet, and maybe I wont because perhaps it's just not possible. But for me it's the ideal setup, and I'll keep looking for a way to do it :)

Thanks again for your replies :)

DavidPhillips 12-06-2002 05:38 PM

try making the active partition the one you want to install windows on before installing it

zLinuxz 12-07-2002 01:37 PM

it's about pride then, :D

jimdood3 12-18-2002 03:55 AM

You are right it does have to be installed on a primary partition, but you can have 4 primary partitions on 1 hard drive. You cannot use fdisk to create them, but partition magic will create as many primaries as you need up to 4. Works great. Partition magic can also hide primaries as needed. By the way the "extended" partition counts as a primary.


DavidPhillips 12-18-2002 04:09 AM

you can also do it with fdisk in linux

finidi 12-20-2002 07:17 AM

I have Linux on hd0 and W98SE on hd1. GRUB doesn't work, but the machine can boot W98 changing boot device in BIOS. I tried all conceivable commands in grub.conf , the last attempt was:

chainloader (hd1)+1

but no success. If anyone knows how to make GRUB work......

zLinuxz 12-21-2002 11:11 AM

did you install Grub in the first part of the harddrive or in the MBR?
Why do you say it doesn't work?, does it show up in screen, but you can't boot Linux from it?, do you not see a Linux label?, what exactly do you mean when you say "it doesn't work"?

All times are GMT -5. The time now is 04:46 AM.