Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-21-2007, 09:04 AM   #1
LQ Newbie
Registered: Aug 2007
Posts: 5

Rep: Reputation: 0
Dual booting whith win xp already installed

Hey, I am completely new to linux and I want to try it out.
So I downloaded ubuntu 7,04 and I have burned out the cd.
Now I want to make sure I don't mess up my entire computer whith dual booting.

I have 2 hard drives the first has windows installed on one partision and my "usage" space on the other. And the seccond hard drive is ready for linux. I yust wanna know how I can install linux on the computer without messing windows up when I have linux and If I desside to uninstall it

I tried searching but I dint find any cases that wold make me 100% secure :-)
Old 08-21-2007, 09:21 AM   #2
Registered: Dec 2002
Location: St Louis, MO
Distribution: Arch Linux
Posts: 99

Rep: Reputation: 15
Yes, of course you can do that. Linux is my primary OS but I also retain a windows install for a game or two and for things at work that Linux cannot run.

I have 2 hard drives one with windows and one with linux. here is how mine is set up.

Drive 1(sda): Using Windows MBR
Partition 1: Windows (ntfs) (bootable)
Partition 2: Windows (fat32) to share files between linux and windows

Drive 2(sdb): Using Grub MBR
Partition 1: Small partition mounted for /boot (bootable)
Partition 2: Big partition mounted as / (root)
Partition 3: Swap space

Grub configured to chain load the boot code from drive one should I choose to boot into windows. Motherboard set to boot from the secord drive.

This has the advantage of being able to boot into a working OS should either of them fail for some reason (with a bios) change.

The only thing I have to do is to change where grub installs (/dev/sdb). Some distros give you a warning (perhaps all though I don't remember) if you install grub on any drive but your first.

There are many ways to do this, and this is just one idea. Others will probably chime in with others.

Good luck
Old 08-21-2007, 09:25 AM   #3
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Safest way: unplug the windows disk, move the Linux disk to its connector, install Linux, plug the other disk back in. This implies that you XP won't be detected by the installer and that you'll have to add an entry to the boot menu yourself. Not difficult, though. 100% failsafe.

Alternative approach: switch you disks in BIOS so that the Linux disk is listed as the first one. Select that specific disk during install and have GRUB installed to the MBR. This shouldn't affect the windows disk either and XP will automatically be picked up and added to GRUB. Can be 100% failsafe providing that the instructions are followed to the letter.
Old 08-21-2007, 09:29 AM   #4
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Why not just choose the second disk when you install? Much simpler..
Old 08-21-2007, 09:48 AM   #5
Registered: Nov 2006
Location: Clarksville, VA
Distribution: Linux Mint, Ubuntu Server
Posts: 114

Rep: Reputation: 15
well, the best I can suggest if you think you might uninstall Linux would be:
when you install Ubuntu don't install a boot loader and just configure Boot.ini in Windows to point to your Ubuntu installation
here is a Howto that I found for setting this up

the advantage to doing it this way is that if you do uninstall Ubuntu you won't have problems booting into Windows since there will be no files left for the grub/lilo bootloader to point to for config info

after the uninstall you simply remove the lines pertaining to Ubuntu and your done

otherwise install the bootloader normally and if you uninstall Ubuntu you then have to boot your XP CD and run fixmbr to resinstall the Windows bootloader
this is the method that I have used and it works fine
I have been experimenting with multiple distros and have done more format reinstalls then I care to think of until I realized that this was all I had to do

I have not tried booting with boot.ini so I can't tell you if that method truly works but the source of that howto is a reliable one
Old 08-21-2007, 10:05 AM   #6
LQ Newbie
Registered: Aug 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for all the feedback (almost blown away :-D)

I think I will try Nigtshade's sulution, If what he say is true that is the simplest I think :-)

Now then its yust for me to install linux, and then learn how to install tings a bit more complicated than windows me thinks :P

Edit: Adding a question. How does the linux bootloader work, can I like set it to automatecly start windows or linux? or do you need to select before each startup?

Last edited by Andro1337; 08-21-2007 at 10:09 AM. Reason: Add a question
Old 08-21-2007, 04:53 PM   #7
Registered: Dec 2002
Location: St Louis, MO
Distribution: Arch Linux
Posts: 99

Rep: Reputation: 15
More complicated, emmmm... perhaps, different to be sure.

There are 2 popular boot loaders (perhaps more) lilo and grub.

I'm not sure which is more popular, Ubuntu will use grub.

Yes, you can have it default to which ever you want or you can have it default to the last one you booted (this is what I do).

The line in the menu.lst file (grub config) that will do that is:


Just make sure the os's in the config all have the option:

Hope this helps
Old 08-21-2007, 05:19 PM   #8
LQ Newbie
Registered: Aug 2007
Posts: 5

Original Poster
Rep: Reputation: 0
A little update and a little plea for help.
I installed ubunto on the 2nd hard drive
but now when the computer tried to boot up
it showed GRUB error 21
I needed to run my winxp cd and fixmbr to load windows.
Old 08-21-2007, 05:57 PM   #9
Senior Member
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 14.2 Solus
Posts: 2,264

Rep: Reputation: 51
GRUB error 21 means it can't find the disk containing the menu.lst.

You need to post specific info regarding your disk layout and a copy of your /boot/grub/menu.lst.
Old 08-21-2007, 06:05 PM   #10
LQ Newbie
Registered: Aug 2007
Posts: 5

Original Poster
Rep: Reputation: 0
I can tell you my disc layout,

but seeing I cant boot up linux atm I cant give you the file.

1. HD
Partition(ntfs) 1 windows xp 20 gb
Partition(ntfs) 2 Storage area 280 gb
2. HD
Partition(e**3) 1 linux 80gb *dont remember the file system quite :-)
Partition(fat32) 2 transfer area

I installed linux to partision 1 on the 2nd HD
Restarted and the error 21 occured.
Any tips on where I have gone wrong then?
Old 08-22-2007, 07:10 PM   #11
LQ Newbie
Registered: Aug 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Yust a little bump. first and only :-)
Old 08-23-2007, 09:25 AM   #12
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Your GRUB menu may have been installed incorrectly. I suggest that you go into BIOS, make the Linux disk the first one and reinstall. Make sure, when/if requested, to place GRUB on the MBR. Having the Linux disk as the first one means that it won't overwrite you windows bootloader, i.e. nothing to worry about should it fail again.
Old 08-23-2007, 09:51 AM   #13
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Using XP to boot a Linux takes about 10 times more effort and this is a good example of it.

You have to fix a few things first. Once the installation has completed "DO NOT" alter the disk order because you will send the boot loader to the wrong disk to pick up the OS and get Error 21---->Selected disk does not exist.

Your quickest way out of the hole is to put the Ubuntu disk back and boot it up to run as a Live CD. Click Accessories and then terminal and supply the output of the following inofrmation. You should be able to get into Internet and copy and paste the information into the post.

(1) "sudo fdisk -l"
(2) "cat /boot/grub/menu.lst"
(3) "cat /boot/grub/"
(4) "cat /etc/fstab"

Xp is not going anywhere and will be fired up eventually. So let us have those information and we could advise the next step.

If you for whatever reason you can't supply the above information you can try another attempt. This time take a look at the Section A of the 2nd link in my signature. It is especially written for users able to run two hard disks.


Few tips here

(a) You can get XP boot again by restore its MBR with a Dos floppy or a XP/Win2k installation CD. Details in the last link of my signature. You should get an error free dual boot system by following the steps.

(b) The Ubuntu CD is all the tool you need to fix Grub, so learn to use it.

Last edited by saikee; 08-23-2007 at 09:56 AM.


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 booting RH Linux with Win XP jgnasser Linux - Software 2 09-21-2004 10:54 AM
Dual Booting Help (( Win Installed without new partitions )) Arc4ne Linux - General 4 08-30-2004 09:46 AM
Dual Booting Win XP and RH 8.0 Hippolilo Linux - Newbie 6 11-21-2002 12:53 AM
dual booting with with Win XP duckjob Linux - Newbie 4 01-16-2002 10:50 AM
Dual booting system w/ Win ME Cannon Linux - Newbie 7 04-09-2001 12:35 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration