View previous topic :: View next topic |
Author |
Message |
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Sat Jun 09, 2018 2:13 am Post subject: grub2-mkconfig suddenly not seeing win7 partition? |
|
|
I have successfully done numerous kernel and subsequent grub updates at this point with no issue on my dual boot box.
Has always been straightforward. Compile new kernel, run Code: | grub2-mkconfig -o /boot/grub/grub.cfg | , grub would find Linux stuff and windows stuff and write to config. But this last kernel grub2-mkconfig is not finding my windows partitions at all. I am not sure what is going on. Any ideas? |
|
Back to top |
|
|
bobbymcgee n00b
Joined: 12 Apr 2018 Posts: 55
|
Posted: Sat Jun 09, 2018 3:29 am Post subject: |
|
|
>sys-boot/os-prober-1.71 requires device-mapper
guess they forgot why it was there for so long
https://bugs.gentoo.org/655648 |
|
Back to top |
|
|
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Sat Jun 09, 2018 4:36 am Post subject: |
|
|
So what options do I have to resolve my immediate problem until they fix it? |
|
Back to top |
|
|
bobbymcgee n00b
Joined: 12 Apr 2018 Posts: 55
|
Posted: Sat Jun 09, 2018 4:43 am Post subject: |
|
|
create a local repo with 1.71 or emerge lvm2/enable device-mapper support in kernel |
|
Back to top |
|
|
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Thu Jun 21, 2018 4:09 am Post subject: |
|
|
bobbymcgee wrote: | create a local repo with 1.71 or emerge lvm2/enable device-mapper support in kernel |
Thanks. They still haven't fixed grub and I need to deal with this, Kind of urgent now. But, I am a bit lost though. I don't see a wiki for creating local repos and not sure what you mean by emerge lvm with device mapper support.
Code: | # emerge -pv lvm2
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] sys-fs/lvm2-2.02.145-r2::gentoo USE="readline thin udev (-clvm) (-cman) -corosync -device-mapper-only -lvm1 -lvm2create_initrd -openais (-selinux) -static -static-libs -systemd" 0 KiB
|
Should I be changing this to device-mapper-only and if I do so when I run grub config it will find my partitions? |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21593
|
Posted: Fri Jun 22, 2018 2:05 am Post subject: |
|
|
bobbymcgee's post needs additional grammatical markers. I believe his instructions were meant to be parsed as:- create a local repo with 1.71 OR
- emerge lvm2 AND
- enable device-mapper support in kernel
I do not know whether those instructions are correct in this context, but they at least line up with the set of things you can do. Device mapper support is a configurable feature in the kernel, controlled by the Kconfig symbol BLK_DEV_DM. drivers/md/Kconfig: | config BLK_DEV_DM
tristate "Device mapper support" |
|
|
Back to top |
|
|
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Fri Jun 22, 2018 4:34 am Post subject: |
|
|
Hu wrote: | bobbymcgee's post needs additional grammatical markers. I believe his instructions were meant to be parsed as:- create a local repo with 1.71 OR
- emerge lvm2 AND
- enable device-mapper support in kernel
I do not know whether those instructions are correct in this context, but they at least line up with the set of things you can do. Device mapper support is a configurable feature in the kernel, controlled by the Kconfig symbol BLK_DEV_DM. drivers/md/Kconfig: | config BLK_DEV_DM
tristate "Device mapper support" |
|
Thanks, Hu. That makes sense. Unfortunately, it seems I already had it in the kernel config and am using lvm2.
Code: | $ cat /usr/src/linux-`uname -r`/.config | grep -i BLK_DEV_DM
CONFIG_BLK_DEV_DM_BUILTIN=y
CONFIG_BLK_DEV_DM=y |
Trying to sort out how to do a local repo now.
I find it hard to believe that I am the only one affected by this change. Is there anything I can do to motivate the grub2 group to get this fixed? There is nothing more frustrating than when long existing functionality just "disappears". |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21593
|
Posted: Sat Jun 23, 2018 12:45 am Post subject: |
|
|
For the local repository, it is better known as a local Portage overlay. Using that as a guide, one of my first hits on Google was https://wiki.gentoo.org/wiki/Ebuild_repository, which looks promising, particularly the link at the bottom to the handbook page Defining a custom repository.
Sorry, I have no advice with regard to getting this fixed in grub. I abandoned grub because grub2 looked overly complicated for what I wanted. |
|
Back to top |
|
|
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Sat Jun 23, 2018 2:58 am Post subject: |
|
|
Hu wrote: | For the local repository, it is better known as a local Portage overlay. Using that as a guide, one of my first hits on Google was https://wiki.gentoo.org/wiki/Ebuild_repository, which looks promising, particularly the link at the bottom to the handbook page Defining a custom repository.
Sorry, I have no advice with regard to getting this fixed in grub. I abandoned grub because grub2 looked overly complicated for what I wanted. |
Thanks again for the clarification. This will be my weekend project. But out of curiosity, what are you using in lieu of grub(2)? |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Jun 23, 2018 1:39 pm Post subject: |
|
|
@ Budoka
I am having no problem with ~amd64 versions of grub, os-prober, lvm2, and ntfs3g seeing windows in a multiboot environment. I am booting UEFI and running openrc not systemd.
Recommend: Code: | emerge wgetpaste
emerge -pv --with-bdeps=y lvm2 grub os-prober ntfs3g | wgetpaste -t
os-prober | wgetpaste -t | Which produces Code: | These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] sys-boot/grub-2.02-r1:2/2.02-r1::gentoo USE="fonts mount nls sdl themes truetype -debug -device-mapper -doc -efiemu -libzfs -multislot -static {-test}" GRUB_PLATFORMS="efi-64 -coreboot -efi-32 -emu -ieee1275 -loongson -multiboot -pc -qemu -qemu-mips -uboot -xen -xen-32" 0 KiB
[ebuild R ] sys-fs/lvm2-2.02.166-r2::gentoo USE="readline thin udev -clvm -cman -corosync -device-mapper-only -lvm1 -lvm2create_initrd -openais -sanlock (-selinux) -static -static-libs -systemd" 0 KiB
[ebuild R ] sys-fs/ntfs3g-2017.3.23:0/87::gentoo USE="acl external-fuse ntfsprogs xattr -debug -ntfsdecrypt -static-libs -suid" 0 KiB
[ebuild R ] sys-boot/os-prober-1.76-r1::gentoo 0 KiB
Total: 4 packages (4 reinstalls), Size of downloads: 0 KiB
WARNING: Failed to connect to lvmetad. Falling back to device scanning.
/dev/nvme0n1p2@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi | here. Using wgetpaste and posting the urls returned here will provide information needed to better guess your problem. If you are not using UEFI, "GRUB_PLATORMS= " and os-prober output will have obvious differences.
Suggest comparing your output versus mine; I think you should see 4 reinstalls, recommend using testing branch for all four, recommend identify reasons for variations between your and my USE flags.
Notes: none of the 1.71, the 1.74, or the 1.76-r1 ebuilds have a device-mapper, device-mapper-only, or lvm dependency.
running ufed and looking for device-mapper finds that it may be specified for grub (and lilo and parted and crio and docker)
running ufed and looking for device-mapper-only finds that it may be specified for lvm2
https://bugs.gentoo.org/655648 is just a stabilisation bug, I find no os-prober fails gentoo bug reports. _________________ Defund the FCC. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21593
|
Posted: Sat Jun 23, 2018 3:28 pm Post subject: |
|
|
I use syslinux (extlinux for BIOS boot; efilinux for UEFI boot). I've been very happy with them, but please don't take this as advice that you should abandon grub if you think you can make it do what you want. |
|
Back to top |
|
|
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Mon Jun 25, 2018 1:19 am Post subject: |
|
|
DONAHUE wrote: | @ Budoka
I am having no problem with ~amd64 versions of grub, os-prober, lvm2, and ntfs3g seeing windows in a multiboot environment. I am booting UEFI and running openrc not systemd.
Recommend: Code: | emerge wgetpaste
emerge -pv --with-bdeps=y lvm2 grub os-prober ntfs3g | wgetpaste -t
os-prober | wgetpaste -t | Which produces Code: | These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] sys-boot/grub-2.02-r1:2/2.02-r1::gentoo USE="fonts mount nls sdl themes truetype -debug -device-mapper -doc -efiemu -libzfs -multislot -static {-test}" GRUB_PLATFORMS="efi-64 -coreboot -efi-32 -emu -ieee1275 -loongson -multiboot -pc -qemu -qemu-mips -uboot -xen -xen-32" 0 KiB
[ebuild R ] sys-fs/lvm2-2.02.166-r2::gentoo USE="readline thin udev -clvm -cman -corosync -device-mapper-only -lvm1 -lvm2create_initrd -openais -sanlock (-selinux) -static -static-libs -systemd" 0 KiB
[ebuild R ] sys-fs/ntfs3g-2017.3.23:0/87::gentoo USE="acl external-fuse ntfsprogs xattr -debug -ntfsdecrypt -static-libs -suid" 0 KiB
[ebuild R ] sys-boot/os-prober-1.76-r1::gentoo 0 KiB
Total: 4 packages (4 reinstalls), Size of downloads: 0 KiB
WARNING: Failed to connect to lvmetad. Falling back to device scanning.
/dev/nvme0n1p2@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi | here. Using wgetpaste and posting the urls returned here will provide information needed to better guess your problem. If you are not using UEFI, "GRUB_PLATORMS= " and os-prober output will have obvious differences.
Suggest comparing your output versus mine; I think you should see 4 reinstalls, recommend using testing branch for all four, recommend identify reasons for variations between your and my USE flags.
Notes: none of the 1.71, the 1.74, or the 1.76-r1 ebuilds have a device-mapper, device-mapper-only, or lvm dependency.
running ufed and looking for device-mapper finds that it may be specified for grub (and lilo and parted and crio and docker)
running ufed and looking for device-mapper-only finds that it may be specified for lvm2
https://bugs.gentoo.org/655648 is just a stabilisation bug, I find no os-prober fails gentoo bug reports. |
Looks pretty much the same with the exception that I have "PC". I am guessing because my box isn't UEFI. I also don't have the failed to connect error.
I really haven't done anything differently than I have done before multiple times when compiling a new kernel and running Code: | grub2-mkconfig -o /boot/grub/grub.cfg | so am really at a loss/confused by the glitch this time around.
Code: | $ emerge -pv --with-bdeps=y lvm2 grub os-prober ntfs3g | wgetpaste -t
These are the packages that would be merged, in order:
Calculating dependencies .... done!
[ebuild R ] sys-boot/grub-2.02-r1:2/2.02-r1::gentoo USE="fonts mount multislot nls sdl themes truetype -debug -device-mapper -doc -efiemu -libzfs -static {-test}" GRUB_PLATFORMS="pc -coreboot -efi-32 -efi-64 -emu -ieee1275 -loongson -multiboot -qemu -qemu-mips -uboot -xen -xen-32" 0 KiB
[ebuild R ] sys-fs/lvm2-2.02.145-r2::gentoo USE="readline thin udev (-clvm) (-cman) -corosync -device-mapper-only -lvm1 -lvm2create_initrd -openais (-selinux) -static -static-libs -systemd" 0 KiB
[ebuild R ] sys-fs/ntfs3g-2016.2.22-r2:0/87::gentoo USE="acl external-fuse ntfsprogs xattr -debug -ntfsdecrypt -static-libs -suid" 0 KiB
[ebuild R ] sys-boot/os-prober-1.76-r1::gentoo 0 KiB
Total: 4 packages (4 reinstalls), Size of downloads: 0 KiB
|
[url]Your paste can be seen here: https://paste.pound-python.org/show/JiVsVYXUU3tl9IXdT1LW/ [/url] |
|
Back to top |
|
|
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Mon Jun 25, 2018 2:11 am Post subject: |
|
|
Hu wrote: | I use syslinux (extlinux for BIOS boot; efilinux for UEFI boot). I've been very happy with them, but please don't take this as advice that you should abandon grub if you think you can make it do what you want. |
Thanks, Hu. To date with the exception of a small hiccup way back when grub has served me well. So I will try to stick with it. But will look at Syslinux as well if this issue turns into more of a headache than it is worth. Of course ideally, I would like to not be dual booting but unfortunately, need the windows partition because of office nonsense. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Mon Jun 25, 2018 4:28 am Post subject: |
|
|
suggest add "sys-boot/grub device-mapper" to /etc/portage/package.use and emerge grub, reinstall grub, and remake grub.cfg
Delayed question: You wrote: | I also don't have the failed to connect error. | Did you run the line Code: | os-prober | wgetpaste -t | If so, did os-prober find your windows and output something resembling Quote: | /dev/sda2/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi | but for legacy Bios? |
|
Back to top |
|
|
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Tue Jun 26, 2018 3:12 am Post subject: |
|
|
DONAHUE wrote: | suggest add "sys-boot/grub device-mapper" to /etc/portage/package.use and emerge grub, reinstall grub, and remake grub.cfg
Delayed question: You wrote: | I also don't have the failed to connect error. | Did you run the line Code: | os-prober | wgetpaste -t | If so, did os-prober find your windows and output something resembling Quote: | /dev/sda2/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi | but for legacy Bios? |
Added sys-boot/grub device-mapper to /etc/portage/package.use and re-emerged, reinstalled grub, reinstall grub, and rewrote grub.cfg but didn't resolve the issue.
os-prober returns null.
But the NTFS partitions are there on sda1 and sda2.
Code: | Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 206847 204800 100M 7 HPFS/NTFS/exFAT
/dev/sda2 206848 212019199 211812352 101G 7 HPFS/NTFS/exFAT
/dev/sda3 212019200 1908707327 1696688128 809G f W95 Ext'd (LBA)
/dev/sda4 1908707328 1953521663 44814336 21.4G 2 XENIX root
/dev/sda5 212021248 230985727 18964480 9G 7 HPFS/NTFS/exFAT
/dev/sda6 230987776 231397375 409600 200M 83 Linux
/dev/sda7 231399424 1908707327 1677307904 799.8G 83 Linux
|
|
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sun Jul 01, 2018 8:36 pm Post subject: |
|
|
There was a time when windows partitions needed to be mounted in order for grub-mkconfig/os-prober to find windows, IIRC. You might try mounting them and running os-prober and/or grub-mkconfig to check for a regression.
Have you considered using sys-boot/grub-static (legacy grub)? _________________ Defund the FCC. |
|
Back to top |
|
|
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Wed Jul 04, 2018 6:29 am Post subject: |
|
|
DONAHUE wrote: | There was a time when windows partitions needed to be mounted in order for grub-mkconfig/os-prober to find windows, IIRC. You might try mounting them and running os-prober and/or grub-mkconfig to check for a regression.
Have you considered using sys-boot/grub-static (legacy grub)? |
I'll use anything that will work...and continue to do so. I am not sure what has happened this time around. It just suddenly "stopped" seeing the win partitions. Very close to dumping Gentoo and rescuing with Win7 disk which I really rather not have to do but I MUST get into this partition at this point.
Anyway, can you clarify what you mean by check for regression and how do I do that? |
|
Back to top |
|
|
paultschi n00b
Joined: 13 Dec 2012 Posts: 6
|
Posted: Wed Jul 04, 2018 9:41 am Post subject: |
|
|
I have the exact same problem. BIOS dual boot with Gentoo and Win 10. Everything worked until I installed the last update. Grub2 does not see the windows partition anymore. os-prober returns nothing. Would also be interested in a solution. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Wed Jul 04, 2018 12:01 pm Post subject: |
|
|
@ both:
try mounting the windows partitions and then running os-prober followed by grub-mkconfig -o /boot/grub/grub.cfg
any change in results?
@ Budoka:
an earlier suggestion by bobbymcgee was to build a local repository for sys-boot/os-prober-1.71 and see if that still worked, any luck with that?
@ paultschi
are you using lvm? _________________ Defund the FCC. |
|
Back to top |
|
|
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Thu Jul 05, 2018 2:58 am Post subject: |
|
|
DONAHUE wrote: | @ both:
try mounting the windows partitions and then running os-prober followed by grub-mkconfig -o /boot/grub/grub.cfg
any change in results?
@ Budoka:
an earlier suggestion by bobbymcgee was to build a local repository for sys-boot/os-prober-1.71 and see if that still worked, any luck with that?
@ paultschi
are you using lvm? |
Thanks Donahue. I will try both tonight and post update. |
|
Back to top |
|
|
paultschi n00b
Joined: 13 Dec 2012 Posts: 6
|
Posted: Thu Jul 05, 2018 10:54 am Post subject: |
|
|
DONAHUE wrote: | @ both:
try mounting the windows partitions and then running os-prober followed by grub-mkconfig -o /boot/grub/grub.cfg
any change in results?
@ Budoka:
an earlier suggestion by bobbymcgee was to build a local repository for sys-boot/os-prober-1.71 and see if that still worked, any luck with that?
@ paultschi
are you using lvm? |
Thanks Donahue for looking into this. os-prober seems to be generally non-functional as I can not even get it to show me a help text. I installed lvm2, because grub started to complain about it, while still finding the windows partition. Now grub does not complain anymore, but neither does it find the windows partition. I don't know whether it is relevant, but windows resides on a separate disk. |
|
Back to top |
|
|
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Sat Jul 07, 2018 4:12 am Post subject: |
|
|
OK. When mounting those partitions os-prober and grub config see the partitions. I am still not sure what changed though. I have never had to manually mount those partitions in the past...and it has been a good couple of years now that I have been using this method.
I will still try to create a local rep for the previous version of grub to test if this is something that changed in Grub or someplace else.
Would also add that I have the same issue that paultschi has with os-prober returning null when asking for help text etc.
more to come... |
|
Back to top |
|
|
paultschi n00b
Joined: 13 Dec 2012 Posts: 6
|
Posted: Sat Jul 07, 2018 6:46 am Post subject: |
|
|
@Budoka as a quick fix paste this into /etc/grub.d/40_custom with obvious modifications
Code: | menuentry "Windows 10" {
insmod part_msdos
insmod ntfs
set root='(hd1,msdos1)'
chainloader +1
} |
In my case, windows is installed on /dev/sdb (the second hard disk). The first would be hd0. This will allow you to boot windows until the automatic detection becomes functional again.
After editing /etc/grub.d/40_custom run
Code: | grub-mkconfig -o /boot/grub/grub.cfg |
after mounting your /boot |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Jul 07, 2018 7:14 pm Post subject: |
|
|
I r esurrected a decade old windows 7 machine, added an external msdos labeled hard drive, installed gentoo on the external, emerged grub and ntfs3g. When I attempted to emerge os-prober, the emerge refused to proceed until I added a mount use flag to /etc/portage/package.use for grub. After the mount use flag was added, running emerge os-prober caused grub to reinstall and os-prober to install. os-prober then found both win 7 on sda2 and gentoo on sdb1 with the windows partitions not mounted. Then grub-install /dev/sdb ran with no problems. With the windows partition still not mounted, grub-mkconfig -o /boot/grub/grub.cfg ran with no problems creating 3 gentoo boot menu choices and 1 windows 7 menu choice.
Theory:
between the last time grub-mkconfig worked for you to handle win7 and when it stopped:
the mount use flag was added or its mode of operation changed:
emerge -avuND world changed the library files:
until grub-install /dev/??? runs the libraries and action files are not synchonized:
I think Code: | emerge -C grub ntfs3g os-prober #for cleanup
echo "sys-boot/grub mount" >> /etc/portage/package.use
emerge grub ntfs3g os-prober
grub-install /dev/sdb #replace sdb if gentoo drive is not sdb
os-prober
mount /boot # if separate boot partition in use
grub-mkconfig -o /boot/grub/grub.cfg | might eliminate the need to mount the windows partition.
; _________________ Defund the FCC. |
|
Back to top |
|
|
|