6

I have windows installed on /dev/sda3 and running Ubuntu 11.10 on /dev/sda5. The boot loader points to /dev/sda1 and /dev/sda2. Both are parts of the recovery system for my laptop.

How do I edit the boot menu so that it points to /dev/sda3. I've tried following the directions, but I'm confused by them and many are outdated as things changed, apparently with 11.04.

Can someone help me, please? I just need to add the one entry.

Thanks!

It turns out that /dev/sda2 was my windows loader, but it was failing to boot. After a helpful comment (in an answer below), I re-installed windows and it fixed the issue. thanks for the help.

MikeyE
  • 105
Thom
  • 1,559

3 Answers3

9

update-grub should automatically detect and add Windows partitions. What's the output of this command?

This page is long, but the directions here should work for adding a custom menu entry:

https://help.ubuntu.com/community/Grub2

It would be something like:

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

You might need to twiddle the numbers to get the right partition.

1

It turns out that /dev/sda2 was my windows loader, but it was failing to boot. After a helpful content, I re-installed windows and it fixed the issue. thanks for the help

Thom
  • 1,559
0

my Grub.cfg for win on /dev/sda3

menuentry 'Windows 7 (loader) (on /dev/sda3)' --class windows --class os $menuentry_id_option 'osprober-chain-1592F8230DB28FD2' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  1592F8230DB28FD2
else
  search --no-floppy --fs-uuid --set=root 1592F8230DB28FD2
fi
parttool ${root} hidden-
chainloader +1

}

or insert cd/usb ubuntu_live and start ubuntu_Live then start "Gparted" after open Gparted , Ritht click on partition that install ubuntu and change Flag to "Boot" after reboot you run from Ubuntu then into terminal type "update-grub"

Stranger
  • 1
  • 1