Upgraded to Ubuntu 9.10 and Windows cannot be booted.

Asked by Johnny Wraith

After the upgrade I restarted my computer and Windows Vista was removed from the GRUB menu. I realize I needed to update to GRUB2, and did ALL the updates. I cannot tell you how many hours I spent in the terminal. I got Windows back in the menu, but now it takes me to a page that asks me the following.
Run system Diagnostics.
Run Memory check.
Exit system diagnostics.
Any help in being able to reboot into Windows Vista will be apreciated, stepdads shutting off internet if I can't get help by next week...

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
D Becker
Solved:
Last query:
Last reply:
Revision history for this message
wojox (wojox) said :
#1

I don't dual boot with windows, but You may find a solution here:
https://help.ubuntu.com/community/Grub2

Revision history for this message
D Becker (dmitrinbecker) said :
#2

I'd add that it appears you're booting a Dell diagnostics partition (or something similar) instead of your regular Windows partition. Normally that partition is marked hidden so that it won't show up in Windows (but will in Linux).

Revision history for this message
Johnny Wraith (fataubert) said :
#3

I have no idea what that means.

Revision history for this message
Johnny Wraith (fataubert) said :
#4

I have no idea what that means.

Revision history for this message
D Becker (dmitrinbecker) said :
#5

Your hard disk is divided up into pieces called partitions, and these different partitions can have different things on them. In Windows they show up as different drives, even though they're actually on the same physical disk. Normally, for a dual boot setup, Windows would be on one partition, and Linux would be on one or more others (often one for files and one for swap space).

Dell and some other manufacturers sometimes put an extra hidden partition on the disk with some software for diagnostics or to restore the system to the way it came from the factory -- and it sounds like you were booting from this (and seeing their diagnostic menu) instead of your actual Vista partition. Because it's marked as hidden, Windows doesn't normally show you that it's there, but grub and Linux can see it just like any other disk partition.

Try this from a terminal, and show us the results (command is exactly as below, including the question mark):

sudo fdisk -l /dev/sd?

That's a lower-case L after the hyphen. That should show what partitions you have on your hard disks (one of them should have your Vista install on it). Then we can worry about why it's not in your grub menu.

Revision history for this message
Johnny Wraith (fataubert) said :
#6

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
I did get Windows on GRUB menu but it just takes me to that diagnostics page.
Here's what I get when I run the command you told me to run.

Disk identifier: 0xe0000000

   Device Boot Start End Blocks Id System
/dev/sda1 1 5 40131 6 FAT16
/dev/sda2 6 1311 10485760 7 HPFS/NTFS
/dev/sda3 * 1312 14336 104623312+ 7 HPFS/NTFS
/dev/sda4 14337 19452 41094270 5 Extended
/dev/sda5 14337 19236 39359218+ 83 Linux
/dev/sda6 19237 19452 1734988+ 82 Linux swap / Solaris

Disk /dev/sdf: 1023 MB, 1023933952 bytes
124 heads, 62 sectors/track, 260 cylinders
Units = cylinders of 7688 * 512 = 3936256 bytes
Disk identifier: 0x20202020

   Device Boot Start End Blocks Id System
/dev/sdf1 1 21 80293+ 0 Empty
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(0, 1, 1) logical=(0, 1, 2)
Partition 1 has different physical/logical endings:
     phys=(9, 254, 63) logical=(20, 111, 8)
Partition 1 does not end on cylinder boundary.
/dev/sdf2 21 261 919610+ b W95 FAT32
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(10, 0, 1) logical=(20, 111, 9)
Partition 2 has different physical/logical endings:
     phys=(124, 123, 62) logical=(260, 15, 61)

Revision history for this message
Johnny Wraith (fataubert) said :
#7

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
I did get Windows on GRUB menu but it just takes me to that diagnostics page.
Here's what I get when I run the command you told me to run.

Disk identifier: 0xe0000000

   Device Boot Start End Blocks Id System
/dev/sda1 1 5 40131 6 FAT16
/dev/sda2 6 1311 10485760 7 HPFS/NTFS
/dev/sda3 * 1312 14336 104623312+ 7 HPFS/NTFS
/dev/sda4 14337 19452 41094270 5 Extended
/dev/sda5 14337 19236 39359218+ 83 Linux
/dev/sda6 19237 19452 1734988+ 82 Linux swap / Solaris

Disk /dev/sdf: 1023 MB, 1023933952 bytes
124 heads, 62 sectors/track, 260 cylinders
Units = cylinders of 7688 * 512 = 3936256 bytes
Disk identifier: 0x20202020

   Device Boot Start End Blocks Id System
/dev/sdf1 1 21 80293+ 0 Empty
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(0, 1, 1) logical=(0, 1, 2)
Partition 1 has different physical/logical endings:
     phys=(9, 254, 63) logical=(20, 111, 8)
Partition 1 does not end on cylinder boundary.
/dev/sdf2 21 261 919610+ b W95 FAT32
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(10, 0, 1) logical=(20, 111, 9)
Partition 2 has different physical/logical endings:
     phys=(124, 123, 62) logical=(260, 15, 61)

Revision history for this message
Best D Becker (dmitrinbecker) said :
#8

Ok... It looks like Vista is probably on /dev/sda3, and your Windows entry is booting /dev/sda2. It looks like there are a lot of open bug reports for grub 2 related to not (correctly) finding things or adding them to the menu. To add an entry for booting Windows from /dev/sda3 as a custom entry, try the following:

1) find the ID of the partition by running (at a terminal):
  blkid /dev/sda3
..and note what it says for UUID.

2) Edit (as root) the file "/etc/grub.d/40_custom", and add the following 6 lines to the end of it:

menuentry "Windows (on /dev/sda3)" {
        insmod ntfs
        set root=(hd0,3)
        search --no-floppy --fs-uuid --set 1234567890abcdef
        chainloader +1
}

...but replace "1234567890abcdef" with the UUID from step 1. Make sure it matches (except that the letters in the UUID can be lower-case).

3) Run the following command at the terminal to regenerate grub.cfg:
  sudo update-grub

Hopefully that'll add an extra menu entry, "Windows (on /dev/sda3)" that will load Vista. If not it'll add an entry that doesn't work. If the new menu entry doesn't work, we can try looking more closely at the partitions to make sure we've got the right one.

The link posted by wojox earlier should explain what this stuff is for.

Revision history for this message
Johnny Wraith (fataubert) said :
#9

I don't know the commands to edit "/etc/grub.d/40_Custom". I try to use "pico" but it keeps making a new file everytime.

Revision history for this message
D Becker (dmitrinbecker) said :
#10

If you're logged into Gnome, you can start GEdit using the following command in a terminal window:

sudo gedit /etc/grub.d/40_Custom

This will start GEdit as root and open that file.

Revision history for this message
Johnny Wraith (fataubert) said :
#11

I'm still confused, I've never logged into Gnome before, and when I tried manually opening the file its read only and I have to hit "save as."

Revision history for this message
D Becker (dmitrinbecker) said :
#12

Ok... when you start up Ubuntu, it loads for a while then gives you a screen where you pick your user name and enter your password, then after that you get to your desktop. That's what I mean by logging into Gnome -- Gnome is the GUI (desktop and so on) that Ubuntu uses.

So anyway, if you've logged in like that, there are two ways to get a terminal -- you can open a terminal window, for example by choosing "Terminal" from the menu at the top of the screen, or you can switch to one of the virtual terminals and log in there (outside of the GUI). I'm guessing you've been doing the first one, opening "Terminal" from the menu, so that you get a terminal in a window. If that's the case, you can just run:

sudo gedit /etc/grub.d/40_custom

..to open and edit the file. Note there are no capital letters (sorry -- in the previous message I accidentally capitalized "custom" since you had in your message -- it should be lower case). The file should have been installed with Grub 2, so it should be there.

Revision history for this message
Johnny Wraith (fataubert) said :
#13

Thanks D Becker, that solved my question.