Dual Boot Issue!

Asked by David T. Harper

Hey before I go further I want to let you know this is a great OS! That said I am having some difficulty resolving an issue that is presenting lightly differently on pc than what I have read on others. I have been using Ubuntu for just a little less than a year and I have had my hard drive partitioned to have both Linux and Windows XP available as valid start up choices in the boot menu on my system. when I turn it on after it runs hardware and component detection it gives me a menu to choose which installation and or OS I would like to start. I Just recently updated to Lucid Lynx and that OS is working fine but while the option remains on my boot menu windows will no longer load. I can find my program files as they are visible on my "other drive" in Ubuntu, I know that it is still there. I also know from reading that this was a bug from the new build. I'm not disillusioned with Ubuntu I still think it is the best OS that I've ever used but I still need windows to run some software that will not work in Linux. Can someone please walk me through installing a patch that will restore my ability to boot Windows? If it helps, I installed 10.04 as an update while running 9.10 and I do not know what version of Grub I was Running but It all still worked until the update.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
rohitsharma (rsedwardian) said :
#1

Why don't you use a live cd and reinstall grub , and then run sudo update-grub.

Revision history for this message
David T. Harper (bardicboy) said :
#2

That sounds great but I don't know how to do that. I'm one of those pathetic souls who knows just enough to be dangerous to himself and his computer.

Revision history for this message
David T. Harper (bardicboy) said :
#3

That is why I asked for someone to walk me through the process.

Revision history for this message
Mario Tomljenović (tomljenovicmario) said :
#4

To reinstall grub, you have to boot Live CD. Then open up a Terminal.

Type: "fdisk -l" , (without quotes) to se your partitions. If you are not sure, type: "df -Th" (without quotes). You have to find a partition on which Ubuntu is installed. Look for ext3, or ext4 filesystem. When you have found Ubuntu partition, you have to mount it, as superuser (sudo). You can do it with this: "mount /dev/sdXY /mnt" (without quotes). For example: if Ubuntu is installed on /dev/sda1, you will type: "sudo mount /dev/sda1 /mnt".

Then type this: "sudo mount --bind /dev/ /mnt/dev" , without quotes.

And then type this: "sudo chroot /mnt", without quotes.

Now you have to reinstall grub. Type this: "sudo grub-install /dev/sdX". For example, if Ubuntu is on /dev/sda1, you will type: "sudo grub-install /dev/sda". Remember: Do not write the number of the partition!!

When you have finished that, you have to check if reinstall was successfull: "sudo grub-install --recheck /dev/sdX". For example, if Ubuntu is installed on /dev/sda1, you will type: "sudo grub-install --recheck /dev/sda". Remeber again: do not write the number of the partition!!

Turn of chroot by pressing CTRL+D.

Unmount device: "sudo umount /mnt/dev".

and this: "sudo umount /mnt"

And reboot: "sudo reboot". Now you should have grub reinstalled.

Revision history for this message
jebmd (jeb-edgewaterautosales) said :
#5

Ahh yes, but after following the above instructions, windows xp is no longer in the grub menu. How do you add windows xp into the grub 2 menu in 10.4?

Revision history for this message
jebmd (jeb-edgewaterautosales) said :
#6

Ahh yes, but after following the above instructions, windows xp is no longer in the grub menu. How do you add windows xp into the grub 2 menu in 10.4?

Revision history for this message
Mario Tomljenović (tomljenovicmario) said :
#7

Type "fdisk -l" into the terminal, and find the partition where XP is installed. Then open: /etc/grub.d/40_custom, and on the end of "40_custom" file, add this:

menuentry "Windows XP" {
 set root=(hd0,3)
 chainloader +1
 }

Do not leave the empty line at the end of the text!!

That should, be it.

Revision history for this message
Mario Tomljenović (tomljenovicmario) said :
#8

If you have only one hard disk, and your XP is on /dev/sda1, your menu entry will be:

menuentry "Windows XP" {
 set root=(hd0,1)
 chainloader +1
 }

Then you have to update Grub: "sudo update-grub"

Revision history for this message
jebmd (jeb-edgewaterautosales) said :
#9

That did it, Thank you

Revision history for this message
Mario Tomljenović (tomljenovicmario) said :
#10

No problem. Can you load XP now?

Revision history for this message
jebmd (jeb-edgewaterautosales) said :
#11

Yes, Boots right up.

Revision history for this message
Tom (tom6) said :
#12

Hi David :)

If this question has been solved then please find the answer that solved it and click the button in that answer.

Thanks and regards from
Tom :)

Revision history for this message
David T. Harper (bardicboy) said :
#13

Hey Tom, Thank you all for trying to help me but my problem has not yet been resolved.  I believe it is because someone who was giving me the instructions left out something so basic that they took it for granted that I would know how to do it.  I burned a Live cd per the instructions and reinstalled grub per the instructions but still have not managed to fix this issue.  will write more later as time permits.

--- On Tue, 5/18/10, Tom <email address hidden> wrote:

From: Tom <email address hidden>
Subject: Re: [Question #110874]: Dual Boot Issue!
To: <email address hidden>
Date: Tuesday, May 18, 2010, 3:46 AM

Your question #110874 on grub in ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/grub/+question/110874

Tom posted a new comment:
Hi David :)

If this question has been solved then please find the answer that solved
it and click the button in that answer.

Thanks and regards from
Tom :)

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

Revision history for this message
Tom (tom6) said :
#14

Hi :)

Ok, so the current state-of-play is still that you can boot into Ubuntu and use the machine but still cannot gain access to Windows? Please can you get to a command-line
https://help.ubuntu.com/community/UsingTheTerminal#Starting%20a%20Terminal
and give us the output of

free -m

sudo fdisk -l

Please also copy&paste into here the contents of "40_custom". Perhaps open it with the gedit text editor oruse whichever text-editor you prefer. Gedit is probably the easiest as it's the default one in Ubuntu

gedit /etc/grub.d/40_custom

Good luck and regards from
Tom :)

Revision history for this message
David T. Harper (bardicboy) said :
#15

Ok I accessed a terminal and cut and pasted the command lines from your most recent e-mail. Below is a complete copy of the results:

avid@david-desktop:~$ free -m

             total used free shared buffers cached

Mem: 3948 1919 2029 0 722 842

-/+ buffers/cache: 354 3594

Swap: 4832 0 4832

david@david-desktop:~$ sudo fdisk -l

[sudo] password for david:

Disk /dev/sda: 320.1 GB, 320072933376 bytes

255 heads, 63 sectors/track, 38913 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00f4738c

   Device Boot Start End Blocks Id System

/dev/sda1 * 1 23466 188490613+ 7 HPFS/NTFS

/dev/sda2 23467 38913 124078027+ 5 Extended

/dev/sda5 38493 38913 3381651 82 Linux swap / Solaris

/dev/sda6 23467 37876 115748262 83 Linux

/dev/sda7 37877 38492 4947988+ 82 Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdc: 300.1 GB, 300069052416 bytes

255 heads, 63 sectors/track, 36481 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x551b0dcf

   Device Boot Start End Blocks Id System

/dev/sdc1 * 1 36481 293033601 7 HPFS/NTFS

david@david-desktop:~$ gedit /etc/grub.d/40_custom

40_custom

#!/bin/sh

exec tail -n +3 $0

# This file provides an easy way to add custom menu entries. Simply type the

# menu entries you want to add after this comment. Be careful not to change

# the 'exec tail' line above.

Revision history for this message
David T. Harper (bardicboy) said :
#16

Sorry I left out a letter when I cut and paste the last time. Here is a complete copy of the results.

Ok I accessed a terminal and cut and pasted the command lines from your most recent e-mail. Below is a complete copy of the results:

david@david-desktop:~$ free -m

             total used free shared buffers cached

Mem: 3948 1919 2029 0 722 842

-/+ buffers/cache: 354 3594

Swap: 4832 0 4832

david@david-desktop:~$ sudo fdisk -l

[sudo] password for david:

Disk /dev/sda: 320.1 GB, 320072933376 bytes

255 heads, 63 sectors/track, 38913 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00f4738c

   Device Boot Start End Blocks Id System

/dev/sda1 * 1 23466 188490613+ 7 HPFS/NTFS

/dev/sda2 23467 38913 124078027+ 5 Extended

/dev/sda5 38493 38913 3381651 82 Linux swap / Solaris

/dev/sda6 23467 37876 115748262 83 Linux

/dev/sda7 37877 38492 4947988+ 82 Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdc: 300.1 GB, 300069052416 bytes

255 heads, 63 sectors/track, 36481 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x551b0dcf

   Device Boot Start End Blocks Id System

/dev/sdc1 * 1 36481 293033601 7 HPFS/NTFS

david@david-desktop:~$ gedit /etc/grub.d/40_custom

40_custom

#!/bin/sh

exec tail -n +3 $0

# This file provides an easy way to add custom menu entries. Simply type the

# menu entries you want to add after this comment. Be careful not to change

# the 'exec tail' line above.

Revision history for this message
Tom (tom6) said :
#17

Hi :)

Ok, so it looks like yu have plenty of Ram and plenty of swap so all that side of things is perfect. I haven't had chance to look at the partitions yet but am just plugging the numbers in to a spreadsheet right now. I really should organise this spreadsheet better soon but never mind

Good luck and regard from
Tom :)

Revision history for this message
Launchpad Janitor (janitor) said :
#18

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Tom (tom6) said :
#19

Hi ?

Has the question been resolved yet or is it still a problem? If it is still a problem please could you re-post the question to the new team at Launchpad here?
https://answers.launchpad.net/ubuntu/+source/grub/+addquestion

Good luck and regards from
Tom :)