LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How Do I Dual Boot XP and Ubuntu? (Ubuntu Is Installed First) (http://www.linuxquestions.org/questions/linux-software-2/how-do-i-dual-boot-xp-and-ubuntu-ubuntu-is-installed-first-632714/)

taurusx5 04-03-2008 09:06 AM

How Do I Dual Boot XP and Ubuntu? (Ubuntu Is Installed First)
 
I already have ubuntu 7.10 installed and I want to dual boot it with XP. What must I do to make this possibel? Thanks!

ronlau9 04-03-2008 09:30 AM

Most easy way install Windows XP first. In suse it possible to make a Ntfs partition while she is op and running
I have not use it suse 10.3 but 9.3 gives also the possibility to put MBR back in place .
So it is than possible to install windows XP
And if Ubuntu give yo the same option it is also for you possible to install Windows and reinstall Ubuntu
But if it is there do not shut you,re computer down before every think is OK
Another option is if you have already a ntfs partition install Windows most likely she write in MBR so Ubuntu do not boot
but she will if you put GRUB back

PTrenholme 04-03-2008 09:43 AM

What is your HD setup? (I.e., do you have only one hard drive, or more than one? What partitions do you have defined?) The easist way to answer that question is to open a terminal window and show us the output of the command sudo /sbin/fdisk -l /dev/sd?. To include the output in your forum entry, use your mouse to select the output and copy it to the clipboard. Then, use the Go Advanced button below the [b]Quick Reply{/b] text box to open the "Advance" message window. In that window there should be a "button" for inserting code into your message. Click it, and insert the output from the clipboard.

The output should look something like this:
Code:

$ sudo /sbin/fdisk -l /dev/sd?
Password:

Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x71eececc

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1          13      104391  83  Linux
/dev/sda2              14        6092    48829567+  83  Linux
/dev/sda3            6093        6128      289170  82  Linux swap / Solaris
/dev/sda4            6129      12161    48460072+  5  Extended
/dev/sda5            6129        6154      208813+  83  Linux
/dev/sda6            6155      12161    48251196  8e  Linux LVM

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
102 heads, 51 sectors/track, 120173 cylinders
Units = cylinders of 5202 * 512 = 2663424 bytes
Disk identifier: 0x00000001

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1  *          1      16126    41943700+  7  HPFS/NTFS
/dev/sdb2          16127      120173  270626247  83  Linux

Disk /dev/sdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1549f232

  Device Boot      Start        End      Blocks  Id  System
/dev/sdc1  *          1      29181  234396351    7  HPFS/NTFS
/dev/sdc3          29182      30401    9799650    7  HPFS/NTFS

Disk /dev/sdd: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x380e2056

  Device Boot      Start        End      Blocks  Id  System
/dev/sdd1  *          1          13      104391  83  Linux
/dev/sdd2              14      24792  199037317+  8e  Linux LVM


taurusx5 04-03-2008 07:19 PM

PTrenholme, thank you for the response. Below is the info that you requested of me. I hope this helps you help me in turn. Thank you.


x@xx:~$ sudo /sbin/fdisk -l /dev/sd?
[sudo] password for x:

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4d764d75

Device Boot Start End Blocks Id System
/dev/sda1 * 1 9327 74919096 83 Linux
/dev/sda2 9328 9729 3229065 5 Extended
/dev/sda5 9328 9729 3229033+ 82 Linux swap / Solaris

yancek 04-03-2008 10:13 PM

Here's a link explaining how to boot Linux from windows: http://www.linux.com/articles/113945

If you don't want to do that, you should create a grub boot floppy to boot ubuntu and install Grub after the windows install as windows will overwrite your grub: http://www.gnu.org/software/grub/man...-GRUB-natively
You could also download SuperGrubDisk and use it to boot.

Use the ubuntu partitioner or download GParted to re-size your Linux partition (sda1), create another primary partition to install windows to.

PTrenholme 04-04-2008 09:40 AM

Quote:

Originally Posted by taurusx5 (Post 3109970)
PTrenholme, thank you for the response. Below is the info that you requested of me. I hope this helps you help me in turn. Thank you.


x@xx:~$ sudo /sbin/fdisk -l /dev/sd?
[sudo] password for x:

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4d764d75

Device Boot Start End Blocks Id System
/dev/sda1 * 1 9327 74919096 83 Linux
/dev/sda2 9328 9729 3229065 5 Extended
/dev/sda5 9328 9729 3229033+ 82 Linux swap / Solaris

O.K., that shows that you have an 80 Gb hard drive, and that all 9729 cylinders of that drive are in use by your Ubuntu installation.

So you've got three options:

1) Try to shrink the main Ubuntu partition to make room for XP
2) Buy and install a second hard drive and install XP on it
3) Wipe the 80Gb drive, install XP using 40Gb, leaving the other 40 Gb free, and then install Ubuntu in the free space.

Option 1 requires you to re-partition the drive, and re-install GRUB after XP overwrites your MBR.

Option 2 requires that you spend some money and mess with your hardware.

Option 3 is easy, but you need to save (back up) anything you need to save before implementing it, and to restore the information afterwards.

So, how do you want to proceed?

Second thought re option 2: That option could also be implemented by replacing the HD by a larger one. I did it that way with my laptop, and used dd to copy the old drive's data (including the partition table) to the new, larger drive, and then used gparted to correct the partition table. Of course, I also needed a USB drive enclosure for the drive. In fact, what I did was buy a larger USB drive, transfer the laptop's drive image to it, and then swapped the drives so the larger one was inside the laptop.


All times are GMT -5. The time now is 07:03 AM.