Sorry, no need to anymore. Thanks anyways.
]]>or mark sda3 flag to boot.
ezik
]]>My partition table is:
[root@zenbook sonay]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 238.5G 0 disk
├─sda1 8:1 0 200M 0 disk
├─sda2 8:2 0 128M 0 disk
├─sda3 8:3 0 98.6G 0 disk
├─sda4 8:4 0 4G 0 disk
├─sda5 8:5 0 90.7G 0 disk
├─sda6 8:6 0 512M 0 disk /boot/efi
├─sda7 8:7 0 3.9G 0 disk
├─sda8 8:8 0 10G 0 disk
├─sda9 8:9 0 200M 0 disk /boot
└─sda10 8:10 0 30.3G 0 disk /
sdc 8:32 0 931.5G 0 disk
└─sdc1 8:33 0 931.5G 0 disk /run/media/sonay/My Passport
/dev/sda1 used to be Windows 7 EFI partition. Gparted says it is flagged as boot.
What I did to install arch:
Partitioned /dev/sda5 with windows disk manager to create linux partitions and formatted the new partitions with gparted as the noob I am.
created /dev/sda6 for EFI boot
created /dev/sda9 for boot partition
created /dev/sda10 as root.
Did not touch
/dev/sda1 which was the EFI partition named SYSTEM
/dev/sda2 which was windows boot partition
/dev/sda3 which was windows C:,
/dev/sda4 and /dev/sda7 which I don't know what they used to be (possible for Asus fast wake up or swap whatever)
/dev/sda8 which is recovery partition.
I did not touch any grub files, except /etc/default/grub
[sonay@zenbook ~]$ cat /etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet init=/bin/systemd add_efi_memmap elevator=noop i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"
GRUB_CMDLINE_LINUX=""
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true
# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console
# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto
# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"
# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
#GRUB_SAVEDEFAULT="true"
Finally my /boot/grub/grub.cfg is:
[sonay@zenbook ~]$ cat /etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet init=/bin/systemd add_efi_memmap elevator=noop i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"
GRUB_CMDLINE_LINUX=""
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true
# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console
# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto
# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"
# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
#GRUB_SAVEDEFAULT="true"
[sonay@zenbook ~]$ cat /boot/grub/grub.cfg
cat: /boot/grub/grub.cfg: Permission denied
[sonay@zenbook ~]$ su
Password:
[root@zenbook sonay]# cat /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt10'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10 cf66f05a-418c-4517-a0e0-af01b3be4a67
else
search --no-floppy --fs-uuid --set=root cf66f05a-418c-4517-a0e0-af01b3be4a67
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=1
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch GNU/Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-cf66f05a-418c-4517-a0e0-af01b3be4a67' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt9 --hint-efi=hd0,gpt9 --hint-baremetal=ahci0,gpt9 42d2ba69-758d-4a54-9482-ae5d60866a52
else
search --no-floppy --fs-uuid --set=root 42d2ba69-758d-4a54-9482-ae5d60866a52
fi
echo 'Loading Linux core repo kernel ...'
linux /vmlinuz-linux root=UUID=cf66f05a-418c-4517-a0e0-af01b3be4a67 ro quiet init=/bin/systemd add_efi_memmap elevator=noop i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux.img
}
menuentry 'Arch GNU/Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-cf66f05a-418c-4517-a0e0-af01b3be4a67' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt9 --hint-efi=hd0,gpt9 --hint-baremetal=ahci0,gpt9 42d2ba69-758d-4a54-9482-ae5d60866a52
else
search --no-floppy --fs-uuid --set=root 42d2ba69-758d-4a54-9482-ae5d60866a52
fi
echo 'Loading Linux core repo kernel ...'
linux /vmlinuz-linux root=UUID=cf66f05a-418c-4517-a0e0-af01b3be4a67 ro quiet init=/bin/systemd add_efi_memmap elevator=noop i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux-fallback.img
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda3)' --class windows --class os $menuentry_id_option 'osprober-chain-5246C0D846C0BE4B' {
insmod part_gpt
insmod ntfs
set root='hd0,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 5246C0D846C0BE4B
else
search --no-floppy --fs-uuid --set=root 5246C0D846C0BE4B
fi
chainloader +1
}
menuentry 'Windows Recovery Environment (loader) (on /dev/sda8)' --class windows --class os $menuentry_id_option 'osprober-chain-3C98C9B298C96B4A' {
insmod part_gpt
insmod ntfs
set root='hd0,gpt8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt8 --hint-efi=hd0,gpt8 --hint-baremetal=ahci0,gpt8 3C98C9B298C96B4A
else
search --no-floppy --fs-uuid --set=root 3C98C9B298C96B4A
fi
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# 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.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
SOLUTION:
first I needed to mount Windows EFI partition which was /dev/sda1, so :
mount /dev/sda1 /mnt
Then issue the following commands and take note of the outputs:
grub-probe --target=fs_uuid /mnt/EFI/Microsoft/Boot/bootmgfw.efi
which outputs: 18DF-E58E and
grub-probe --target=hints_string /mnt/EFI/Microsoft/Boot/bootmgfw.efi
which outputs: --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1
Finally edit the os-prober entry to the following in /boot/grub/grub.cfg
menuentry 'Windows 7 (loader) (on /dev/sda3)' --class windows --class os $menuentry_id_option 'osprober-chain-5246C0D846C0BE4B' {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 18DF-E58E
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}