Dual Boot Issues

Asked by blodflekk

Brand new user here, just finished setting up Ubuntu and setting everything up to work but I need some help with dual booting, I have installed Ubuntu 8.04.1(64bit) along side my windows install (XP Professional, 64bit) and I cant get into my windows install, I am able to see the install from Linux and i had gone in and manually prepared my hard drive with my windows disk and then finalized it with the Ubuntu CD, i have installed both OS's several times trying to make it work but it seems I can never get Ubuntu to show up on the windows boot menu, or windows to show up in GRUB's boot loader.....what could I be doing wrong or how can I fix this?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
Sergei (Nolar) Vasilyev
Solved:
Last query:
Last reply:
Revision history for this message
Sergei (Nolar) Vasilyev (nolar) said :
#1

For Ubuntu to be seen in Windows loader, you need to add boot sector there. Use BootPart (http://www.winimage.com/bootpart.htm).

In C:\, run "bootpart.exe", and you will see list of partions. Choose one with your linux installation. Then run "bootpart.exe N linux.bs Linux"; this will create linux.bs file with bootsector of linux partion, and make an entry in c:\boot.ini titled "Linux".

You can run "bootpart.exe list" to see what is in boot.ini, or edit it with your preferred text editor.

Reboot, and if windows loader will be started, it will allow you to boot to linux.

Revision history for this message
Sergei (Nolar) Vasilyev (nolar) said :
#2

Additionally, if you install Ubuntu AFTER Windows, it must automatically register it in its loader. If it doesn't, edit /boot/grub/menu.lst ("sudo gedit /boot/grub/menu.lst"), it must contain these lines somewhere in the end:

title Windows Vista/Longhorn (loader)
root (hd0,1)
savedefault
chainloader +1

If there are not such lines, add them. Replace (hd0,1) with partition where you have installed Windows (hd0 is a first drive, hd1 is a second, so on; partition numbers start with 0 (zero): 0 is first, 1 is second, so on).

Reboot, and WIndows will appear in Grub loader menu.

All of this assumes you have installed grub loader somewhere on the disk (either into MBR or to linux partition, which, in turn, was made 'active').

Revision history for this message
blodflekk (blodflekk) said :
#3

I typed "sudo gedit /boot/grub/menu.lst" into terminal and it opened a text document, But what do I type into it and where abouts, Windows is somewhere on the drive, I have only one disk but I dont know what partition number it is.....
I know nothing of linux yet, so please give me slow simple steps to follow

----- Original Message ----
From: Sergei (Nolar) Vasilyev <email address hidden>
To: <email address hidden>
Sent: Monday, 22 September, 2008 2:38:10 AM
Subject: Re: [Question #45845]: Dual Boot Issues

Your question #45845 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/45845

Sergei (Nolar) Vasilyev proposed the following answer:
Additionally, if you install Ubuntu AFTER Windows, it must automatically
register it in its loader. If it doesn't, edit /boot/grub/menu.lst
("sudo gedit /boot/grub/menu.lst"), it must contain these lines
somewhere in the end:

title Windows Vista/Longhorn (loader)
root (hd0,1)
savedefault
chainloader +1

If there are not such lines, add them. Replace (hd0,1) with partition
where you have installed Windows (hd0 is a first drive, hd1 is a second,
so on; partition numbers start with 0 (zero): 0 is first, 1 is second,
so on).

Reboot, and WIndows will appear in Grub loader menu.

All of this assumes you have installed grub loader somewhere on the disk
(either into MBR or to linux partition, which, in turn, was made
'active').

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+question/45845/+confirm?answer_id=1

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/45845

You received this question notification because you are a direct
subscriber of the question.

      Need a holiday? Check out Yahoo!Xtra Travel - http://nz.travel.yahoo.com/

Revision history for this message
Sergei (Nolar) Vasilyev (nolar) said :
#4

Ok.

1. Run "fdisk -l". It will print something like this:
$ sudo fdisk -l
/dev/sda1 1 1159 9309636 b W95 FAT32
/dev/sda2 1160 5075 31455270 7 HPFS/NTFS
/dev/sda3 * 5076 8991 31455270 83 Linux
/dev/sda4 8992 30401 171975825 5 Расширенный
/dev/sda5 8992 9514 4200966 82 Linux своп / Solaris
/dev/sda6 9515 30401 167774796 7 HPFS/NTFS

2. Find partition, which is mostly your Windows partition. First, it must be HPFS/NTFS. Second, forth column is size of partitions - use it to guess where is windows. In my example Windows is in /dev/sda2, it is 30GB in size (/dev/sda6 is data partition, 170GB).

3. Convert this partition name to what you will put to grub. So, my sda is first drive, so it will be hd0 (it is "a": there could be sda, sdb, sdc, sdd,...; if you have only one drive on your computer, it will probably be hd0). Partition sda2 is second one, so it will be 1 (first one will be 0, third one will be 3, fourth - 4, so on).

4. Run "sudo gedit /boot/grub/menu.lst". Put these lines to the end of file if they are not there yet. Replace (hd0,1) with what you've got in step 3.

title Windows
root (hd0,1)
savedefault
chainloader +1

5. Save. Reboot. You must see "Windows" in GRUB loader. If you have made something wrong, and then chose "Windows" while booting, just nothing will boot, and you will be able to boot into linux usual way.

Additionally, read links from these FAQs, they may help:
FAQ #65: “Dual Booting windows and *buntu”.

Revision history for this message
blodflekk (blodflekk) said :
#5

I have been trying this, and now I have windows in my loader, But When I click on it, it reports and error or it will say starting up... but nothing happens

----- Original Message ----
From: Sergei (Nolar) Vasilyev <email address hidden>
To: <email address hidden>
Sent: Monday, 22 September, 2008 3:17:06 AM
Subject: Re: [Question #45845]: Dual Boot Issues

Your question #45845 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/45845

    Status: Open => Answered

    Related FAQ set to:
    Dual Booting windows and *buntu
    https://answers.launchpad.net/ubuntu/+faq/65

Sergei (Nolar) Vasilyev proposed the following answer:
Ok.

1. Run "fdisk -l". It will print something like this:
$ sudo fdisk -l
/dev/sda1 1 1159 9309636 b W95 FAT32
/dev/sda2 1160 5075 31455270 7 HPFS/NTFS
/dev/sda3 * 5076 8991 31455270 83 Linux
/dev/sda4 8992 30401 171975825 5 Расширенный
/dev/sda5 8992 9514 4200966 82 Linux своп / Solaris
/dev/sda6 9515 30401 167774796 7 HPFS/NTFS

2. Find partition, which is mostly your Windows partition. First, it
must be HPFS/NTFS. Second, forth column is size of partitions - use it
to guess where is windows. In my example Windows is in /dev/sda2, it is
30GB in size (/dev/sda6 is data partition, 170GB).

3. Convert this partition name to what you will put to grub. So, my sda
is first drive, so it will be hd0 (it is "a": there could be sda, sdb,
sdc, sdd,...; if you have only one drive on your computer, it will
probably be hd0). Partition sda2 is second one, so it will be 1 (first
one will be 0, third one will be 3, fourth - 4, so on).

4. Run "sudo gedit /boot/grub/menu.lst". Put these lines to the end of
file if they are not there yet. Replace (hd0,1) with what you've got in
step 3.

title Windows
root (hd0,1)
savedefault
chainloader +1

5. Save. Reboot. You must see "Windows" in GRUB loader. If you have made
something wrong, and then chose "Windows" while booting, just nothing
will boot, and you will be able to boot into linux usual way.

Additionally, read links from these FAQs, they may help:
FAQ #65: “Dual Booting windows and *buntu”.

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+question/45845/+confirm?answer_id=3

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/45845

You received this question notification because you are a direct
subscriber of the question.

      We have the leading experts share advice, tips, and personal experiences here - http://nz.lifestyle.yahoo.com/health/

Revision history for this message
Sergei (Nolar) Vasilyev (nolar) said :
#6

What exact error does it report? And was Windows really installed?

Can you write here what do you do, step by step. Output of "sudo fdisk -l", and content of /boot/grub/menu.lst (as attachment) will help to solve your problem.

Revision history for this message
blodflekk (blodflekk) said :
#7

This is what my fdisk says:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd2f6d2f6

   Device Boot Start End Blocks Id System
/dev/sda1 1 6527 52428096 83 Linux
/dev/sda2 6528 60800 435947872+ 5 Extended
/dev/sda3 60801 60801 8032+ 82 Linux swap / Solaris
/dev/sda5 * 6528 11096 36700461 7 HPFS/NTFS
/dev/sda6 11097 11618 4192933+ 82 Linux swap / Solaris
/dev/sda7 11619 60800 395054383+ e W95 FAT16 (LBA)

----- Original Message ----
From: Sergei (Nolar) Vasilyev <email address hidden>
To: <email address hidden>
Sent: Monday, 22 September, 2008 4:09:57 AM
Subject: Re: [Question #45845]: Dual Boot Issues

Your question #45845 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/45845

    Status: Open => Needs information

Sergei (Nolar) Vasilyev requested for more information:
What exact error does it report? And was Windows really installed?

Can you write here what do you do, step by step. Output of "sudo fdisk
-l", and content of /boot/grub/menu.lst (as attachment) will help to
solve your problem.

--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https://answers.launchpad.net/ubuntu/+question/45845

You received this question notification because you are a direct
subscriber of the question.

      We have the leading experts share advice, tips, and personal experiences here - http://nz.lifestyle.yahoo.com/health/

Revision history for this message
Best Sergei (Nolar) Vasilyev (nolar) said :
#8

You should install bootable OSes only to primary partitions (they have numbers 1-4 only). Partition sda5 is _inside_ extended partition (sda2), and can not be booted in most cases.

You should repartition your disk, making both Linux and Windows partitions to be primary (swap, data and other supplemental partitions can be inside extended). The reinstall OSes. Easiest way is Windows first, Linux last - Linux will find and register Windows automatically.

To repartiotion your disk, boot from Ubuntu LiveCD, run gparted (System - Administrative - Partition Editor); or you can repartition the disk as a step of installation routine.

Revision history for this message
blodflekk (blodflekk) said :
#9

thank you for this help, I'm going to try this now, I will come back and ask fro help if I need it

----- Original Message ----
From: Sergei (Nolar) Vasilyev <email address hidden>
To: <email address hidden>
Sent: Monday, 22 September, 2008 4:52:49 AM
Subject: Re: [Question #45845]: Dual Boot Issues

Your question #45845 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/45845

    Status: Open => Answered

Sergei (Nolar) Vasilyev proposed the following answer:
You should install bootable OSes only to primary partitions (they have
numbers 1-4 only). Partition sda5 is _inside_ extended partition (sda2),
and can not be booted in most cases.

You should repartition your disk, making both Linux and Windows
partitions to be primary (swap, data and other supplemental partitions
can be inside extended). The reinstall OSes. Easiest way is Windows
first, Linux last - Linux will find and register Windows automatically.

To repartiotion your disk, boot from Ubuntu LiveCD, run gparted (System
- Administrative - Partition Editor); or you can repartition the disk as
a step of installation routine.

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+question/45845/+confirm?answer_id=7

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/45845

You received this question notification because you are a direct
subscriber of the question.

      Need a holiday? Check out Yahoo!Xtra Travel - http://nz.travel.yahoo.com/

Revision history for this message
blodflekk (blodflekk) said :
#10

Solved everything, Thank you.

Revision history for this message
PHIL DIPASQUALE (floordoctor1967) said :
#11

HOW DO I GET THE COMPUTER TO BOOT TO WINDOWS VISTA WHEN I TURN THE COMPUTER ON, IT AUTOMATICALY BOOTS TO UBUNTU.

Revision history for this message
jahmbahwahnn (jahmbahwahnn) said :
#12

I installed ubuntu karmic kola in my desktop. 40 gb hd. i have
sda1 swap partition
sda2 ext2 partition (where i have frugally installed puppy linux release before installing ubuntu)
sda3 ext2 partition (my personal storage partition)
sda4 Extended partition
         sda5 ext3 partition (where i installed ubuntu)
         sda6 ext2 partition (common use partition)

I had installed puppy linux releases in sda2 frugally.
After my installation of ubuntu i couldnt find the menu.lst file in /boot/grub folder in ubuntu file system.
The menu.lst file o
I followed the sudo gedit /boot/grub/menu.lst and i get a blank gedit file with nothing in it.
how do i have dual boot of puppy linux and ubuntu option during boot start up?.
Or do i have to run the bootloader config after puppy live cd boot?
Thanks in advance.