You are not logged in.
Pages: 1
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:
sudo os-prober
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 :
sudo grub-mkconfig
[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)
Offline
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)
Offline
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
--target x86_64-efi
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.
Offline
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.
Offline
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)
Offline
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?
Offline
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.
Offline
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)
Offline
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)
Offline
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)
Offline
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.
Offline
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)
Offline
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)
Offline
Do not just randomly mount the ESP to /boot...
[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)
Offline
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.
sudo grub-mkconfig -o /boot/grub/grub.cfg
worked!
Offline
Pages: 1