grub ubuntu 10.04

Asked by Sam Haynes

on april 30 2010 i upgraded from ubuntu 9.10 to ubuntu 10.04 , a few days later when i finnally decided to boot up my windows xp i found that when i selected windows xp it would blank out and return back to the grub bootloader screen ... this is the result as many times infinity that i reselect windows xp. i understand that a bug was reported in ubuntu 10.04 about grub blanking out , or not showing the windows selection , but this is not my case , i have a windows selection , but it doesnt operate , however if i select the ubuntu option it works fine ... is there an easy way to resolve this problem...be easy on me ...somewhat new to linux still , haven't yet played with the terminal , or the command lines...thank you for listening , and i hope you have a solution for me ...

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Sam Haynes
Solved:
Last query:
Last reply:
Revision history for this message
Narendra D (narendra-diwate) said :
#1

Try this. Boot into ubuntu and open a terminal. type sudo update-grub and press enter. enter password when asked and press enter. the password will not show on screen at all so do not worry. Once it is finished doing its thing, reboot and try winXp.

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

Hi :)

Yes, this should fix it. To open a terminal go up to the top taskbar and click on

Applications - Accessories - Terminal

and then type the command into there

sudo update-grub

Please let us know how this goes!
Good luck and regards from
Tom :)

Revision history for this message
Sam Haynes (hayneshbac2) said :
#3

sorry for getting back so late ... busy at work... tried to update , did not fix the problem ... same end result , ... thanks for trying , post me if you think of something else

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

Hi :)

Don't worry about not having time for this! One of the advantages of these threads is that it keeps the history of what has been tried all in one place. I think the next thing to try is giving us the output of

sudo fdisk -l

where "-l" is a lower-case "-L" since it might need a reinstall of grub2 to fix this. The guide
https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD
has been tricky for some people but we can help you through it if you give us the "fdisk" output.

However, it is beginning to sound like a Windows problem! Do you have a Windows installer Cd or one of their "REcovery Cd"? If so there should be a "repair" mode that can (hopefully) fix their boot-loader. Of course after doing that we will need to re-install grub2 again but by then it should fix everything. Of course the LiveCd should always work on almost any machine if you get stuck without access to Ubuntu
https://help.ubuntu.com/community/LiveCD
Good luck and regards from
Tom :)

Revision history for this message
Sam Haynes (hayneshbac2) said :
#5

Disk /dev/sda: 400.1 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 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: 0x1a757e28

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 24480 196635568+ 7 HPFS/NTFS
/dev/sda2 24481 48641 194073232+ 5 Extended
/dev/sda5 24481 48267 191069046 83 Linux
/dev/sda6 48268 48641 3004123+ 82 Linux swap / Solaris

Disk /dev/sdb: 13.6 GB, 13600677888 bytes
255 heads, 63 sectors/track, 1653 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: 0xf8c9f8c9

   Device Boot Start End Blocks Id System
/dev/sdb1 1 1653 13277691 7 HPFS/NTFS
sam@sam-desktop:~$

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

Hi :)

Ok, lets try reinstalling grub2 first and see if that fixes the problem easily. Using the guide
https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD
we are already at step4 so now just enter these commands

sudo su

mount /dev/sda5 /mnt

grub-install --root-directory=/mnt/ /dev/sda

Notice that there are 3 spaces in each line. Most people forget the space before and after "/dev/sda1" & "--root-directory=/mnt/". Then try this without bothering to reboot since you are not using a LiveCd to do this :)

update-grub

Please let us know how this goes!
Good luck and regards from
Tom :)

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

Hi :)

I copy&paste this answer a lot. Note that in the explanation i said "/dev/sda1" which was wrong. What i gave you for the command-line was right as it should be "/dev/sda5" on your particular machine's layout.

Apols and regards from
Tom :)

Revision history for this message
Sam Haynes (hayneshbac2) said :
#8

ok a bit unorthadox , but here's what happened...i followed your commands , but forgot (got a little excited) to do the update-grub before i restarted ... however luckily i had a slave drive installed , and tg for ubuntu (meaning i lost boot capability with my 400gb , yet still had capability with my 14gb) ubuntu kept grub on my slave...(no idea how it got there in the first place considering ubuntu nor windows really recognizes fully the slave drive anyway)but none the less my master 400gb is now using my slave boot sector...if that makes any since...so i still couldn't get into my windows , so i went back into ubuntu (note : i loaded from restart , hit esc to select what to boot from , then selected the 14gb hard drive) i followed the commands (not forgetting to update grub this time ) and still this didn't work , so i inserted my windows xp disc , entered the bios , set the boot priority to the 14 gb , restarted the pc , hit the key to setup windows , ignored the F2 command for recovery , it asked if i wanted to repair or setup windows , i pressed enter to setup windows , it searched for installed xp , it asked again if i wanted to repair xp , i then selected repair...problem solved and i didn't even lose grub through the process...so now i boot from either , ...my os's are still on my main drive , but booting is pimped from my slave ...confusing enough... hope this helps someone else in the future...thanks for the walk throughs ...(note: was a problem with xp's boot sector , because ubuntu killed it , but you can repair without killing grub , and by using xp load disc) good luck to all....and to all a good night...lol

Revision history for this message
Sam Haynes (hayneshbac2) said :
#9

all better

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

Hi :)

A superb hack :) The Windows boot process is very flaky and there appears to be something in the grub2 or somewhere that appears to break it sometimes. Even before grub2 i know a lot of Windows users would use grub to boot up Windows-only systems because it is a lot easier to maintain and a lot more robust.

Congrats and regards from
Tom :)