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.

0

3 Answers 3

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.

3
  • Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.0.0-16-generic Found initrd image: /boot/initrd.img-3.0.0-16-generic Found linux image: /boot/vmlinuz-3.0.0-15-generic Found initrd image: /boot/initrd.img-3.0.0-15-generic Found linux image: /boot/vmlinuz-3.0.0-12-generic Found initrd image: /boot/initrd.img-3.0.0-12-generic Found memtest86+ image: /boot/memtest86+.bin Found Windows Recovery Environment (loader) on /dev/sda1 Found Windows 7 (loader) on /dev/sda2 done It once again missed windows on /dev/sda3
    – Thom
    Mar 7, 2012 at 2:03
  • 1
    Are you really sure that the Windows 7 bootloader is on sda3? Even if sda3 is your NTFS partition with Windows, the bootloader might be on sda2.
    – user41313
    Mar 7, 2012 at 5:48
  • @Thom Please add that information to your original question, that way it's not buried in a comment! Mar 7, 2012 at 5:53
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

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"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .