|
# |
|
|
Темы: 8 Сообщения: 61 Участник с: 22 апреля 2018 |
Всем здрасти. В системе два диска. обычный и ssd. После установки archlinux c uefi на отдельный диск с разметкой gpt, загрузчик grub почему то не подцепил windows 10 на соседнем диске ssd (хотя надо заметить что при аналогичной установке fedora в grub прописывалась винда). Может кто нибудь что нибудь подсказать? Может я напутала что при установке? Arch устанавливала первый раз. Система пока совершенно лысая и без графического окружения. Я что то напутала да? |
|
Eva_Berg |
# (отредактировано 7 лет назад) |
|
Темы: 36 Сообщения: 434 Участник с: 08 августа 2013 |
sudo pacman -S os-prober далее уже пробовать sudo grub-mkconfig -o /boot/grub/grub.cfg Без os-prober граб не видит никаких «левых» осей |
|
Morisson |
# |
|
Темы: 18 Сообщения: 1449 Участник с: 11 января 2017 |
Есть такой косячок.. Совсем недавно на разные устройства ставил арч- с ос-пробер тоже не подхватывает.. |
|
Morisson |
# |
|
Темы: 18 Сообщения: 1449 Участник с: 11 января 2017 |
Как то так |
|
Morisson |
# |
|
Темы: 18 Сообщения: 1449 Участник с: 11 января 2017 |
Естесственно, только команды арчевые надо)
Лучший вариант- вручную добавить запись |
|
olyaX |
# (отредактировано 7 лет назад) |
|
Темы: 8 Сообщения: 61 Участник с: 22 апреля 2018 |
— установила os-prober |
|
papados |
# |
|
Темы: 17 Сообщения: 228 Участник с: 11 апреля 2013 |
в chroot os-prober не подхватывает форточки, только в загруженном арчике
ThinkPad X390 |
#1 2017-05-15 10:28:09
- philipW
- Member
- Registered: 2017-03-21
- Posts: 145
[SOLVED] grub doesnt detect windows 10
Hi,
I dualboot my arch with windows 10 on my laptop.
In my laptop i have an ssd and a hdd.
I splitted my ssd in two partitions one for windows and the other for arch /.
The same with my hdd one partition with windows stuff and the other for my /home.
I tried mounting my windows partition and then:
sudo os-prober
grub-mkconfig
The first time i did:
it gave me some info but now everytime i do the command i got no info back.
This is what i get if i do :
[philip@FlipArch ~]$ sudo grub-mkconfig
[sudo] password for philip:
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="0"
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
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6 482cf21a-99a7-4a0a-9ad4-9049a19896b7
else
search --no-floppy --fs-uuid --set=root 482cf21a-99a7-4a0a-9ad4-9049a19896b7
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
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 linux image: /boot/vmlinuz-linux
Found initrd image(s) in /boot: intel-ucode.img initramfs-linux.img
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-482cf21a-99a7-4a0a-9ad4-9049a19896b7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6 482cf21a-99a7-4a0a-9ad4-9049a19896b7
else
search --no-floppy --fs-uuid --set=root 482cf21a-99a7-4a0a-9ad4-9049a19896b7
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=482cf21a-99a7-4a0a-9ad4-9049a19896b7 rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-482cf21a-99a7-4a0a-9ad4-9049a19896b7' {
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-482cf21a-99a7-4a0a-9ad4-9049a19896b7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6 482cf21a-99a7-4a0a-9ad4-9049a19896b7
else
search --no-floppy --fs-uuid --set=root 482cf21a-99a7-4a0a-9ad4-9049a19896b7
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=482cf21a-99a7-4a0a-9ad4-9049a19896b7 rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
Found fallback initrd image(s) in /boot: intel-ucode.img initramfs-linux-fallback.img
menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-482cf21a-99a7-4a0a-9ad4-9049a19896b7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6 482cf21a-99a7-4a0a-9ad4-9049a19896b7
else
search --no-floppy --fs-uuid --set=root 482cf21a-99a7-4a0a-9ad4-9049a19896b7
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=482cf21a-99a7-4a0a-9ad4-9049a19896b7 rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/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/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 ###
done
Last edited by philipW (2017-05-15 16:39:25)
#2 2017-05-15 12:06:40
- tom.ty89
- Member
- Registered: 2012-11-15
- Posts: 897
Re: [SOLVED] grub doesnt detect windows 10
Hmm, does os-proper require the Windows partition to be mounted?
If so, make sure you mount the correct partition. For UEFI boot you should have the EFI System Partition mounted, for legacy boot you should have the System Reserved partition mounted (well, for a «proper» BIOS Windows installation, that’s where the bootmgr/NTLDR lies).
Also you cannot do «cross-platform» boot with grub. For example, if grub was installed with —target x86_64-efi, it can only chainload bootmgfw.efi; if grub was installed with —target i386-pc, it can only load bootmgr/NTLDR.
Last edited by tom.ty89 (2017-05-15 12:06:58)
#3 2017-05-15 12:22:10
- philipW
- Member
- Registered: 2017-03-21
- Posts: 145
Re: [SOLVED] grub doesnt detect windows 10
tom.ty89 wrote:
Hmm, does os-proper require the Windows partition to be mounted?
If so, make sure you mount the correct partition. For UEFI boot you should have the EFI System Partition mounted, for legacy boot you should have the System Reserved partition mounted (well, for a «proper» BIOS Windows installation, that’s where the bootmgr/NTLDR lies).
Also you cannot do «cross-platform» boot with grub. For example, if grub was installed with —target x86_64-efi, it can only chainload bootmgfw.efi; if grub was installed with —target i386-pc, it can only load bootmgr/NTLDR.
I don’t know why it needs to be mounted other distros i used detected widows instandly but i read somewhere that it might fix my issue so i gave it a try.
My grub is installed in the same efi partition as my windows bootloader.
i am 90% sure i installed it with
is there a way i can check to be sure?
When i installed grub it said that it couldnt find an efi partition so i made a folder in /mnt and mounted the efi partition on it and then it worked fine.
i am not sure if this has something to do with my issue.
#4 2017-05-15 12:32:45
- tom.ty89
- Member
- Registered: 2012-11-15
- Posts: 897
Re: [SOLVED] grub doesnt detect windows 10
philipW wrote:
is there a way i can check to be sure?
Well mount the ESP and see if there are both a EFI/grub and EFI/Microsoft?
When i installed grub it said that it couldnt find an efi partition so i made a folder in /mnt and mounted the efi partition on it and then it worked fine.
i am not sure if this has something to do with my issue.
No, it’s fine. But the fact that the ESP is not mounted to /boot or /boot/efi when you run grub-mkconfig might be the reason. Not really sure about the search path/mechanism of os-prober.
#5 2017-05-15 12:33:42
- philipW
- Member
- Registered: 2017-03-21
- Posts: 145
Re: [SOLVED] grub doesnt detect windows 10
Oke i found out i have 86_64 i looked into the /boot/grub/ folder and there is a 86_64-efi it there.
But if i look in the /boot/ folder from the windows point of view i don’t see any grub stuff.
Is this normal?
Last edited by philipW (2017-05-15 12:34:45)
#6 2017-05-15 12:38:35
- tom.ty89
- Member
- Registered: 2012-11-15
- Posts: 897
Re: [SOLVED] grub doesnt detect windows 10
phillipW wrote:
But if i look in the /boot/ folder from the windows point of view i don’t see any grub stuff.
From the Windows POV? What do you mean? Why do you have to check it from Windows?
#7 2017-05-15 14:08:50
- philipW
- Member
- Registered: 2017-03-21
- Posts: 145
Re: [SOLVED] grub doesnt detect windows 10
tom.ty89 wrote:
phillipW wrote:
But if i look in the /boot/ folder from the windows point of view i don’t see any grub stuff.
From the Windows POV? What do you mean? Why do you have to check it from Windows?
Sorry for my poor choise of words what i was trying to say that if i look at the boot partition from windows i dont see any grub files.
I remember when i dualbooted ubuntu there where grub files in the boot partition when i looked at it from the windows side but before i installed arch i cleared my efi partition of everything exept for the windows stuff so everything was clean for arch.
#8 2017-05-15 14:37:19
- tom.ty89
- Member
- Registered: 2012-11-15
- Posts: 897
Re: [SOLVED] grub doesnt detect windows 10
Still why do you look at the boot partition from Windows? Is «the boot partition» here the ESP that you are referring to?
The grub directory (the one that consists of the x86_64-efi directory) can practically be put under anywhere you like. If you didn’t specify a —boot-directory some_path (not —efi-directory) option, it would be under /boot, otherwise it would be under some_path.
But where exactly /boot or some_path refers to can vary. It can be a directory in a filesystem, but it can also be a mount point, or even both.
Let say you have /dev/sdXY mounted on /boot when you grub-install, the grub directory would be in /dev/sdXY under the root tree of its filesystem. If you rebooted with /dev/sdXY mounted to /boot, you will continue to see a «grub» and other content in /dev/sdXY under /boot; but if you rebooted without it mounted to /boot, then you will not, _instead_ you will see the content (if any) that is in «the /boot» of the root filesystem.
[tom@localhost tmp]$ mkdir a
[tom@localhost tmp]$ touch a/file_a
[tom@localhost tmp]$ ls -l a/
total 0
-rw-r--r-- 1 tom tom 0 May 15 22:39 file_a
[tom@localhost tmp]$ sudo mount /dev/loop0 a/
[tom@localhost tmp]$ ls -l a/
total 0
[tom@localhost tmp]$ sudo touch a/file_loop
[tom@localhost tmp]$ ls -l a/
total 4
-rw-r--r-- 1 root root 0 May 15 22:40 file_loop
[tom@localhost tmp]$ sudo umount a/
[tom@localhost tmp]$ ls -l a/
total 0
-rw-r--r-- 1 tom tom 0 May 15 22:39 file_a
Last edited by tom.ty89 (2017-05-15 14:43:55)
#9 2017-05-15 15:10:58
- philipW
- Member
- Registered: 2017-03-21
- Posts: 145
Re: [SOLVED] grub doesnt detect windows 10
tom.ty89 wrote:
Still why do you look at the boot partition from Windows? Is «the boot partition» here the ESP that you are referring to?
The grub directory (the one that consists of the x86_64-efi directory) can practically be put under anywhere you like. If you didn’t specify a —boot-directory some_path (not —efi-directory) option, it would be under /boot, otherwise it would be under some_path.
But where exactly /boot or some_path refers to can vary. It can be a directory in a filesystem, but it can also be a mount point, or even both.
Let say you have /dev/sdXY mounted on /boot when you grub-install, the grub directory would be in /dev/sdXY under the root tree of its filesystem. If you rebooted with /dev/sdXY mounted to /boot, you will continue to see a «grub» and other content in /dev/sdXY under /boot; but if you rebooted without it mounted to /boot, then you will not, _instead_ you will see the content (if any) that is in «the /boot» of the root filesystem.
[tom@localhost tmp]$ mkdir a [tom@localhost tmp]$ touch a/file_a [tom@localhost tmp]$ ls -l a/ total 0 -rw-r--r-- 1 tom tom 0 May 15 22:39 file_a [tom@localhost tmp]$ sudo mount /dev/loop0 a/ [tom@localhost tmp]$ ls -l a/ total 0 [tom@localhost tmp]$ sudo touch a/file_loop [tom@localhost tmp]$ ls -l a/ total 4 -rw-r--r-- 1 root root 0 May 15 22:40 file_loop [tom@localhost tmp]$ sudo umount a/ [tom@localhost tmp]$ ls -l a/ total 0 -rw-r--r-- 1 tom tom 0 May 15 22:39 file_a
yeah with the boot partition im referring to the ESP.
I also looked at the boot partition from the windows side because when i successfully dualbooted ubuntu i noticed there where grub folders in there when i looked with windows.
So i tought maybe its usefull info.
Last edited by philipW (2017-05-15 15:11:23)
#10 2017-05-15 15:25:52
- tom.ty89
- Member
- Registered: 2012-11-15
- Posts: 897
Re: [SOLVED] grub doesnt detect windows 10
The ESP could contain only a single grub directory, which consists of a single EFI executable, under its EFI directory.
If you use the ESP for /boot (i.e. you have it persistently mounted to /boot), you should _also_ see a grub directory that consists of the modules directory (x86_64-efi) and grub.cfg, and kernel(s) and initramfs image(s), directly under the root tree of the ESP (i.e. /boot when you have it mounted to /boot).
Last edited by tom.ty89 (2017-05-15 15:27:27)
#11 2017-05-15 15:42:35
- philipW
- Member
- Registered: 2017-03-21
- Posts: 145
Re: [SOLVED] grub doesnt detect windows 10
I think i found what the problem is my efi partition is not mounted.
i looked at fstab and i dont see sda1 (witch is my efi partition) anywhere.
#12 2017-05-15 15:53:17
- tom.ty89
- Member
- Registered: 2012-11-15
- Posts: 897
Re: [SOLVED] grub doesnt detect windows 10
Well see #4.
Btw If you want to use the ESP for /boot, you probably need to re-install grub and the kernel package(s) after you have the fstab entry written and in use. grub apparently wasn’t installed with that assumption according to what you mentioned (the second quote in #4).
Otherwise I suppose you should have it mounted to /boot/efi. I think os-prober would at least look into that path.
Last edited by tom.ty89 (2017-05-15 15:54:27)
#13 2017-05-15 16:03:05
- philipW
- Member
- Registered: 2017-03-21
- Posts: 145
Re: [SOLVED] grub doesnt detect windows 10
so i did:
[philip@FlipArch ~]$ sudo mount /dev/sda1 /boot/efi/
[sudo] password for philip:
[philip@FlipArch ~]$ sudo os-prober
/dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
[philip@FlipArch ~]$ 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="0"
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
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6 482cf21a-99a7-4a0a-9ad4-9049a19896b7
else
search --no-floppy --fs-uuid --set=root 482cf21a-99a7-4a0a-9ad4-9049a19896b7
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
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 linux image: /boot/vmlinuz-linux
Found initrd image(s) in /boot: intel-ucode.img initramfs-linux.img
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-482cf21a-99a7-4a0a-9ad4-9049a19896b7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6 482cf21a-99a7-4a0a-9ad4-9049a19896b7
else
search --no-floppy --fs-uuid --set=root 482cf21a-99a7-4a0a-9ad4-9049a19896b7
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=482cf21a-99a7-4a0a-9ad4-9049a19896b7 rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-482cf21a-99a7-4a0a-9ad4-9049a19896b7' {
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-482cf21a-99a7-4a0a-9ad4-9049a19896b7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6 482cf21a-99a7-4a0a-9ad4-9049a19896b7
else
search --no-floppy --fs-uuid --set=root 482cf21a-99a7-4a0a-9ad4-9049a19896b7
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=482cf21a-99a7-4a0a-9ad4-9049a19896b7 rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
Found fallback initrd image(s) in /boot: intel-ucode.img initramfs-linux-fallback.img
menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-482cf21a-99a7-4a0a-9ad4-9049a19896b7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6 482cf21a-99a7-4a0a-9ad4-9049a19896b7
else
search --no-floppy --fs-uuid --set=root 482cf21a-99a7-4a0a-9ad4-9049a19896b7
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=482cf21a-99a7-4a0a-9ad4-9049a19896b7 rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/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/30_os-prober ###
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-9C75-6EA4' {
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 9C75-6EA4
else
search --no-floppy --fs-uuid --set=root 9C75-6EA4
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### 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 ###
done
I found out the efi partition is not mounted on /boot/ so i made a folder in /boot called efi thats where i mounted the EFI partition on (/dev/sda1)
Os prober says that it detected windows but its not in the grub menu when i reboot.
I also tried mounting the EFI partition on the /boot folder itself but that also didnt work.
Last edited by philipW (2017-05-15 16:06:44)
#14 2017-05-15 16:12:55
- tom.ty89
- Member
- Registered: 2012-11-15
- Posts: 897
Re: [SOLVED] grub doesnt detect windows 10
Do not just randomly mount the ESP to /boot…
philipW wrote:
[philip@FlipArch ~]$ sudo grub-mkconfig
sudo grub-mkconfig -o /boot/grub/grub.cfg
Unmount the ESP from /boot _before you do that_. Mount whichever partition that was used for /boot on /boot (if it isn’t mounted yet; check with findmnt /boot). If there was none, then mount nothing on it.
Last edited by tom.ty89 (2017-05-15 16:14:59)
#15 2017-05-15 16:38:59
- philipW
- Member
- Registered: 2017-03-21
- Posts: 145
Re: [SOLVED] grub doesnt detect windows 10
tom.ty89 wrote:
Do not just randomly mount the ESP to /boot…
philipW wrote:
[philip@FlipArch ~]$ sudo grub-mkconfigsudo grub-mkconfig -o /boot/grub/grub.cfgUnmount the ESP from /boot _before you do that_. Mount whichever partition that was used for /boot on /boot (if it isn’t mounted yet; check with findmnt /boot). If there was none, then mount nothing on it.
sudo grub-mkconfig -o /boot/grub/grub.cfg
worked!
0
1
Здравствуйте, установил вчера кое как арч линукс второй системой на ноут. Теперь не могу запустить windows. Grub не видит её.
В общем устанавливал я не с первого раза, использовал новый установщик archinstall. Попыток наверно 5 сделал и все заканчивались красным страшным текстом на весь монитор, что что то там не получилось, как я понял не получалось efi раздел смонтировать или не туда он монтировался, я испробовал много разных вариантов, которые раньше работали, но сейчас почему то не вышло.
Установил я арч без загрузчика и потом из chroot смонтировал /dev/nvme0n1p1 (efi раздел 4гб) в /boot, и там появилась папка EFI. Далее установил grub (он сам нашел efi раздел) и о чудо все заработало. Но в grub нет windows. Погуглил я и не нашел решения моего вопроса, везде советуют #grub-mkconfig -o /boot/grub/grub.cfg, но grub.cfg у меня нет в системе в принципе.
Вот дерево /boot:
/boot
├── EFI
│ ├── arch
│ ├── Boot
│ │ └── bootx64.efi
│ ├── grub
│ │ └── grubx64.efi
│ ├── Lenovo
│ │ └── BIOS
│ │ └── SelfHealing.fd
│ └── Microsoft
│ ├── Boot
│ │ ├── BCD
│ │ ├── BCD.LOG
│ │ ├── BCD.LOG1
│ │ ├── BCD.LOG2
│ │ ├── bg-BG
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── bootmgfw.efi
│ │ ├── bootmgr.efi
│ │ ├── BOOTSTAT.DAT
│ │ ├── boot.stl
│ │ ├── cs-CZ
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── da-DK
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── de-DE
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── el-GR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── en-GB
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── en-US
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── es-ES
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── es-MX
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── et-EE
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── fi-FI
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── Fonts
│ │ │ ├── chs_boot.ttf
│ │ │ ├── cht_boot.ttf
│ │ │ ├── jpn_boot.ttf
│ │ │ ├── kor_boot.ttf
│ │ │ ├── malgun_boot.ttf
│ │ │ ├── malgunn_boot.ttf
│ │ │ ├── meiryo_boot.ttf
│ │ │ ├── meiryon_boot.ttf
│ │ │ ├── msjh_boot.ttf
│ │ │ ├── msjhn_boot.ttf
│ │ │ ├── msyh_boot.ttf
│ │ │ ├── msyhn_boot.ttf
│ │ │ ├── segmono_boot.ttf
│ │ │ ├── segoen_slboot.ttf
│ │ │ ├── segoe_slboot.ttf
│ │ │ └── wgl4_boot.ttf
│ │ ├── fr-CA
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── fr-FR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── hr-HR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── hu-HU
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── it-IT
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── ja-JP
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── kd_02_10df.dll
│ │ ├── kd_02_10ec.dll
│ │ ├── kd_02_1137.dll
│ │ ├── kd_02_14e4.dll
│ │ ├── kd_02_15b3.dll
│ │ ├── kd_02_1969.dll
│ │ ├── kd_02_19a2.dll
│ │ ├── kd_02_1af4.dll
│ │ ├── kd_02_8086.dll
│ │ ├── kd_07_1415.dll
│ │ ├── kd_0C_8086.dll
│ │ ├── kdnet_uart16550.dll
│ │ ├── kdstub.dll
│ │ ├── ko-KR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── lt-LT
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── lv-LV
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── memtest.efi
│ │ ├── nb-NO
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── nl-NL
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── pl-PL
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── pt-BR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── pt-PT
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── qps-ploc
│ │ │ └── memtest.efi.mui
│ │ ├── Resources
│ │ │ ├── bootres.dll
│ │ │ ├── en-US
│ │ │ │ └── bootres.dll.mui
│ │ │ └── ru-RU
│ │ │ └── bootres.dll.mui
│ │ ├── ro-RO
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── ru-RU
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── sk-SK
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── sl-SI
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── sr-Latn-RS
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── sv-SE
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── tr-TR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── uk-UA
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── winsipolicy.p7b
│ │ ├── zh-CN
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ └── zh-TW
│ │ ├── bootmgfw.efi.mui
│ │ ├── bootmgr.efi.mui
│ │ └── memtest.efi.mui
│ └── Recovery
│ ├── BCD
│ ├── BCD.LOG
│ ├── BCD.LOG1
│ └── BCD.LOG2
└── System Volume Information
51 directories, 142 files
Вот вывод fdisk -l:
Disk /dev/nvme0n1: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: SAMSUNG MZVLB1T0HBLR-000L2
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 406BE08F-2983-4B8D-976D-A6BB8EE68842
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 8194047 8192000 3.9G EFI System
/dev/nvme0n1p2 8194048 8226815 32768 16M Microsoft reserved
/dev/nvme0n1p3 8226816 928724961 920498146 438.9G Microsoft basic data
/dev/nvme0n1p4 928724992 929791999 1067008 521M Windows recovery environment
/dev/nvme0n1p6 937984000 2000408575 1062424576 506.6G Linux filesystem
Я допускаю, что я рукожоп и криво установил grub, но даже теперь не знаю что делать, нужно что бы в grub был выбор windows и arch. Хелп!
Все способы:
- Способ 1: Установка Windows на диск с Linux
- Способ 2: Обнаружение раздела Windows
- Способ 3: Ручное добавление загрузчика
- Вопросы и ответы: 0
Способ 1: Установка Windows на диск с Linux
Одной из наиболее распространенных причин отсутствия Windows 10 в загрузочном меню «Grub» является установка Windows не на тот же физический диск, на который устанавливается Linux. Если нужно установить на один компьютер Windows и Linux, устанавливайте их по возможности на один физический жесткий диск, причем первой необходимо установить Windows. Если сперва будет установлена Linux, а затем Windows, то есть большая вероятность, что загрузчик Windows затрет «Grub».
Способ 2: Обнаружение раздела Windows
Если переустановка Windows 10 по какой-то причине невозможна, попробуйте обнаружить ее из среды Linux и добавить в загрузчик последней.
- Определите в Linux название раздела, на который установлена Windows. Получить сведения о дисках и разделах в Linux можно как из «Терминала», так и с помощью штатного приложения «Дисковая утилита». Скопируйте или запомните название устройства. Например, это будет «/dev/sda1».
- Откройте «Терминал» и примонтируйте раздел с Windows 10, для чего выполните команду
sudo mount -t ntfs-3g -o ro /dev/sda1, где /dev/sda1 — полученный на предыдущем этапе путь к тому с Windows. - Чтобы обнаружить Windows 10, выполните тут же в «Терминале» команду
sudo os-prober. - В случае успешного обнаружения Windows обновите конфигурацию «Grub» командой
sudo update-grubлибо жеsudo grub2-mkconfig -o /boot/grub/grub.cfg.
Способ 3: Ручное добавление загрузчика
При использовании первого способа вероятность сходу обнаружить и прописать Windows 10 в линуксовый загрузчик довольно невелика. Более сложным, но и более эффективным способом восстановления записи Windows 10 в загрузочном меню Grub является ручное добавление. Способ универсальный, использовать его можно не только при потере Windows 10, но и других операционных систем Windows.
- Узнайте название раздела с Windows как было показано в первом пункте предыдущего способа.
- Определите UUID раздела, на котором установлена Windows 10, для чего выполните в «Терминале» команду
blkid /dev/sda1, где /dev/sda1 — название раздела с Windows. - Откройте любым текстовым редактором файл
/etc/grub.d/40_customи вставьте в него следующий код, где XXXXXXXXXXXXXXXX — полученный на предыдущем шаге UUID:menuentry "Windows 10" {.
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set XXXXXXXXXXXXXXXX
chainloader +1
}
Сохраните файл. - Обновите конфигурацию Grub командой
sudo update-grub, перезагрузите компьютер и посмотрите, появилась ли Windows в загрузочном меню Grub.
Если восстановить/добавить запись Windows 10 в загрузочное меню «Grub» не удалось, проверьте, не удален ли на диске служебный 100 МБ NTFS-раздел с загрузочными файлами. Если удален, можно будет попробовать его восстановить, но будет гораздо проще переустановить Windows и Linux. В том случае, когда используется «Grub 2» на UEFI, попробуйте включить в BIOS режим «Legacy».
Наша группа в TelegramПолезные советы и помощь
