[Seven not in menu] Have Windows 7(64bit) on disk C, AMD 64bit Ubuntu 10.04 on 2nd drive, cannot boot Windows, only Linux

Asked by Piet Visagie

When I restart my computer, I do not get an option to run Windows 7, which is on another drive than Linux. I did not want to install both OS on the second drive and thought that Linux would see the other drive, it does not. I Googled dual-boot and tried to use StartUpManager without success. The problem is that I am overwhelmed by the different pieces of advice, some old and not applicable to my version of Ubuntu. I have not mastered the editing of shell scrips yet and I am scared to mess up my system.

Ubuntu does not find a driver for my Brother DCP 110C, a small old printer that works under Windows 7, it found a driver for it. Firefox works very well, I have my email, but I cannot print anything.

I am not sure that the AMD 64 bit Ubuntu is not a problem, I chose it because I want to look into SCUDA programming and I thought I need a 64 bit system C++.

I also have to learn all that, but I have time, I am retired and it is nice to play with new things. Linux promises to open a new world, but I need some guidance on how to proceed.

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:

This question was reopened

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

The rule here is to split multiple questions to simple one

Here we can try to solve your dual boot issue

So please made new one for your printer from here:
https://answers.launchpad.net/ubuntu/+source/cups/+addquestion

and one for you programming from here:
https://answers.launchpad.net/ubuntu/+addquestion

Thank you

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

Can you give the output of:

sudo update-grub

Should add windows to your Grub.

Brother make Linux drivers. Did you not think to check the site?
http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_scn.html
http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#DCP-110C

Has the debs you need. Install the LPR driver first.

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

Please one problem at a time!

For boot, try command
    sudo update-grub
and also post result of command
    sudo parted -l
where -l is lowercase -L.
Could you also post result of command
    sudo fdisk -l
as some "helpers" are more used to this one.

Are both disk internal disks (external one needs extra works) ?

Revision history for this message
Piet Visagie (pietvisagie) said :
#4

The results of your suggestions are in the gedit text document: My problems are not solved. Apparrently the AMD and Intel drivers are incompatible.

What do you suggest?

Thanks for your interest,

Piet

From: <email address hidden>
Sent:2010-09-18 21:56:37
To: <email address hidden>
Cc:
Subject: Re: [Question #125950]: Have Windows 7(64bit) on disk C,AMD 64bit Ubuntu 10.04 on 2nd drive, cannot boot Windows, only Linux
Your question #125950 on grub2 in ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/grub2/+question/125950

 Status: Open => Answered

actionparsnip proposed the following answer:

Can you give the output of:

sudo update-grub

Should add windows to your Grub.

Brother make Linux drivers. Did you not think to check the site?
http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_scn.html
http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#DCP-110C

Has the debs you need. Install the LPR driver first.

--
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/125950/+confirm?answer_id=1

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/125950

You received this question notification because you are a direct
subscriber of the question.

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

What intel drivers are you on about?

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#6

Please don't reply via mail to Launchpad mail notification but visit directly your question Launchpad site link.
Replying via mail to launchpad message might expose your email address to the net and you will give a lot of spam.

Then answering using mail will result into a confused thread (very long with unecessary replyed info) and you can't
manage your question state.

Revision history for this message
Piet Visagie (pietvisagie) said :
#7

Answering actionparsnip and delance (acknowledging marcobra):

piet@piet-desktop:~$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-24-generic
Found initrd image: /boot/initrd.img-2.6.32-24-generic
Found memtest86+ image: /boot/memtest86+.bin
ERROR: sil: wrong # of devices in RAID set "sil_bgaddjbgfedc" [1/2] on /dev/sda
Found Ubuntu 10.04.1 LTS (10.04) on /dev/sdc5
done
iet@piet-desktop:~$ sudo parted -l
[sudo] password for piet:
Model: ATA SAMSUNG HD103SI (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 1049kB 106MB 105MB primary ntfs boot
 2 106MB 1000GB 1000GB primary ntfs

Model: ATA SAMSUNG HD503HI (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 1049kB 490GB 490GB primary ext4
 2 490GB 500GB 9726MB extended
 5 490GB 500GB 9726MB logical linux-swap(v1)

Model: Ext Hard Disk (scsi)
Disk /dev/sdc: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 178GB 178GB primary fat32 boot, lba
 2 178GB 320GB 142GB extended
 5 178GB 314GB 136GB logical ext4
 6 314GB 320GB 5804MB logical linux-swap(v1)
piet@piet-desktop:~$ sudo fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 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: 0xcd8ff381

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 121602 976657408 7 HPFS/NTFS

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 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: 0x00002ae1

   Device Boot Start End Blocks Id System
/dev/sdb1 1 59619 478886912 83 Linux
/dev/sdb2 59619 60802 9497601 5 Extended
/dev/sdb5 59619 60802 9497600 82 Linux swap / Solaris

Disk /dev/sdc: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 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: 0x2333a7cc

   Device Boot Start End Blocks Id System
/dev/sdc1 * 1 21663 174007322 c W95 FAT32 (LBA)
/dev/sdc2 21664 38914 138562561 5 Extended
/dev/sdc5 21664 38208 132893696 83 Linux
/dev/sdc6 38208 38914 5667840 82 Linux swap / Solaris
piet@piet-desktop:~$

Reply to actionparsnip (if I understand correctly):
I have Windows 7 Home premium, 64 bit and it found a DCP-110C driver on the net automatically.

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

"sudo update-grub" should have discovered and added both 1st disk recovery partition and Seven, and displayed them in menu, which is not the case.

"wrong # of devices in RAID": is sda a RAID configuration ? Grub need special drivers to manage RAID.

If you have no RAID, the way to fix for the moment the issue, is to edit grub.cfg file. If it works, we will have to fix another file to make fix permanent.

Run
   sudo blkid
and note for sda1 and sda2 the UUID value (disk signature).

The add following lines after" ### END /etc/grub.d/20_memtest86+ ###" in file /boot/grub/grub.cfg. Use
   sudo gedit /boot/grub/grub.cfg

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

and in file replace UUID of example by your disk UUIDs.
Remember that if it works, we have additional work to do.

Revision history for this message
Piet Visagie (pietvisagie) said :
#9

Thanks delance, your solution worked! I booted Windows and promptly 3 updates downloaded. I am sending this message via Ubuntu, everything seems OK!

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

No, it's not solved!
The next time you will update Grub, e.g. when you will update a new kernel, you will have to do this again. These modification must be installed in file /etc/grub.d/section40. But it's late today.
Post again tomorrow to remind me to provide you definitive solution.

Revision history for this message
Piet Visagie (pietvisagie) said :
#11

delance said it is not solved, I need to modify file /etc/grub.d/section40. Could you help, please?

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

https://help.ubuntu.com/community/Grub2#Custom%20Menu%20Entries
/etc/grub.d/40_custom file

It seems you have simply to copy menu entry in this file, without modification, and after to run "sudo update-grub".
The next time a new kernel will be installed, you will keep your Windows entry.

Please raise a bug against Grub2, so Grub2 programmers will know Windows is not properly detected in your configuration. They will investigate and fix problem. And so no new users will have problem. Today, it is critical because Maverick 10.10 is arriving soon, and so a lot of installations.

Revision history for this message
Piet Visagie (pietvisagie) said :
#13

These are the changes I made to my grub2 files. I can boot Windows 7 in recovery mode, sda1, but not from sda2 when it says: BOOTMGR missing, press ctrl-alt-del to boot. Linux boots normally by default.

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

### BEGIN /etc/grub.d/40_custom ###
#!/bin/sh
exec tail -n +3 $0
# 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.
menuentry "Windows Recovery (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set C6BEE4F1BEE4DAC7
chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set A2FAE6F5FAE6C51
chainloader +1
}

### END /etc/grub.d/40_custom ###

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

In partition table, sda1 is bootable and not sda2.
When you boot on sda1, for what I understand of Windows, you should boot recovery software, and on sd2 Windows 7.
I'm not sure, but with Gparted you can make sda2 bootable instead of sda1.
With Windows 7 recovery disk, you can run "bootrec /fixboot" which will write again boot sector of NTFS partition.

I see Windows in section 30. Does it means that now update-grub is able to see Windows inside NTFS partition ?

Revision history for this message
Piet Visagie (pietvisagie) said :
#15

Thanks for the information about the Windows 7 recovery disk. I am happy to start Windows in recovery mode, it works. I mostly run under linux now.

Windows is in section 30 because I put it there with gedit. I ran update-grub after the fix you recommended (changing section 30, then I could boot Windows) and it removed all reference to Windows. It also complained again about sda being a RAID disk. It also removed #!/bin/sh and exec tail -n +3 So I had to put the information back into sections 30 and 40, now it works, with this kernel. I am not sure that section 40 is OK. It works for now and I have a lot to learn, so I am happy. Thanks