dual boot problem with vista and 10.04

Asked by ron holliman on 2010-05-28

To start, I am NEW at this so please go easy and have detailed instructions if you can. thanks.

First, I installed 9.xx and when the screen came up asking how I wanted to install it since windows vista was the current system, I choose the recommended way which was to resize the existing partition and install it side by side. I wasn't sure if that was the best way but the other way said to reformat which I did not want to do.
I installed ubuntu 9.xx and then saw that 10.04 was out so I upgraded. Then I rebooted and the grub splash screen came up and it gave me 8 options: (i'm going to shorten it up a bit)
1. linux 2.6.32-22 generic
2. linux 2.6.32-22 generic recovery
3. linux 2.6.32-14 generic
4. linux 2.6.32-14 generic recovery
5. memtest (something something)
6. memtest (something something)
7. windows vista (loader) on /dev/sda1
8. windows vista (loader) on /dev/sda2

I wanted to boot windows but on each line 7 and 8 after pressing enter it just comes back to the boot screen. It will not boot. The only options that work are the memtest options and the first option of linux.

I then booted linux and installed grub2 then rebooted and it did the same.

I have no idea what to do. Can someone help? I really need to get into windows.


Question information

English Edit question
Ubuntu yelp Edit question
No assignee Edit question
Last query:
Last reply:

I am not conversant with grub but suggest you run:

sudo apt-get --purge remove linux 2.6.32-14 generic; sudo apt-get --purge autoremove

This will free you up 120Mb of space and clean up the grub.

ron holliman (ronholliman) said : #2

Thanks actionparsnip but the code did not work for me. it says that package linux is not installed and couldn't find package 2.6.32-14.

Do you guys think it would be wise to purge the entire grub and start over? Maybe something never installed for the windows to enable the windows os to boot?

delance (olivier-delance) said : #3

So you use Grub2, and I presume you have a single disk.
Grub has recognized WIndows.
Can you type in a terminal:
     sudo parted -l
and post the result.

ron holliman (ronholliman) said : #4

OK, new info. So I tried to reinstall Grub2 using my Ubuntu livecd and now i'm not able to boot either system. Now I'm getting a error that says "error: the symbol 'grub_getcharwidth' not found" for windows and "error: the symbol 'grub_parted_' not found" for linux.
So now i'm only using my computer via the livecd and not from booting either linux or windows.

But to answer Delance's question, I ran sudo parted -l and got:

model: ata fujitsu mhy2250b (scsi)
disk /dev/sda: 250gb
sector size (logical/physical): 512b/512b
partition table: msdos

number start end size type file system flags
1 32.3kb 168gb 168gb primary ntfs boot
3 168gb 238gb 69.5gb extended
5 168gb 235gb 66.6gb logical ext4
6 235gb 238gb 2879mb logical linux-swap(v1)
2 238gb 250gb 12.4gb primary ntfs

Warning: unable to open /dev/sr0 read-write (read only file system)
/dev/sr0 has been opened read-only
error: /dev/sr0: unrecognised disk label

I know it's detailed but I wanted you to see everything.
Let me know what you guys think.

delance (olivier-delance) said : #5

         sudo mount /dev/sda5 /mnt
         sudo grub-install --root-directory=/mnt/ /dev/sda
So the parted result is not useless!

ron holliman (ronholliman) said : #6

thanks delance.

now back to my original problem which is windows won't boot.
when i click on the windows line from grub it goes to rescue mode.

Any suggestions?

delance (olivier-delance) said : #7

Can you type following command and post result:
               grep 30_os-prober -A 10 /boot/grub/grub.cfg
On a virtual machine with a single disk, and both system, I get:

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows NT/2000/XP (loader) (on /dev/sda1)" {
 insmod ntfs
 set root='(hd0,1)'
 search --no-floppy --fs-uuid --set cac4b3eec4b3db41
 drivemap -s (hd0) ${root}
 chainloader +1

ron holliman (ronholliman) said : #8

ok, here's what i got:

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Vista (loader) (on /dev/sda1)" {
 insmod ntfs
 set root='(hd0,1)'
 search --no-floppy --fs-uuid --set 399944434da068f0
 chainloader +1
menuentry "Windows Vista (loader) (on /dev/sda2)" {
 insmod ntfs
 set root='(hd0,2)'
 search --no-floppy --fs-uuid --set 2c88743c8874071c
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# 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.
### END /etc/grub.d/40_custom ###

I'm no good just looking at code and knowing what it means but, why is there two entries?
Either way, let me know what you guys think.

delance (olivier-delance) said : #9

First one is Vista, second one is recovery partition and it looks OK.

The MBR is the first sector of first disk and it's size is 512kB. The 384 first bytes contains a small program which calls a boot-loader. Currently, we use Grub MBR which call Grub boot-loader, which then load Ubuntu or call Windows boat-loader (the chain loader in file). I propose to restore Windows boot-loader (after we will have to reinstall Ubuntu boot-loader).

If you have Windows CD:
For XP:
boot to an XP CD and, once the menu loads, hit "R" to enter a command prompt. Once there, choose which partition you want (first one), and enter an admin password (if you have one set).
then type
and the XP bootloader should be restored.

Download at http://packages.ubuntu.com/dapper/i386/ms-sys/download, double click on file to install it, and type in a terminal:
   sudo ms-sys -m /dev/sda

Then reboot, and check you boot directly with XP.

ron holliman (ronholliman) said : #10

ok, and what if i don't have a windows cd?
Is there another way?
if not, then where can i get that cd or how can i make one?

delance (olivier-delance) said : #11

Download at http://packages.ubuntu.com/dapper/i386/ms-sys/download, double click on file to install it, and type in a terminal:
   sudo ms-sys -m /dev/sda

like explained above.

ron holliman (ronholliman) said : #12

After rebooting, instead of going into grub it goes straight to the error message:

error: the symbol 'grub_getcharwidth' not found

Sjaak Adriaanse (s-adriaanse) said : #14

Hi Ron,

I encountered the same problems on a Compaq Presario CQ60 laptop, with an AMD Sempron processor, running Windows Vista. I installed Ubuntu 10.04 from a cd I burned from the download, and chose all default installation options and numbers (especially those about disk partitions). Ubuntu booted OK, but Windows tried and gave up.

After some searching on this site (I am new to Ubuntu, though not to Unix) I opened Disktools (?, I use Dutch names) under System > Maintenance/Management (?) and clicked the hard disk under 'SATA host-adapter'. A picture of the disk partitions appeared. When examining the partition where Windows should be I noticed that the checkbox 'Bootable' was unchecked. So I checked it and let it run... (Must be a case of 'Fools rush in where angels fear to tread'). It took a very long time and ended in an error message, but I then could boot Windows from the Grub menu (from /sda1)!!! Can't tell you yet if everything works under Vista though.

Hope this helps! Good luck!

Can you help with this problem?

Provide an answer of your own, or ask ron holliman for more information if necessary.

To post a message you must log in.