Installed Ubuntu need help booting to windows 7

Asked by John Blackmore

Ubuntu 10.10 with dual boot with Seven.
4 boot options,, 2 for Linux and 2 for memory checking

   1 rerun update-grub
sudo apt-get -y install os-prober; sudo os-prober; sudo update-grub
4 boot options,, 2 for Linux and 2 for memory checking
   2 grub installation
sudo grub-install /dev/sda
"I noticed windows 7 listed this time, hope this is helping" in command printings
now have a new option, chainlink into grub 2
   3 reinstall Grub from CD
https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD
just the original 4 that I started with
   4 rerun os-prober
"/dev/sda1:Windows 7 (loader):Windows:chain"
but we have in /boot/grub/grub.cfg
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
--------------------------------------------------------------------------------------------------------------
hi guys i'm a new Linux user, i just installed ubuntu 10.10 on my windows 7 Laptop, i selected the option to exist alongside other operating systems, when i reset the laptop i was presented with 4 options, 2 to boot linux and 2 for memory checking, but no options for windows, please help i'm very new at this. I assumed that i selected to have more than one operating system that it would give me the option of booting both Ubuntu and Windows 7. I have noticed its using GNU Grub and found the "Grub" folder in "File System"

My Goal is to have a boot option for windows 7 added to this list, Windows 7 was preloaded on the laptop and i would like to have it as a listed boot choice

Thanks in advance guys, any info or requests please ask and i'll do my best to comply

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
John Blackmore
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

run:

sudo apt-get -y install os-prober; sudo os-prober; sudo update-grub

May help

Revision history for this message
John Blackmore (azriall-blackmore) said :
#2

I did this, and still have only 4 boot options,, 2 for Linux and 2 for memory checking, does it matter that i partitioned a portion of the hard drive for linux specially?

Revision history for this message
John Blackmore (azriall-blackmore) said :
#3

Reading package lists... Done
Building dependency tree
Here is the response

Reading state information... Done
os-prober is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.35-22 localechooser-data
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 178 not upgraded.
/dev/sda1:Windows 7 (loader):Windows:chain
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.35-23-generic-pae
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

Still no Windows listed

Revision history for this message
John Blackmore (azriall-blackmore) said :
#4

I tried running this line from another question

  sudo grub-install /dev/sda

and got this result =

Searching for GRUB installation directory ... found: /boot/grub
Installing GRUB to /dev/sda as (hd0)...
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0) /dev/fd0
(hd0) /dev/sda

i followed with the command sudo apt-get -y install os-prober; sudo os-prober; sudo update-grub

and got this result =

Reading package lists... Done
Building dependency tree
Reading state information... Done
os-prober is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.35-22 localechooser-data
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 178 not upgraded.
/dev/sda1:Windows 7 (loader):Windows:chain
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.35-23-generic-pae
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

I noticed windows 7 listed this time, hope this is helping

Revision history for this message
John Blackmore (azriall-blackmore) said :
#5

I just rebooted and now have a new option, chainlink into grub 2
but doing so gives me and Error Code 11

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

You could try to reinstall Grub:
    https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD
So you will have a clean configuration.

Revision history for this message
John Blackmore (azriall-blackmore) said :
#7

I have tried this, windows 7 is still not listed as a bootable option, just the original 4 that I started with

John

On 26 Nov 2010, at 16:59, delance <email address hidden> wrote:

> Your question #135532 on grub2 in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/grub2/+question/135532
>
> Status: Open => Answered
>
> delance proposed the following answer:
> You could try to reinstall Grub:
> https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD
> So you will have a clean configuration.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+source/grub2/+question/135532/+confirm?answer_id=5
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/grub2/+question/135532
>
> You received this question notification because you are a direct
> subscriber of the question.

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

Could you run command:
   os-prober.
If it fails, could you download version 40 of os-prober and install it.
If it fails again, could you provide partition table.

Revision history for this message
John Blackmore (azriall-blackmore) said :
#9

where can i download the os-prober 40, and create the partition table data?

Revision history for this message
John Blackmore (azriall-blackmore) said :
#10

I ran the os-prober that i have and got this?

unshare failed: Operation not permitted
rm: cannot remove `/var/lib/os-prober/labels': Permission denied

Revision history for this message
John Blackmore (azriall-blackmore) said :
#11

sorry ran

Sudo os-prober

and got this result =

/dev/sda1:Windows 7 (loader):Windows:chain

Hope this helps?

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

Sorry, command is:
    sudo os-prober
To get version 41, go to
   http://packages.debian.org/squeeze/os-prober-udeb

Revision history for this message
John Blackmore (azriall-blackmore) said :
#13

i downloaded what i believe is the correct file but the ubuntu software center isn't giving me a install option, something about invalid archetechture

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

"/dev/sda1:Windows 7 (loader):Windows:chain" : os-prober detect your Windows installed on sda1, so you don't need version 41 (except if you have two Windows partition and it see only one).
So
   sudo update-grub
should add Windows in Grub menu.
Could you try this command ?

Revision history for this message
John Blackmore (azriall-blackmore) said :
#15

ok i've tried it, and here is the response

john@Azriall-2:~$ sudo os-prober
[sudo] password for john:
/dev/sda1:Windows 7 (loader):Windows:chain

john@Azriall-2:~$ sudo update-grub
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.35-23-generic-pae
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

My single HDD has three partitions on it, one has windows, one has only misc files and the third i created for ubuntu

trying a restart now

Revision history for this message
John Blackmore (azriall-blackmore) said :
#16

Nope still no windows boot option :(

John

On 26 Nov 2010, at 21:37, delance <email address hidden> wrote:

> Your question #135532 on grub2 in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/grub2/+question/135532
>
> Status: Open => Answered
>
> delance proposed the following answer:
> "/dev/sda1:Windows 7 (loader):Windows:chain" : os-prober detect your Windows installed on sda1, so you don't need version 41 (except if you have two Windows partition and it see only one).
> So
> sudo update-grub
> should add Windows in Grub menu.
> Could you try this command ?
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+source/grub2/+question/135532/+confirm?answer_id=13
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/grub2/+question/135532
>
> You received this question notification because you are a direct
> subscriber of the question.

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

Coul you post in paste.ubuntu.com the file /boot/grub/grub.cfg.
I will have a look tomorrow.

Revision history for this message
John Blackmore (azriall-blackmore) said :
#18
Revision history for this message
delance (olivier-delance) said :
#19

It looks crazy!

Can you run by copy/paste:
   ls -l /boot/grub/grub.cfg ; sudo os-prober ; sudo update-grub ; ls -l /boot/grub/grub.cfg
and copy paste the whole results

Can you run:
   cd /boot/grub ; sudo mv menu.lst menu.old.lst
and then try to reboot.

Revision history for this message
John Blackmore (azriall-blackmore) said :
#20

results from first command

john@Azriall-2:~$ ls -l /boot/grub/grub.cfg ; sudo os-prober ; sudo update-grub ; ls -l /boot/grub/grub.cfg
-r--r--r-- 1 root root 3526 2010-11-25 19:52 /boot/grub/grub.cfg
[sudo] password for john:
/dev/sda1:Windows 7 (loader):Windows:chain
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.35-23-generic-pae
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

-r--r--r-- 1 root root 3526 2010-11-25 19:52 /boot/grub/grub.cfg
john@Azriall-2:~$

And from second command

-r--r--r-- 1 root root 3526 2010-11-25 19:52 /boot/grub/grub.cfg
john@Azriall-2:~$ cd /boot/grub ; sudo mv menu.lst menu.old.lst
john@Azriall-2:/boot/grub$ sudo mv menu.lst menu.old.lst
mv: cannot stat `menu.lst': No such file or directory
john@Azriall-2:/boot/grub$

I know the list looks crazy but that was installed by Ubuntu live CD i got on the cover of a Linux magazine, no editing, trying a reboot now

Revision history for this message
John Blackmore (azriall-blackmore) said :
#21

No success, still 4 boot options, no windows listed

Revision history for this message
John Blackmore (azriall-blackmore) said :
#22

Hi Guys

Was thinking logicallaly about your advice and came up with a new idea, i have cleared the partition and reinstalled Ubuntu 10.10, but this time i downloaded a 64bit edition not from a cover magazine disc, i did a livecd boot and fresh install, making sure it knew the boot was from windows, this time when i loaded up for the first time i had a 5th option, windows 7! which was sucessful

Thanks for all your help and support, couldn't of done it without you guys and have learn some useful information regarding how to use Ubuntu, i prefer it over windows for speed and stability but i want to hold on to windows for now for my games and to move stuff to my portable hard drive via Mionet

Again my Thanks