The Grub auto-installer as invokable via the Mageia-DVD does not recognize my OpenBSD installation. Instead I have to add a boot entry manually to /boot/grub2/grub.conf which will however get overwritten upon the next automatic installation. The only thing the Grub-installer would need to do is check for a partition with signature-id a6 (as listable via fdisk -l) and then offer to chainload it.
CC: (none) => marja11Assignee: bugsquad => zen25000Summary: Grub Installer does not recognize my OpenBSD installation => Grub2 Installer does not recognize my OpenBSD installation
Add your custom menu entry to /boot/grub2/custom.cfg This will be offered on the next boot and will never be overwritten. You can then run uppdate-grub2 to remove the entry that you manually added to /boot/grub2/grub.cfg (NOTE that this is not required to make the new custom entry work.)
Do you have os-prober installed?
Source RPM: (none) => grub2, os-proberKeywords: (none) => NEEDINFOCC: (none) => thierry.vignaud
Yes, os-prober is installed, but update-grub2 does not recognize my OpenBSD partition. It has to be configured manually in /boot/grub2/custom.cfg.
Please give the output of su os-prober then could you try the script here: http://linux.debian.maint.boot.narkive.com/b4BD5uie/teach-os-prober-to-recognize-openbsd Save it as /lib/os-probes/mounted/91bsd and make it executable. Then run os-prober as root and again put the output here. You can then test using update-grub2 and see if it actually works.
Created attachment 7701 [details] corrected 91bsd script There were a few errors in this script; now they should be corrected.
Created attachment 7702 [details] screen output of os-prober before installing 91bsd
Created attachment 7703 [details] screen output of os-prober after installing 91bsd
... and the boot loder entry added by update-grub2 through this works well; i.e. it really boots into OpenBSD.
Nice! Thanks for your work testing and correcting the script. I will add this to the os-prober package for cauldron and generate an update for Mga5. Will you be available to test the updated package for qa when the time comes? Otherwise I don't think there will be anyone with a FreeBSD system available for testing.
Yes; I can promise to do so. I will keep updating my system until os-prober gets updated and then see if it was packaged all right ...
It won't go to Mga5 updates until after it has been tested by qa (probably you in this case). You will see how the process works by following this bug and you will be able to test the new package when it goes into 5/core/updates_testing. Thanks.
######################################### Update Advisory os-prober-1.65-9.3.mga5 has been submitted to 5/core/updates_testing ######################################### Description This update fixes an issue where OpenBSD installations were not present in the Mageia grub2 boot menu. The cause was that os-prober did not have the capability to detect BSD installations. ######################################### References https://bugs.mageia.org/show_bug.cgi?id=18271 http://linux.debian.maint.boot.narkive.com/b4BD5uie/teach-os-prober-to-recognize-openbsd The above script with corrections by the reporter here seems to fix the problem. ######################################### Affected files os-prober-1.65-9.3.mga5.src.rpm os-prober-1.65-9.3.mga5.i586.rpm os-prober-debuginfo-1.65-9.3.mga5.i586.rpm os-prober-1.65-9.3.mga5.x86_64.rpm os-prober-debuginfo-1.65-9.3.mga5.x86_64.rpm ######################################### Testing Install Mageia alongside an installation of OpenBSD. Allow Mageia to install grub2 and check whether OpenBSD is bootable from the Mageia Grub2 boot menu. NOTE: The bug reporter has offered to do some testing. ######################################### Re-assigning to QA
Assignee: zen25000 => qa-bugsKeywords: NEEDINFO => (none)
Elmar, see https://wiki.mageia.org/en/Enabling_the_Testing_media Please don't install everything from the testing media, only the packages listed above.
Severity: enhancement => normal
Component: Release (media or process) => RPM Packages
Source RPM: grub2, os-prober => os-prober
Testing M5 x64 real EFI hardware, but not xBSD Updated to os-prober-1.65-9.3 Ran os-prober directly. After my usual 10m wait, it popped out all the correct installed OSs - several Mageias & other Linux's + Win8. Ran update-grub [2], which also takes 10m on my system. Re-booted, and the Grub2 menu included all installed OSs. (This is the first time that I have noticed that the menu scrolls without this being apparent: later entries are initially hidden). For me OK on the basis of no ill effects. If Elmar can update *just* os-prober from 'core updates testing' and confirm for OpenBSD (32-bit?), so much the better.
Whiteboard: (none) => MGA5-64-OKCC: (none) => lewyssmith
No, that did not work yet. No OpenBSD menu entry was generated by os-prober-1.65-9.3.mga5.i586.rpm. I would believe that you will have to mark /usr/lib/os-probes/mounted/91bsd as executable. # ls -l /usr/lib/os-probes/mounted/91bsd -rw-r--r-- 1 root root 726 Apr 28 17:50 /usr/lib/os-probes/mounted/91bsd After changing this it appeared to work correctly.
Indeed, thanks Elmar - my mistake - sorry. Fixed in os-prober-1.65-9.4.mga5 - also in Cauldron. New advisory: ######################################### Update Advisory os-prober-1.65-9.4.mga5 has been submitted to 5/core/updates_testing ######################################### Description This update fixes an issue where OpenBSD installations were not present in the Mageia grub2 boot menu. The cause was that os-prober did not have the capability to detect BSD installations. ######################################### References https://bugs.mageia.org/show_bug.cgi?id=18271 http://linux.debian.maint.boot.narkive.com/b4BD5uie/teach-os-prober-to-recognize-openbsd The above script with corrections by the reporter here seems to fix the problem. ######################################### Affected files os-prober-1.65-9.4.mga5.src.rpm os-prober-1.65-9.4.mga5.i586.rpm os-prober-debuginfo-1.65-9.4.mga5.i586.rpm os-prober-1.65-9.4.mga5.x86_64.rpm os-prober-debuginfo-1.65-9.4.mga5.x86_64.rpm ######################################### Testing Install Mageia alongside an installation of OpenBSD. Allow Mageia to install grub2 and check whether OpenBSD is bootable from the Mageia Grub2 boot menu. #########################################
CC: (none) => zen25000
(In reply to Elmar Stellnberger from comment #15) > No, that did not work yet. No OpenBSD menu entry was generated by > os-prober-1.65-9.3.mga5.i586.rpm. I would believe that you will have to mark > /usr/lib/os-probes/mounted/91bsd as executable. > # ls -l /usr/lib/os-probes/mounted/91bsd > -rw-r--r-- 1 root root 726 Apr 28 17:50 /usr/lib/os-probes/mounted/91bsd > After changing this it appeared to work correctly. Thaks for that useful test. Please can you confirm that Barry's latest version (Comment 16) os-prober-1.65-9.4 from Core Updates Testing does work for you? TIA I will re-try x64 on a 'no regression' basis.
Whiteboard: MGA5-64-OK => (none)
Re-testing x64 real EFI hardware os-prober-1.65-9.4.mga5 Did update-grub, re-booted, all installed OSs correctly shown in the grub2 menu. On a 'no-reversion' basis, again this is OK for me; but I refrain this time from putting a 64 OK until Elmar has confirmed this latest update for real.
Humm; that of course only works if the OpenBSD partition has already been mounted manually by the user which would rarely be the case in practice. In order to overcome this issue I have worked upon a solution that would recognize OpenBSD merely by looking at all UFS-partitions. Just have a look at the solution I wanna propse ...
Created attachment 7728 [details] /lib/os-probes/60ufs-test This script picks out all ufs partitions whether mounted or not and then processes all mounted/*bsd scripts on them. Basically keeping the 91bsd script in the mounted folder without creating an own folder for it is a bit misleading though you are free to change this. You could call such a folder f.i. 'ufs' in addition to the 'mounted' folder.
Created attachment 7729 [details] /lib/os-probes/mounted/91bsd Basically the most clean solution would be to put the 91bsd script in its own folder called 'ufs' and then link it to the 'mounted' folder as it can and needs to handle both cases: the mounted and the unmounted case.
Created attachment 7730 [details] New dir layout I have not had time to check in detail how all this will works, but if I understand correctly the required file layout would be as the attached image, where /mounted/91bsd is a symlink to /ufs/91bsd. Does this look OK?
Yes, that would certainly work. For reasons of consistency you should then update /lib/os-probes/60ufs-test to point to ufs/* instead of mounted/*bsd (simply search for that string and replace it). Accessing the mounted/*bsd directory instead of ufs/* was just a 'dirty hack' in order to make things work even without any update to the file layout.
Thanks Elmar, os-prober-1.65-9.5.mga5 has been submitted to 5/core/updates_testing. See how this goes ;)
In Cauldron I did a test with the same changes and it looks OK as far as I can tell. Fiddling the debug logger to output to screen I see: [baz@jackodesktop ~]$ sudo os-prober|egrep "bsd|ufs" 50mounted-tests: debug: running subtest /usr/lib/os-probes/mounted/91bsd os-prober: debug: running /usr/lib/os-probes/60ufs-test on /dev/sda1 50mounted-tests: debug: running subtest /usr/lib/os-probes/mounted/91bsd os-prober: debug: running /usr/lib/os-probes/60ufs-test on /dev/sdc1
Elmar - please test os-prober-1.65-9.6.mga5 - somehow the exec bit got lost on 91bsd in the previous build - I'm not having much luck with that :\
Barry, I just noticed that you have once more forgotten the x-permission for ufs/91bsd. The link from mounted/91bsd works though it would be more elegant to ln -s ../ufs/91bsd /usr/lib/os-probes/mounted/91bsd. # ls -l mounted/91bsd lrwxrwxrwx 1 root root 39 Mai 1 17:13 mounted/91bsd -> ../../../../usr/lib/os-probes/ufs/91bsd*
(In reply to Elmar Stellnberger from comment #27) > Barry, I just noticed that you have once more forgotten the x-permission > for ufs/91bsd. Yes, see https://bugs.mageia.org/show_bug.cgi?id=18271#c26 :\ > The link from mounted/91bsd works though it would be more > elegant to ln -s ../ufs/91bsd /usr/lib/os-probes/mounted/91bsd. > > # ls -l mounted/91bsd > lrwxrwxrwx 1 root root 39 Mai 1 17:13 mounted/91bsd -> > ../../../../usr/lib/os-probes/ufs/91bsd* That relative link is created by rpm, bear in mind that it is created during package build when nothing is actually where it will finally end up. In the spec it is: ln -sf %{_libexecdir}/os-probes/ufs/91bsd %{buildroot}%{_libexecdir}/os-probes/mounted/91bsd ...but more importantly does that now work?
Now with os-prober-1.65-9.6.mga5.i586.rpm everything seems to work correctly. I have tested it in three different configurations, two different mount states, one unmounted and the mount state stayed the same while all partitions were recognized correctly. At least as far as I can test that on my side everything works well now.
Resolution: (none) => FIXEDStatus: NEW => RESOLVED
Let's push it to updates then so everybody can have it. Thanks Elmar & Barry.
Resolution: FIXED => (none)Status: RESOLVED => REOPENED
I think Elmar can only test this on 32 bit. So, it has not been tested in a live situation with an OpenBSD system alongside Mageia 64bit. @Elmar Can you envisage any problems with this on 64 bit? Here is an updated advisory with the correct subrel: ######################################### Update Advisory os-prober-1.65-9.6.mga5 has been submitted to 5/core/updates_testing ######################################### Description This update fixes an issue where OpenBSD installations were not present in the Mageia grub2 boot menu. The cause was that os-prober did not have the capability to detect BSD installations. ######################################### References https://bugs.mageia.org/show_bug.cgi?id=18271 http://linux.debian.maint.boot.narkive.com/b4BD5uie/teach-os-prober-to-recognize-openbsd The above script with corrections by the reporter here seems to fix the problem. ######################################### Affected files os-prober-1.65-9.6.mga5.src.rpm os-prober-1.65-9.6.mga5.i586.rpm os-prober-debuginfo-1.65-9.6.mga5.i586.rpm os-prober-1.65-9.6.mga5.x86_64.rpm os-prober-debuginfo-1.65-9.6.mga5.x86_64.rpm ######################################### Testing Install Mageia alongside an installation of OpenBSD. Allow Mageia to install grub2 and check whether OpenBSD is bootable from the Mageia Grub2 boot menu. #########################################
I have now applied these changes to os-prober in Cauldron. Many thanks to you Elmar for your great help with this :)
(In reply to Elmar Stellnberger from comment #29) > Now with os-prober-1.65-9.6.mga5.i586.rpm everything seems to work > correctly. I have tested it in three different configurations, two different > mount states, one unmounted and the mount state stayed the same while all > partitions were recognized correctly. At least as far as I can test that on > my side everything works well now. Many thanks for your heroic work, Elmar. On the basis of your thorough testing of oss-prober-1.65-9.6.mga5.i586.rpm on x32, I am OKing that architecture. I shall re-run the update on x64 (yet again) just to make sure there are no nasties, but doubt whether we shall be able to properly confirm the update on that architecturedue due to no suitable platform.
Whiteboard: (none) => MGA5-32-OK
There is no difference of x86_64/amd64 I can currently think of and that should matter in this regard. Nonetheless we can not be 100.0% sure unless we have tested it. As things are now I would like to propose unleashing the update for x64 as well as long as you can not find any 'nasties'. It could likely take considerable time until I would catch time to install OpenBSD on x64 together with Mageia. If so I will test it and report it here.
Tested M5 x64 real EFI hardware os-prober-1.65-9.6 Repeat of OK (no reversion) results from Comments 14 & 18. Update OK, update-grub, re-boot, all available OSs are in the Grub2 menu. Either this can be x64 OK'd (which I have not done), or we validate it with just x32. (We do this sort of thing in times of stress anyway).
Validating.
Keywords: (none) => validated_updateWhiteboard: MGA5-32-OK => MGA5-32-OK mga5-64-ok
Advisory uploaded.
Whiteboard: MGA5-32-OK mga5-64-ok => advisory MGA5-32-OK mga5-64-ok
An update for this issue has been pushed to the Mageia Updates repository. http://advisories.mageia.org/MGAA-2016-0071.html
Resolution: (none) => FIXEDStatus: REOPENED => RESOLVED