Cannot get Grub2 to recognise Vista

Asked by Dave Allen

Sqare 1: Ubuntu 10.04 dual booting with Windows Vista. Move: Install 10.10. Square 2: neither 10.04 nor Vista in boot menu. Moves; find out everything about Grub2. I still can't make it boot Vista (or 10.04 either!) Neither can I regress to the 10.04 plus Vista setup; rebooting 10.04 leaves Grub 2 in charge. Can some one please explain what I can do to get Vista working with at least one Ubuntu release. I feel I need a chat session, but have no idea how to arrange one.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
delance
Solved:
Last query:
Last reply:
Revision history for this message
delance (olivier-delance) said :
#1
Revision history for this message
Dave Allen (davidallen131) said :
#2

Done. New versions of various files have duly appeared. Vista is still sitting in its partition, but it does not appear in the boot list. How do I get it there? The boot/grub files mutter about entering something in boot/grub.cfg via etc/grub.d/40_custom, but it is not clear to me what I should put there, nor how into a read-only file. Or is there some better way of doing it?
  Should I reinstall Vista into that partition?

Revision history for this message
Jeruvy (jeruvy) said :
#3

Do not reinstall Vista. That will kill your Grub and replace it.

Back to that link above and you can see how to add your Vista boot back in.
https://help.ubuntu.com/community/Grub2#Creating%20the%20Custom%20Menu

There is also a fairly detailed walkthrough here:
http://linux.koolsolutions.com/2008/12/28/windows-xpvista-dual-boot-does-not-boot-from-grub2-or-grub-pc/

HTH's.

Revision history for this message
delance (olivier-delance) said :
#4

Run command: sudo apt-get install os-prober ; os-prober
and check if Vista is detected.
If it fails, download latest version: http://packages.debian.org/unstable/utils/os-prober
and retry.
If it fails, we will have to edit manually file etc/grub.d/40_custom

Revision history for this message
Dave Allen (davidallen131) said :
#5

This latter produced:

dave@dave-Dimension-E521:~$ sudo apt-get install os-prober
[sudo] password for dave:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  localechooser-data
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed
  os-prober
0 upgraded, 1 newly installed, 0 to remove and 338 not upgraded.Need to get 23.0kB of archives.
After this operation, 184kB of additional disk space will be used.
Get:1 http://gb.archive.ubuntu.com/ubuntu/ maverick/main os-prober i386 1.39 [23.0kB]
Fetched 23.0kB in 0s (122kB/s)
Selecting previously deselected package os-prober.
(Reading database ... 175315 files and directories currently installed.)
Unpacking os-prober (from .../os-prober_1.39_i386.deb) ...
Setting up os-prober (1.39) ...
  then:
dave@dave-Dimension-E521:~$ sudo os-prober
/dev/sda1:Ubuntu 10.10 (10.10):Ubuntu:linux

var/lib/os-prober/labels contains “Ubuntu 1“, and was modified when I reinstalled Grub2. Today’s exercise seems not to have changed it.
  os-prober’s remark is about sda1: Ubuntu has an entry in there, but could various changes in the partitioning have removed whatever Vista had there?

Revision history for this message
delance (olivier-delance) said :
#6

Could you run following procedure, so I will collect data enabling me to propose an entry in 40_custom
-----------------
There is a standard script provided to analyse boot configuration.
 Could you download script at:

   http://sourceforge.net/projects/bootinfoscript/

Then in a terminal (Ctrl+Alt+T) run command:

    sudo bash ./boot_info_script055.sh

This will produce a file named: RESULTS.txt
 Paste content of this file in http://paste.ubuntu.com/ and provide in this thread the link to Web page.
 Please don't post file directly in thread, else it will make thread difficult to read.

Revision history for this message
Dave Allen (davidallen131) said :
#7

The magic number is 587406 for the post in paste.ubuntu. i hope this will lead to some success! Thanks for your assistance.

Revision history for this message
delance (olivier-delance) said :
#8

menuentry "Windows Seven (loader) (on /dev/sda5)" {
 insmod part_msdos
 insmod ntfs
 set root='(hd0,msdos5)'
 search --no-floppy --fs-uuid --1CD9DAF03EF31124
 chainloader +1
}

Try this. I'm little surprised to see Seven on an extended partition. Previous version of Windows had to be installed on primary partition (from sda1 to sda4).

Revision history for this message
Jeruvy (jeruvy) said :
#9

As long as the MBR/BCD is in place where it wants in (sda1) then it can work. I'd not recommend it. If the Windows install breaks you can only nuke it (you cannot fix, repair, etc.)

This method is not recommended UNLESS you are dual booting (you have say...xp on primary 1, and 7 on a logical partition.

Revision history for this message
Dave Allen (davidallen131) said :
#10

I.ve been out of my depth for a while - but fascinated! Now I'm a little lost. Should I not use sudo update-grub2 sometime around this point. I've put your text into /etc/grub.d/40_custom, but it looks strange amongst all those shell scripts: how does it get into /boot/grub/grub.cnfg which is where it's got to get isn't it? Perhaps rashly, I gave sudo update-grub2 a run, and it returned a complaint about the brackets within " and ". I removed those, and got a list of complaints that it couldn't find things. Am I messing everything up?!

Revision history for this message
Best delance (olivier-delance) said :
#11

It's easier to check directly on /boot/grub/grub.cfg and when it works to copy in 40_custom.
Could you paste grub.cfg in http://paste.ubuntu.com/ and I will edit the file et return back this via same web site (with new URL).
If it works we will update 40_custom, and then rerun sudo grub-update.

Revision history for this message
Dave Allen (davidallen131) said :
#12

I'm sorry, but I cannot proceed further with this at present. Reasons and apologies are in paste.ubuntu item 589655.

Revision history for this message
Dave Allen (davidallen131) said :
#13

Sorry, but I've let this one lapse. I now am running Vista - reluctantly, and Ububtu 10.04 from a disk. This satisfies my requirements for now. I'm hoping to get a Ubuntu driver for the scanner on my machine, which will enable me to banish Vista again.