Eu fiz algumas pesquisas e não consegui descobrir como adicionar minha unidade do Windows 10 (HDD separado) / dev / sdd ao menu do grub 2.
Eu instalei o Manjaro Linux em uma unidade separada, o Windows está no antigo. O Windows foi instalado primeiro, lembro-me que quando me deparei com o linux no ubuntu, ele detectou e listou as janelas por padrão no grub.
Como adiciono uma entrada do Windows ao grub?
uname -r
- > 4.4.17-1-MANJARO
grub-install --version
- > grub-install (GRUB) 2.02~beta3
sudo update-grub
- >
Generating grub configuration file ...
Found background: /usr/share/grub/background.png
Found Intel Microcode image
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found initrd fallback image: /boot/initramfs-linux-fallback.img
Found linux image: /boot/vmlinuz-4.7-x86_64
Found initrd image: /boot/initramfs-4.7-x86_64.img
Found initrd fallback image: /boot/initramfs-4.7-x86_64-fallback.img
Found linux image: /boot/vmlinuz-4.4-x86_64
Found initrd image: /boot/initramfs-4.4-x86_64.img
Found initrd fallback image: /boot/initramfs-4.4-x86_64-fallback.img
Found linux image: /boot/vmlinuz-3.10-x86_64
Found initrd image: /boot/initramfs-3.10-x86_64.img
Found initrd fallback image: /boot/initramfs-3.10-x86_64-fallback.img
Found memtest86+ image: /boot/memtest86+/memtest.bin
done
blkid | grep ntfs
- >
/dev/sdd1: LABEL="System Reserved" UUID="01D1CED0D0E25BB0" TYPE="ntfs" PARTUUID="576e6452-01"
/dev/sdd2: LABEL="Computer" UUID="01D1CED73B23FDC0" TYPE="ntfs" PARTUUID="576e6452-02"
/etc/fdisk
- >
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=596E-1D7B /boot/efi vfat defaults,noatime 0 2
UUID=e96e9dc6-b686-419c-8070-532b71f0631a / ext4 defaults,noatime,discard 0 1
UUID=b0dedb36-a45d-407f-be01-1da38f343149 /home ext4 defaults,commit=60,noatime 0 2
UUID=5acc3a2a-fc46-4d5d-916c-3e42f1b77141 swap swap defaults,noatime,discard 0 2
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
#windows drive
UUID=01D1CED0D0E25BB0 /mnt/windows ntfs locale=en_US.utf8,dmask=022,fmask=022 0 2
UUID=01D1CED73B23FDC0 /mnt/windows2 ntfs locale=en_US.utf8,dmask=022,fmask=022 0 2
EDITAR : adicionado os-prober, grub-mkconfig
sudo os-prober
- > [Em branco] não retornou nada no terminal
sudo grub-mkconfig
- >
Generating grub configuration file ...
#
# 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
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="${saved_entry}"
fi
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
}
set menu_color_normal=light-gray/black
set menu_color_highlight=green/black
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd4,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 e96e9dc6-b686-419c-8070-532b71f0631a
else
search --no-floppy --fs-uuid --set=root e96e9dc6-b686-419c-8070-532b71f0631a
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_CA
insmod gettext
fi
terminal_input console
terminal_output gfxterm
Found background: /usr/share/grub/background.png
insmod part_gpt
insmod ext2
set root='hd4,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 e96e9dc6-b686-419c-8070-532b71f0631a
else
search --no-floppy --fs-uuid --set=root e96e9dc6-b686-419c-8070-532b71f0631a
fi
insmod png
background_image -m stretch /usr/share/grub/background.png
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
Found Intel Microcode image
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
menuentry 'Manjaro Linux' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-e96e9dc6-b686-419c-8070-532b71f0631a' {
savedefault
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd4,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 e96e9dc6-b686-419c-8070-532b71f0631a
else
search --no-floppy --fs-uuid --set=root e96e9dc6-b686-419c-8070-532b71f0631a
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=e96e9dc6-b686-419c-8070-532b71f0631a rw resume=UUID=5acc3a2a-fc46-4d5d-916c-3e42f1b77141 quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
submenu 'Advanced options for Manjaro Linux' $menuentry_id_option 'gnulinux-advanced-e96e9dc6-b686-419c-8070-532b71f0631a' {
menuentry 'Manjaro Linux (Kernel: linux)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-e96e9dc6-b686-419c-8070-532b71f0631a' {
savedefault
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd4,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 e96e9dc6-b686-419c-8070-532b71f0631a
else
search --no-floppy --fs-uuid --set=root e96e9dc6-b686-419c-8070-532b71f0631a
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=e96e9dc6-b686-419c-8070-532b71f0631a rw resume=UUID=5acc3a2a-fc46-4d5d-916c-3e42f1b77141 quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
Found initrd fallback image: /boot/initramfs-linux-fallback.img
menuentry 'Manjaro Linux (Kernel: linux - fallback initramfs)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-e96e9dc6-b686-419c-8070-532b71f0631a' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd4,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 e96e9dc6-b686-419c-8070-532b71f0631a
else
search --no-floppy --fs-uuid --set=root e96e9dc6-b686-419c-8070-532b71f0631a
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=e96e9dc6-b686-419c-8070-532b71f0631a rw resume=UUID=5acc3a2a-fc46-4d5d-916c-3e42f1b77141 quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-fallback.img
}
Found linux image: /boot/vmlinuz-4.7-x86_64
Found initrd image: /boot/initramfs-4.7-x86_64.img
menuentry 'Manjaro Linux (Kernel: 4.7.2-1-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.7.2-1-MANJARO x64-advanced-e96e9dc6-b686-419c-8070-532b71f0631a' {
savedefault
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd4,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 e96e9dc6-b686-419c-8070-532b71f0631a
else
search --no-floppy --fs-uuid --set=root e96e9dc6-b686-419c-8070-532b71f0631a
fi
echo 'Loading Linux 4.7.2-1-MANJARO x64 ...'
linux /boot/vmlinuz-4.7-x86_64 root=UUID=e96e9dc6-b686-419c-8070-532b71f0631a rw resume=UUID=5acc3a2a-fc46-4d5d-916c-3e42f1b77141 quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-4.7-x86_64.img
}
Found initrd fallback image: /boot/initramfs-4.7-x86_64-fallback.img
menuentry 'Manjaro Linux (Kernel: 4.7.2-1-MANJARO x64 - fallback initramfs)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.7.2-1-MANJARO x64-fallback-e96e9dc6-b686-419c-8070-532b71f0631a' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd4,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 e96e9dc6-b686-419c-8070-532b71f0631a
else
search --no-floppy --fs-uuid --set=root e96e9dc6-b686-419c-8070-532b71f0631a
fi
echo 'Loading Linux 4.7.2-1-MANJARO x64 ...'
linux /boot/vmlinuz-4.7-x86_64 root=UUID=e96e9dc6-b686-419c-8070-532b71f0631a rw resume=UUID=5acc3a2a-fc46-4d5d-916c-3e42f1b77141 quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-4.7-x86_64-fallback.img
}
Found linux image: /boot/vmlinuz-4.4-x86_64
Found initrd image: /boot/initramfs-4.4-x86_64.img
menuentry 'Manjaro Linux (Kernel: 4.4.19-1-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.19-1-MANJARO x64-advanced-e96e9dc6-b686-419c-8070-532b71f0631a' {
savedefault
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd4,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 e96e9dc6-b686-419c-8070-532b71f0631a
else
search --no-floppy --fs-uuid --set=root e96e9dc6-b686-419c-8070-532b71f0631a
fi
echo 'Loading Linux 4.4.19-1-MANJARO x64 ...'
linux /boot/vmlinuz-4.4-x86_64 root=UUID=e96e9dc6-b686-419c-8070-532b71f0631a rw resume=UUID=5acc3a2a-fc46-4d5d-916c-3e42f1b77141 quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-4.4-x86_64.img
}
Found initrd fallback image: /boot/initramfs-4.4-x86_64-fallback.img
menuentry 'Manjaro Linux (Kernel: 4.4.19-1-MANJARO x64 - fallback initramfs)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.19-1-MANJARO x64-fallback-e96e9dc6-b686-419c-8070-532b71f0631a' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd4,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 e96e9dc6-b686-419c-8070-532b71f0631a
else
search --no-floppy --fs-uuid --set=root e96e9dc6-b686-419c-8070-532b71f0631a
fi
echo 'Loading Linux 4.4.19-1-MANJARO x64 ...'
linux /boot/vmlinuz-4.4-x86_64 root=UUID=e96e9dc6-b686-419c-8070-532b71f0631a rw resume=UUID=5acc3a2a-fc46-4d5d-916c-3e42f1b77141 quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-4.4-x86_64-fallback.img
}
Found linux image: /boot/vmlinuz-3.10-x86_64
Found initrd image: /boot/initramfs-3.10-x86_64.img
menuentry 'Manjaro Linux (Kernel: 3.10.102-1-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.102-1-MANJARO x64-advanced-e96e9dc6-b686-419c-8070-532b71f0631a' {
savedefault
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd4,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 e96e9dc6-b686-419c-8070-532b71f0631a
else
search --no-floppy --fs-uuid --set=root e96e9dc6-b686-419c-8070-532b71f0631a
fi
echo 'Loading Linux 3.10.102-1-MANJARO x64 ...'
linux /boot/vmlinuz-3.10-x86_64 root=UUID=e96e9dc6-b686-419c-8070-532b71f0631a rw resume=UUID=5acc3a2a-fc46-4d5d-916c-3e42f1b77141 quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-3.10-x86_64.img
}
Found initrd fallback image: /boot/initramfs-3.10-x86_64-fallback.img
menuentry 'Manjaro Linux (Kernel: 3.10.102-1-MANJARO x64 - fallback initramfs)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.102-1-MANJARO x64-fallback-e96e9dc6-b686-419c-8070-532b71f0631a' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd4,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 e96e9dc6-b686-419c-8070-532b71f0631a
else
search --no-floppy --fs-uuid --set=root e96e9dc6-b686-419c-8070-532b71f0631a
fi
echo 'Loading Linux 3.10.102-1-MANJARO x64 ...'
linux /boot/vmlinuz-3.10-x86_64 root=UUID=e96e9dc6-b686-419c-8070-532b71f0631a rw resume=UUID=5acc3a2a-fc46-4d5d-916c-3e42f1b77141 quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-3.10-x86_64-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/30_os-prober ###
### 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 ###
### BEGIN /etc/grub.d/60_memtest86+ ###
Found memtest86+ image: /boot/memtest86+/memtest.bin
if [ "${grub_platform}" == "pc" ]; then
menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
search --fs-uuid --no-floppy --set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 e96e9dc6-b686-419c-8070-532b71f0631a
linux16 /boot/memtest86+/memtest.bin
}
fi
### END /etc/grub.d/60_memtest86+ ###
done
sudo parted /dev/sdd print
- >
Model: ATA ST31000524AS (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 525MB 524MB primary ntfs boot
2 525MB 1000GB 1000GB primary ntfs
A tentativa de seguir este guia enquanto dentro do sistema montado /mnt/windows
, chamado find . -name bootmgfr.efi
sem sorte.
Por dentro /mnt/windows/Boot
não possui pasta EFI ou arquivos efi de qualquer tipo
O win10 iso montado, EFI montado, entrou em EFI/Microsoft/Boot/
e o arquivo bootmgfw.efi já existia, adicionou o bootmgr.efi do win10 iso, correu o sudo grub-mkconfig
, o grub ainda não tinha a opção do Windows