Add Windows 7 to boot menu

Posted by Cumatru on Ask Ubuntu See other posts from Ask Ubuntu or by Cumatru
Published on 2011-01-21T17:26:19Z Indexed on 2011/02/20 23:32 UTC
Read the original article Hit count: 345

Filed under:
|
|
|
|
    Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS   - system restore
/dev/sda2              13        4674    37436416    7  HPFS/NTFS  - Windows 7
/dev/sda3            4674       58843   435116032    7  HPFS/NTFS -  data storage
/dev/sda4           58843       60802    15728640   83  Linux - Ubuntu 10.10

Initially i´ve installed StartUpManager. This ( i think ) added another 4 instances of Linux + memtest to my boot menu list. Altough, i din´t see any boot menu. It boots into Ubuntu after a few seconds. I´ve tried to add windows 7, but i did not succeed. This is a part of my menu.lst file.

title        Ubuntu 10.10, kernel 2.6.35-24-generic
uuid        1c9748e2-2f11-4a6c-91c0-7310d48c4a7a
kernel        /boot/vmlinuz-2.6.35-24-generic root=UUID=1c9748e2-2f11-4a6c-91c0-7310d48c4a7a ro quiet splash
initrd        /boot/initrd.img-2.6.35-24-generic


title        Chainload into GRUB 2
root        1c9748e2-2f11-4a6c-91c0-7310d48c4a7a
kernel        /boot/grub/core.img

title        Ubuntu 10.10, memtest86+
uuid        1c9748e2-2f11-4a6c-91c0-7310d48c4a7a
kernel        /boot/memtest86+.bin


menuentry “Windows 7? {
set root=(hd0,2)
chainloader +1

}

And this is after a upgrade-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-24-generic
Found kernel: /boot/vmlinuz-2.6.35-22-generic
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

Later Edit:

Ive added the following in 40_custom from /etc/grub.d/ and ive decommented hidden menu line from menu.lst, but i still cant see any boot menu. Ive also tried to press ESC and SHIFT.

menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
chainloader +1

}

menuentry "Windows 7 (loader) (on /dev/sda1)" { insmod part_msdos insmod ntfs set root='(hd0,msdos0)' chainloader +1

}

menuentry "Windows 7 (loader) (on /dev/sda1)" {

set root= hd(0,0)
chainloader +1

}

menuentry "!Windows 7 (loader) (on /dev/sda1)" {

set root= hd(0,1)
chainloader +1

}
menuentry "!!Windows 7 (loader) (on /dev/sda1)" {

set root= hd(0,2)
chainloader +1

}

© Ask Ubuntu or respective owner

Related posts about boot

Related posts about grub