[Vista not in menu]

Asked by vis

Hello,

My laptop crashed after I loaded the Windows Recovery by accident (I accidentally chose the wrong option, I think).
I restored the GRUB with the Live CD, but now the windows option does not show anymore in the GRUB.
Windows Recovery is still there, but now I cannot start Windows anymore.

I tried following:
vis@vis-laptop:~$ sudo aptitude install grub-pc

Reading package lists... Done
Building dependency tree
Reading state information... Done
Initializing package states... Done
Writing extended state information... Done
The following packages will be REMOVED:
  akonadi-server{u} kdebase-workspace-bin{u} kdebase-workspace-data{u}
  kdebase-workspace-kgreet-plugins{u} kdepim-runtime{u} ksysguardd{u}
  libkephal4{u} libkfontinst4{u} libkscreensaver5{u} libksgrd4{u}
  libplasma-applet-system-monitor4{u} libplasma-geolocation-interface4{u}
  libplasmaclock4{u} libplasmagenericshell4{u} libprocesscore4{u}
  libprocessui4{u} libqimageblitz4{u} libqt3-mt{u} libtaskmanager4{u}
  libweather-ion4{u} mysql-client-core-5.1{u} mysql-server-core-5.1{u}
  plasma-dataengines-workspace{u} plasma-widgets-workspace{u}
0 packages upgraded, 0 newly installed, 24 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 62.3MB will be freed.
Do you want to continue? [Y/n/?] y
Writing extended state information... Done
(Reading database ... 188219 files and directories currently installed.)
Removing kdebase-workspace-bin ...
Removing plasma-widgets-workspace ...
Removing kdepim-runtime ...
Removing akonadi-server ...
 * Reloading AppArmor profiles Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
                                                                         [ OK ]
Removing kdebase-workspace-data ...
Removing kdebase-workspace-kgreet-plugins ...
Removing ksysguardd ...
Removing plasma-dataengines-workspace ...
Removing libtaskmanager4 ...
Removing libkephal4 ...
Removing libkfontinst4 ...
Removing libkscreensaver5 ...
Removing libksgrd4 ...
Removing libplasma-applet-system-monitor4 ...
Removing libplasma-geolocation-interface4 ...
Removing libplasmaclock4 ...
Removing libplasmagenericshell4 ...
Removing libprocessui4 ...
Removing libprocesscore4 ...
Removing libqimageblitz4 ...
Removing libqt3-mt ...
Removing libweather-ion4 ...
Removing mysql-client-core-5.1 ...
Removing mysql-server-core-5.1 ...
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for hicolor-icon-theme ...
Processing triggers for shared-mime-info ...
Unknown media type in type 'all/all'

Unknown media type in type 'all/allfiles'

Unknown media type in type 'uri/mms'

Unknown media type in type 'uri/mmst'

Unknown media type in type 'uri/mmsu'

Unknown media type in type 'uri/pnm'

Unknown media type in type 'uri/rtspt'

Unknown media type in type 'uri/rtspu'

Unknown media type in type 'fonts/package'

Unknown media type in type 'interface/x-winamp-skin'

Processing triggers for python-support ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done

But this does not fix my problem.

Can anybody help me?

Sincerely
Edwin

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
Mario Tomljenović
Solved:
Last query:
Last reply:
Revision history for this message
Mario Tomljenović (tomljenovicmario) said :
#1
Revision history for this message
vis (edanvisser) said :
#2

Hello,

Maybe this is already of some help to fix the problem.
I tried the first method, at the last step I get this output:

vis@vis-laptop:~$ sudo update-grub
[sudo] password for vis:
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-23-generic
Found initrd image: /boot/initrd.img-2.6.32-23-generic
Found linux image: /boot/vmlinuz-2.6.32-22-generic
Found initrd image: /boot/initrd.img-2.6.32-22-generic
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
ls: cannot access /var/lib/os-prober/mount/boot
Boot: No such file or directory
Found Windows Vista (loader) on /dev/sda1
done

As you can see, it cannot access the boot directory.

Is it usefull that I try the other methods, or is there another problem?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Found Windows Vista (loader) on /dev/sda1

Implys it has now been added. Is it not there on reboot?

Revision history for this message
vis (edanvisser) said :
#4

Yes, but this is not the correct one.
This is in fact the windows recovery partition. This is a known issue.

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

What happens when you select current Windows entry in your Grub menu?

Revision history for this message
vis (edanvisser) said :
#6

It will start up windows in recovery-mode and then the system freezes (but that is a different problem).
The problem here is that the normal windows does not appear in the GRUB.

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

Have you tried to add Windows entry in Grub menu?

https://help.ubuntu.com/community/Grub2#Custom%20Menu%20Entries

That could maybe solve your problem.

Revision history for this message
vis (edanvisser) said :
#8

I'm not this familiar with Linux.
Can you please explain to me in the most simple step by step way what I have to do and what I have to edit where.
I apologize for asking it like this, but I am clueless of what to do...

Thank you.

This is what I did myself:
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Vista (loader) (on /dev/sda2)" {
 insmod fat
 set root='(hd0,2)'
 search --no-floppy --fs-uuid --set 3c98-ac5d
 chainloader +1
}
### END /etc/grub.d/30_os-prober ###

I just changed the sda1 in sda2 and the hd0,1 in hd0,2 as you can see in the text above.
This does not work. It still boots up the recovery windows.

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

Can you post result of command
    sudo parted -l

Revision history for this message
vis (edanvisser) said :
#10

Here it is:

vis@vis-laptop:~$ sudo parted -l
[sudo] password for vis:
Model: ATA ST9160310AS (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 10.5GB 10.5GB primary fat32 hidden, lba
 2 10.5GB 69.5GB 59.0GB primary ntfs boot
 3 69.5GB 160GB 90.5GB extended lba
 5 69.5GB 136GB 66.9GB logical ntfs
 6 136GB 160GB 23.5GB logical ext4
 7 160GB 160GB 181MB logical linux-swap(v1)

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

You have to mannualy add an entry in /etc/grub.d/40_custom file.

Can you please give the output of:

sudo fdisk -l

And than tell me on which partition Windows Vista is installed.

Revision history for this message
vis (edanvisser) said :
#12

Output:
vis@vis-laptop:~$ sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 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: 0x97646c29

   Device Boot Start End Blocks Id System
/dev/sda1 1 1275 10241406 1c Hidden W95 FAT32 (LBA)
/dev/sda2 * 1277 8454 57657285 7 HPFS/NTFS
/dev/sda3 8455 19457 88381567 f W95 Ext'd (LBA)
/dev/sda5 8455 16582 65288128+ 7 HPFS/NTFS
/dev/sda6 16583 19435 22915072 83 Linux
/dev/sda7 19436 19457 176683+ 82 Linux swap / Solaris

Normally it is installed on sda2.

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

Now try this:

sudo gedit /etc/grub.d/40_custom

than add this entry:

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

like this:

http://slike.hr/slike/prikazzaslona_af136.png.html

and don´t leave empty line at the end.

Revision history for this message
vis (edanvisser) said :
#14

I have added the line of code and rebooted.
The entry does not show in the GRUB-menu...

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#15

Did you run:

sudo update-grub

after changing the file?

Revision history for this message
vis (edanvisser) said :
#16

it worked!
thank you very much for your help.

Revision history for this message
vis (edanvisser) said :
#17

Thanks Mario Tomljenović, that solved my question.