LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 04-14-2009, 12:08 PM   #1
Latitude
Member
 
Registered: Mar 2009
Posts: 65

Rep: Reputation: 16
Can't figure out How to boot from another partition on Windows XP


Hi folks,
I made a partition out of some empty space on a pc that I have running windows XP. Now I want install Linux on it, but I can't figure out in Windows XP how to boot my other partition. Is there a simple GUI that will guide me through or will I have to CLI my way through it? Any clear and concise documentation or instructions will help. The literature on the web that I've found today has not been able to help. Thanks!

Last edited by Latitude; 04-14-2009 at 12:09 PM.
 
Old 04-14-2009, 12:12 PM   #2
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,187

Rep: Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379
I'm not sure if I have this entirely correct, but just to clarify: What exactly is on the first partition then? If you installed XP on a different partition other than a primary one, then XP will not boot. It must always be installed on a first primary partition. Linux is more flexible.


From also what I think you are asking is: You are trying to boot Linux from the XP? If thats the case, you can do that, which involves editing a file called boot.ini, and providing it with a file that has the first 512 bytes of your linux MBR.


Still I'm not really sure what you mean, please clarify on your problem.
 
Old 04-14-2009, 01:42 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
As far as I know, the Windows boot-loader is pretty limited. I don't know that it has the ability to select different locations or partitions. But in my experience most people who are booting multiple versions of Windows are using different drives, mainly because of Windows' other peculiarities wrt drive-letters, etc.
 
Old 04-14-2009, 01:56 PM   #4
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,299
Blog Entries: 61

Rep: Reputation: Disabled
Any linux distro will recognise your XP installation and add it to their boot menu.
 
Old 04-14-2009, 01:59 PM   #5
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,187

Rep: Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379
Quote:
Originally Posted by sundialsvcs

As far as I know, the Windows boot-loader is pretty limited. I don't know that it has the ability to select different locations or partitions.
I have actually booted Linux using NTLDR (NT4 and 2000), and had no issues. I haven't tried it with XP but I assume it is the same process since NTLDR is still used. Vista however would be a different story. All you really need is a file that contains the first 512 bytes of the sectors you are booting, regardless of where your linux partition is, since NTLDR doesn't really take into account where the partition on your hard drive is. Even theoretically if it is on a second hard disk.

Quote:
From slackbook.org

Installing Windows NT should be fairly straightforward, as should installing Linux. From there, it gets a little more tricky. Grabbing the first 512 bytes of the Linux partition is easier than it sounds. You will need to be in Linux to accomplish this. Assuming your Linux partition is /dev/hda2, issue this command:

# dd if=/dev/hda2 of=/tmp/bootsect.lnx bs=1 count=512

That's it. Now you need to copy bootsect.lnx to the Windows NT partition. Here's where we run into another problem. Linux does not have stable write support for the NTFS filesystem. If you installed Windows NT and formatted your drive as NTFS, you will need to copy this file to a FAT floppy and then read from it under Windows NT. If you formatted the Windows NT drive as FAT, you can simply mount it under Linux and copy the file over. Either way, you will want to get /tmp/bootsect.lnx from the Linux drive to C:\BOOTSECT.LNX on the Windows NT drive.

The last step is adding a menu option to the Windows NT boot menu. Under Windows NT open a command prompt.

C:\WINNT> cd \
C:\> attrib -r -a -s -h boot.ini
C:\> edit boot.ini

Add this line to the end of the file:

C:\bootsect.lnx="Slackware Linux"
Code:
# dd if=/dev/hda2 of=/tmp/bootsect.lnx bs=1 count=512
I guess this is the key piece right here. If lets say your linux partition could be on hdb1, or sda2, or whatever, then it doesn't matter. Simply extracting the 512 bytes of where the linux bootloader is located would be sufficient, and simply have NTLDR's boot.ini call on the file itself. As limited as NTLDR is, there is no reason for this method not to work. However, I am still unclear as to what exactly the OP is trying to accomplish. This might not be it at all, since he/she has yet to clarify so we can better resolve the OP's issue.

Last edited by Jeebizz; 04-14-2009 at 02:03 PM.
 
Old 04-15-2009, 07:49 AM   #6
Latitude
Member
 
Registered: Mar 2009
Posts: 65

Original Poster
Rep: Reputation: 16
I have a PC running Windows XP that has over 100GB free on the hard drive, so I made a small 10GB partition on it to try a Linux distrubition. I believe this is called dual booting. I created the partition using diskmgmt.msc and came to a screeching halt because I couldn't figure out how to begin to install Linux on that partition. I have installed a Linux OS before on a different computer, so let me be clear that installing is not the problem. Navigating to start up that partition is what the problem is. I looked in BIOS for a way to get that partition running so I can install Linux on it, but didn't see how to do it. A little help would be appreciated. It is so much easier when you have an empty drive to install on...

Last edited by Latitude; 04-15-2009 at 08:06 AM.
 
Old 04-15-2009, 08:45 AM   #7
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,187

Rep: Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379
Ok, so you set aside a partition strictly for Linux then it makes thens a little clearer. However since you used a windows disk utility, that is another thing that could be whats causing your issue. I recommend getting a program called 'gparted' It boots as a livecd, or on a usb key. What you should do is just resize your windows partition with that, and then leave the new space as an unformatted partition (or if you really want, you can go ahead and format it to any Linux FS you want, ext2/3, reiserfs, jfs, or xfs). I would probably though just recommend leaving it as free space, boot up your respective Linux disc, and have the the installer take care of formatting the unformatted space.

I don't know what distro you plan to use, but if it is a *Buntu based one, it should easily tell you that you have windows on another partition, and therefore guide you accordingly to set up your system as a dual boot system.


Let us know if this helps any at all. Good luck.
 
Old 04-15-2009, 10:04 AM   #8
monsm
Member
 
Registered: Feb 2005
Location: London, UK
Distribution: Gentoo
Posts: 568

Rep: Reputation: 37
Hi,
Given that you have already created a partition to install to. I think the only thing you need to do is to insert a Linux DVD (e.g. a Ubuntu one), run the installer and see if it finds the partition you created. If it does, just select it.

Is this where you are having problems now?

The Linux installer can add the Grub boot loader. This will give you a nice menu with options to boot Linux or Windows. With a bit more trouble you can also have the Windows bootloader give you the option to boot Linux (see Jeebizz post above).

Mons

Last edited by monsm; 04-15-2009 at 10:08 AM.
 
Old 04-16-2009, 05:26 AM   #9
Latitude
Member
 
Registered: Mar 2009
Posts: 65

Original Poster
Rep: Reputation: 16
Ok I will try out the solutions above and see how it goes. It's just frustrating that it's the year 2009 and Windows doesn't have a quick and easy way of booting to another parition, I have to go find free open source programs and advice to help figure out how to do it. It's now clear that Windows doesn't want you using anything other than their for-profit software. They make it no easier to use anything else than their OS.

I chose to try installing CentOS 5.2 because CentOS is similar to Red Hat Enterprise Linux, and I want to learn to use those Operating Systems. I also want to learn how to do Kickstart Configurations. I will let you know if my installation is successful.

Last edited by Latitude; 04-16-2009 at 05:35 AM.
 
Old 04-16-2009, 07:37 AM   #10
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
Only Mexican Al Qaida space pirates need to boot from another partition, so for the good of society the government and Microsoft have decided you don't need to do that. :fightingmad:

Don't forget that, unlike Linux bootloaders, the Windows XP bootloader looks for a partition with the boot flag set. It then transfers control to the secondary bootloader in the partition's boot sector which, in turn, looks for the boot.ini file there.

man fdisk for how to change the flag from one partition to another. gparted should be able to do it too.
 
  


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
Wine installed a program onto my windows partition, Windows BSOD on boot. DJGCrusader Linux - Enterprise 9 08-14-2009 08:25 AM
dual boot - Grub won't boot Windows on /windows/D partition biosol SUSE / openSUSE 9 04-09-2006 08:14 PM
Messed up partition table and Windows' partition boot sector pyromithrandir Linux - General 32 04-08-2006 12:26 PM
Deleted linux partition, how to boot Windows partition? mysak Linux - General 3 12-14-2005 04:22 PM
Did partition with partition magic now can't boot windows deancicca Programming 1 12-08-2005 10:27 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 03:39 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