I'm formatted my SSD and installed windows7, after I installed manjaro linux with GRUB2. In GRUB2 there is no windows7 submenu. So I'm executed update-grub, it returned no errors, but windows7 wasn't found, so I added it through editing /etc/grub.d/40_custom:

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.
submenu "Windows 7" {
 regexp -s root '\((.+)\)' "$cmdpath"
 chainloader /EFI/Microsoft/Boot/bootmgfw.efi

How to add windows7 in grub? There is my disks partitioning:

NAME   FSTYPE LABEL            UUID                                 MOUNTPOINT
├─sda1 ntfs   System Reserved  6874CCE474CCB65A                     
├─sda2 ntfs                    34F0E721F0E6E7D6                     
├─sda3 vfat                    52FA-B552                            /boot/efi
└─sda4 ext4                    da2e349a-50aa-4bda-9770-32d431bb0881 /
├─sdb1 ntfs   My Files         F26C58206C57DDC3                     
├─sdb2 ntfs   Windows Programs 0EBA345BBA34418F                     
└─sdb3 ext4                    a6064200-2841-4f0b-8c69-7fbe41993fd4 /home

sda1 and sda2 were created automaticly by windows7 installer. I am guessing what sda1 is windows bootloader, and on sda2 windows installed

>>> sudo mount /dev/sda1 /mnt
>>> ls /mnt
Boot  bootmgr  BOOTSECT.BAK  'System Volume Information'

>>> sudo mount /dev/sda2 /mnt
>>> ls /mnt
Boot          'Documents and Settings'  Portable         'Program Files (x86)'        Users
bootmgr       pagefile.sys              ProgramData      '$Recycle.Bin'               Windows
BOOTSECT.BAK  PerfLogs                  'Program Files'  'System Volume Information'

The partition of hd0 was mbr, not gpt. I'm reinstalled both OS with correct partition type and it was solved the problem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.