WindowsDualBootHowTo

Revision 4 as of 2005-07-18 22:22:30

Clear message


I intend to finish this once I receive my official Ubuntu CD's, which I will use to do a fresh install.



I intend to split up the page into 3 main groups: Win2k, because it seems different than XP, WinXP, and Win9x/ME Also, the errors will be put into another section of this page. So: Pardon our dust, but remodel we must.


Outline for Win 2000/XP Dual Boot Instructions

  1. Download/burn, order CD
  2. Prepare filesystem
    • BACK UP DATA THAT YOU CONSIDER VALUABLE! -- ChristopherCmolik

    • download free source partioner
      • [http://www.partimage.org/ Partimage]

      • Other suggestions? Any that work within Windows like Partition Magic?
        • Another suggestion: Download [http://knoppix.org Knoppix} and use QTParted to resize NTFS, but DEFRAG WINDOWS PARTITION FIRST AND THEN RUN CHKDSK AFTER RESIZING. (rt-click on C: drive in My Computer, tools, Error Checking in XP, ScanDisk in 9x/ME/2K) -- ChristopherCmolik

    • Partition space
      • FAT32
        • Benefits
          • Sharing e-mail, etc.
      • NTFS
        • Captive NTFS driver available, which allows NTFS write, but support is dangerous -- ChristopherCmolik

  3. Insert CD / Restart / Check Boot Order
  4. Installer Instructions
  5. On the mailinglist, people complain about grub errors, this needs to be addressed here as well
    • Are you talking about deleting the XP/2000 MBR and thus royally messing up Windows? If not, provide examples please! Smile :) --KevinMulligan

    • Still no response on this. --KevinMulligan

    • Grub works OK with XP, and 9x/ME users -- ChristopherCmolik

Probably, the installer has issues in this regard. But I found a way around it:

+Successful Easy Dual-boot Same-Disk installation with WinXP+

After spending several days fixing WinXP when Ubuntu install killed the MBR. I figured out how to install Ubuntu on an existing WinXP machine for dual boot with relative ease. Furthermore, you can boot to either OS from the other's bootloader. I'm writing this from the perspective of someone familiar with windows --JohnUghrin

What you need:

1. A partitioning program like Partition Magic. I used Partition Commander from Vcom.

2. An Ubuntu installation disk.

3. make sure your BIOS is set to use Large Byte Addressing or LBA on the hard drive (if it can)

4. make sure your BIOS is set to boot from CDROM first.

Step One Setting up the partitions: Windows is likely set up in the first partition. That's fine leave it there. You may need to shrink the partition that windows is in to make room for three more partitions.

Right after the Windows partition, make a Linux partition to hold Ubuntu. Then make a smaller partition for the linux swap file. Then make a third partition for sharing information between Linux and XP. Make this partition FAT32, because XP only understands FAT32 and NTFS.

Now that's a total of four partitions, you can make them all primary (which will be important in a moment). They will be numbered 0, 1, 2, 3. If you restart the machine, WinXP will pop up a text screen asking you to pick between starting in Windows and "unknown OS on drive C:" or something like that. Use your partition software to make sure you know the actual partition numbers for each partition, and write that down.

Step Two Installing Ubuntu:

Make sure your BIOS is set to boot from CD. Insert the Ubuntu CD, and restart the machine. During the installation you will get to a section on partitioning. DO NOT repartition the whole drive, you'll lose everything. Instead, follow the manual partitioning instructions to do the following:

1. Make the second (Linux) partition bootable, and set to mount as "/".

2. Set up the third partition as the linux swap partition

3. mount the fourth partition (without formatting) as "/datashare" or something similar.

4. Proceed with the installation as normal until you get to the GRUB part. _DO NOT INSTALL GRUB IN the Master Boot Record or MBR_. When you say no, GRUB will request to be installed in a bootable partition. Luckily, you have one, the Linux partition. Now you need those partition numbers.The GRUB installer uses some odd (for Windows users) codes to refer to them.

Partition Number

GRUB Code

my names

0

(hd0,0)

WindowsXP

1

(hd0,1)

Linux "/"

2

(hd0,2)

Swap

3

(hd0,3)

DATASHARE "/datashare"

So, you tell it to install in (hd0,1). It will. Proceed with the rest of the installation with no worries. When it reboots to finish the install, the machine will boot into Ubuntu (sortof) and finish the installation.

5. When the installation is finally done, restarting the machine will produce a GRUB menu similar to the one you saw with XP. Only this time, it should work for either OS. Try it out to make sure you can boot into XP. If you can't, you may have to work some SystemRescue magic with Boot.ini files and the like.

6. If this works, and you don't mind GRUB, because you want to boot into Linux more often. You are done!

Step Three (Optional) Setting up to boot into XP by default.

Okay, the basic problem here is that XP doesn't know how to boot Linux. You have to teach it. And here's how:

1. Boot into Ubuntu normally.

2. Open a terminal window.

3. type in the following command:

dd if=/dev/hda2 of=/datashare/ubuntu.bin bs=512 count=1

4. exit unbuntu and reboot into XP.

In XP:

5. open up START|My Computer and open the C: drive. Also, open up the "DATASHARE" drive and copy the Ubuntu.bin file into the C:\ folder.

6. In the explorer menubar, open up the Tools|Folder Options|View tab and select "Show hidden files and folders". You also need to uncheck the "Hide protected Operating System Files". Then click apply and close the Folder Options.

7. A whole bunch of files will miraculously appear in your "C:\" explorer window, we only care about the one called "Boot" or "Boot.ini". Right click on it, and select "Properties". Uncheck the "Read-Only" box at the bottom. Close the properties window.

8. double-click on Boot.ini to edit it in Notepad. You'll probably see some line at the bottom that says ""c:\="Unknown Operating..." "" That's the line to change. Make it say something like ""C:\Ubuntu.bin="Ubuntu Linux" "". My Boot.ini file looks like this:

[boot loader]
timeout=5
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/NoExecute=OptIn
C:\ubuntu.bin="Ubuntu"

9. Save it, make it "read only" again. Hide all you system files and hidden files again.

10. Reboot into your partition program, and Toggle the WindowsXP partition as bootable. This should make the Linux partition unbootable, that's okay.

11. Reboot. It should come up with that Windows screen asking you if you want Windows or...Ubuntu! Try it out to make sure it worked.

I hope this helps people. Special thanks to Ed B. Park for this page which gave me most of the help I needed. -John Ughrin


--- My feedback on today's WinXP Home + Ubuntu (warty) live together (on an Amilo L1300 if that matters):

1. If your WinXP installation is an old one, Defrag with its native tools first (to move files together within the Windows partition)

2. System Rescue CD-ROM (http://www.sysresccd.org/index.en.php) is brilliant. Use it! to resize your NTFS partition so there's room for Ubuntu. Also: do your Ubuntu partitions (root, possibly /home, swap) with this tool since I experienced trouble _creating_ new partitions with Ubuntu. Better they're already there, and Ubuntu just fills them up..

3. Once done, _absolutely_ make a backup of your MBR (Master Boot Record). See Google.. Smile :)

4. Install Ubuntu the 'easy way' but DO NOT allow it to override MBR. It says it "should be harmless" but for me, was not. Instead, install GRUB to /dev/hda2(or whatever) and use WinXP boot.ini for multiboot (well, I did). See: Ed's Howto (http://www.geocities.com/epark/linux/), also a brilliant link.

Good luck! Wink ;)

From EduardoSilva Sun Dec 5 18:24:23 +0000 2004 From: Eduardo Silva Date: Sun, 05 Dec 2004 18:24:23 +0000 Subject: qtparted as found in Kurumin, Knoppix Live Cd's Message-ID: <20041205182423+0000@www.ubuntulinux.org>

Kurumin and knoppix(i think, since kurumin is based in knoppix) (http://www.knoppix.org/) live cd's have QTParted (http://qtparted.sourceforge.net/), with which I sucessfully resized a FAT32 partition where win98 was installed, and created a new one for ubuntu. It has support for resizing NTFS which is a very needed feature these days.

From AskoKauppi Thu Jan 6 10:38:49 +0000 2005 From: Asko Kauppi Date: Thu, 06 Jan 2005 10:38:49 +0000 Subject: Just a reminder.. Smile :) Message-ID: <20050106103849+0000@https://www.ubuntulinux.org>

If you're using XP bootloader as the primary menu, and upgrade warty->hoary, you may need to regenerate the "linux.bin" copy of Grub's boot block within XP domain. "dd if=/dev/hda2 of=linux.bin bs=512 count=1". I did know this, but still.. there's only four bytes changed, but the result is a blank screen with "GRUB" on it. Nothing more, might get you scared? Wink ;)

From AdamKaplan Thu Feb 3 02:49:15 +0000 2005 From: Adam Kaplan Date: Thu, 03 Feb 2005 02:49:15 +0000 Subject: Fresh Dual Booting is easier Message-ID: <20050203024915+0000@www.ubuntulinux.org>

If you do not have an existing Windows install (e.g new computer, fresh format or Windows died <- this is why I switched to Ubuntu) dual booting is even easier!

1. Start the Ubuntu installer 2. Use the installers partitioner to wipe the drive is needed. Then create a partition for Windows. 3. Apply changes and quit the installer 4. Start windows installe and install the the windows partition you created. 5. Once that is done, restart the ubuntu installer. 6. Proceed with Ubuntu installation as normal, except do not let the installer delete the windows partition when it prompts you. Do allow it to overwrite the windows boot loader with Grub. 7. Now you should have a working dual boot using Grub. Easy.

I used this method and everything is working perfectly. Although it sshould be noted that I did this a while ago and may be slighly off in my instructions. Use common sense and dont activate windows until you are sure everything is setup correctly. BTW, I havent booted into windows since doing this Wink ;-)

From JustinBellew Wed Feb 23 09:55:02 +0000 2005 From: Justin Bellew Date: Wed, 23 Feb 2005 09:55:02 +0000 Subject: About that fresh dual boot... Message-ID: <20050223095502+0000@https://www.ubuntulinux.org>

I am curious to know if you have loaded Windows, even to test whether it works -- my issue is described in detail below:

stop: c000021a {Fatal System Error} ... "oh, great." (so it began...) The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000). The system has been shut down."

Here we go... I'm a newbie to Linux and this is one of those times when I feel like I should just regress and submit to the powers of M$, but I'm stubborn and actually care about civil liberties, invasion of privacy, etc, so I'm in this one to win it.

I have searched through the existing threads on this one as well as having done some poking around on the net for a solution and hereby throw myself upon the mercy of greater minds and experience:

Here's how the boys at M$ describe my problem -- that is, this is almost EXACTLY it: http://support.microsoft.com/defaul...kb;en-us;317189

There are 2 things that don't fit 1) they seem to imply it's only an NT thing -- my system is XP Pro (specs follow) 2) their message is for 0xc0000017 status - mine is 0xc000003a

-BRAND new laptop (if it had ears, it would still be wet behind them - I'm talkin' this-week new) -IBM Thinkpad T42, Pentium M 1.7 GHZ, 60GB, 7200 RPM HDD, 1GB PC2700 DDR SDRAM, Intel Pro Wireless 2200 integrated wireless B/G

It's been partitioned successfully using Partition Magic and all was well with XP... then I installed Ubuntu (latest stable of Warty Warthog). The concept all along was to buy this machine with the express intent of running Windows parallel with Linux. Now I'm starting to feel like it might be cheaper to pay programmers to write scripts for every non compatible peripheral that sparked this fine mess...

Now, I have a machine that loads to the GRUB boot loader beautifully, gives me 5 options (1 Ubuntu and one Windows safe, 1 Ubuntu and one Windows normal, and memory test, although the windows options both appear to be the same since neither says "safe", I imagine one is supposed to be safe... either way, neither works. ) The Ubuntu system works perfectly (of course, it WOULD be Windows with issues... ug.)

Regarding a post I read in the threads of similar topic o another site, if the solution is to take the CDs that came with it and do a "fixboot" or a "non-destructive reinstall", please provide some detail as I have no idea what the implications are / what I should expect during the process...

Thank you in advance for your time!

From unknown Sat Feb 26 14:21:57 +0000 2005 From: Date: Sat, 26 Feb 2005 14:21:57 +0000 Subject: So What do I do now? Message-ID: <20050226142157+0000@www.ubuntulinux.org>

Okay, to this is a big headache for me... I've wanted to try Linux for some time. I burn the Ubuntu CD (Warty Warthog). I've got WINXPpro SP2 installed on the first partition. Partition Commander has already created a 20+GB partition for linux and a 5GB swap partition.

I start the Ubuntu installer, which goes nicely until we reach the partition stage. I go into the manual partitioning, and eventually convince it to let me install it into the existing partition without erasing the entire drive. However, I notice something that disturbs me...in the process of selecting that drive, it has somehow toggled the XP partition as not- bootable. Greatly afeared I change it back, I proceed.

The installer adamantly refused to allow me to proceed with the installation unless I wrote GRUB into the MBR. I don't know why. I knew it would be trouble. But a utility called SystemCommander came with partition commander for handling muliple OSes. I figure it should be able to restore it.

No dice. No Windows. No way to even get windows to install itself onto that partition to fix itself. The partition appears to be bootable, but...dead air when I try. GRUB thinks windows is there, but no luck getting it to run.

I must say as someone who would like to be a linux user that this type of thing is a big hurdle. The instructions, options, and explanations in the installer need to be more informative and "smarter". If this is a common problem, as the comments above suggest, then why are there not prominent warnings on the download site? Why is this only a secret you discover after you've ruined your existing installation. I seriously recommend updating the "front pages" for download with prominent directions to performing a dual-boot installation.

From johndavideriksen Sun Apr 3 23:58:32 +0100 2005 From: john david eriksen Date: Sun, 03 Apr 2005 23:58:32 +0100 Subject: new user Message-ID: <20050403235832+0100@https://www.ubuntulinux.org>

i've experienced variations of all the issues and gripes listed above. i attempted a dual-boot install with windows on one hd and warty on another. everything went fine, and i was able to boot into ubuntu. however, when i tried to boot into xp using grub.. nothing..

i tried editing the line in grub that boots xp, and found that it was pointing at a partition in the drive containing ubuntu, not the partition that actually contained xp. i changed the line to point to the right partition, and still nothing. i rebooted and then grub flashed me an Error 17, and that was the end of my experience with ubuntu.

i had to enter bios, disable the disk containing ubuntu, and then i was able to boot into windows, but ubuntu became inaccessible.

i will try to obtain a partitioning tool so i can install ubuntu to the same disk as my win xp install, and follow some of the directions above more closely.

has anyone successfully installed ubuntu onto a winxp system with ubuntu in a drive *other* than the one containing xp?


Dual Booting on Separate Hard Drives

edit /boot/grub/menu.lst, find the section for your windows entry and add:

map (hd0) (hd1)
map (hd1) (hd0)

Windows needs to be tricked to think that it is the Primary Master(and not a slave) Wink ;)

eg:

title Microsoft Windows 2000 Professional
root (hd1,0)
savedefault
chainloader +1
map (hd0) (hd1)
map (hd1) (hd0)

--David Fu


From ManuelSiggen Tue Apr 5 14:10:59 +0100 2005 From: Manuel Siggen Date: Tue, 05 Apr 2005 14:10:59 +0100 Subject: Same "Fatal System Error Session Manager" problem here Message-ID: <20050405141059+0100@www.ubuntulinux.org>

I've got a IBM Thinkpad X40 on which I installed Ubuntu Hoary RC. X40 Thinkpads have a small partition (initially FAT32, but automatically converted to NTFS at first run) which contains a stripped-down Windows XP setup used as disaster recovery mechanism (the so-called 'access IBM' feature).

I installed Ubuntu and let it override the Master Boot Record, and now I get a Blue Screen Of Death with error messsage below everytime I boot on the Windows partition (Ubuntu runs fine though) :

  • stop: c000021a {Fatal System Error} The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000). The system has been shut down.

I tried fiddle with GRUB options, but without much success so far.

From AlejandroLópez-Valencia Fri Apr 29 18:24:51 +0100 2005 From: Alejandro López-Valencia Date: Fri, 29 Apr 2005 18:24:51 +0100 Subject: Making Windows bootable again Message-ID: <20050429182451+0100@https://www.ubuntulinux.org>

Regarding Step Three. You don't need a third party commercial utility, rather use parted(1). Don't just retype what I'm going to write next like a parrot! Take your time to read it and let it sink in your mind before you proceed.

After you have created a copy of the boot sector with dd, you will want to do two things:

1. Create a boot floppy in case something goes very wrong: (or you can have a knoppix CDROM running on another computer, and then netboot the X40, just press F12 at startup)

sudo grub-install /dev/fd0

If the floppy disk is not formatted, format it first; in that case:

sudo mkfs.msdos /dev/fd0

before adding the boot sector will do (this is not strctly necessary, but will help in case you want to transfer the ubuntu.bin file through a floppy to windows). You can always return to your Ubuntu install by setting the BIOS to boot up from a floppy.

2. In general, your windows partition will be in hda1 (the first partition in hard disk a, the IDE0 master disk). What you need is *to tag that partition as bootable*. The following command will do:

sudo parted /dev/hda1 "set 1 boot on"

Going into more detail, if you want to do it one step at a time:

sudo parted /dev/hda1

at the prompt type "print" without the quotes and read the list carefully, the first partition, the one numbered "1" will say NTFS (or FAT32 depending on your system). That's where your windows installation resides. Type at the parted prompt:

set 1 boot on

Type "print" again to make sure that now partition 1 has the boot gflag on and then type:

quit

at the parted prompt.

Now you are ready to reboot the machine. Make sure the floppy is not inserted in the drive and type:

sudo shutdown -r now

at the terminal. Watch fun things fly by the screen. If everything went OK, Windows should come back up automatically.

At this poing resume following the instructions above. One note. If you are using Windows XP (that is the brand name of Windows NT 5.1, as Windows 2000 was the brand name of Windows NT 5.0, and Windows 2003 is the brand name of Windows NT 5.2, hope that clears some doubts people may have), you don't need to go into a lot of contortions with atributions and hidden flags to edit boot.ini. Just do a right click on the "My Computer" icon and select Properties, select the advanced tab, click on button that refers to booting options (don't remember the exact name off-hand) and in that window click on the edit button. You'll get a notepad session with the contents of boot.ini. When you save it, the file will keep all the magic filesystem flags it needs for Windows to use it properly.