Bug 1223237 - os-prober does not detect gentoo's initrd
Summary: os-prober does not detect gentoo's initrd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: os-prober
Version: 21
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Hedayat Vatankhah
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-20 07:53 UTC by francesco florian
Modified: 2015-11-14 01:51 UTC (History)
2 users (show)

Fixed In Version: os-prober-1.68-1.fc22 os-prober-1.68-1.fc23 os-prober-1.68-1.fc21
Clone Of:
Environment:
Last Closed: 2015-11-01 21:49:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
the modified script (2.08 KB, patch)
2015-05-20 07:56 UTC, francesco florian
no flags Details | Diff

Description francesco florian 2015-05-20 07:53:22 UTC
Description of problem:
I use fedora grub to generate the grub configuration; when processing gentoo grub2-mkconfig only adds the kernel command (linuxefi /vmlinuz-<version>-gentoo), without the initramfs (initrdefi /initramfs-genkernel-<genkernel_arch>-<kernel_version>-gentoo).

the kernel is compiled with make and copied to /boot with make install, while the initramfs is generated by genkernel

How reproducible:
always

Additional info:
I investigated and found out that the script finding the kernel is /usr/libexec/linux-boot-probes/mounted/90fallback, and it also should handle the initramfs,.
On line 36, searching the initramfs file, it assumes gentoo's kernels are in the form "kernel...", but my kernel (and the default 'make install' result) is in the form "vmlinuz...";
the correct initramfs is not even detected by any of the other cases, because they all assume that the initramfs either begins with initrd or ends with .img, and none is true in my case.
To solve the problem i added a line
initrdname5=$(echo "$kernfile" | sed "s/vmlinu[zx]/initramfs\*/")
and then in (the old) line 38 i added the new initrdname5 variable:
for initrd in $(eval ls "$initrdname" "$initrdname1" "$initrdname2" "$initrdname3" "$initrdname4" "$initrdname5" 2>/dev/null); do

this makes a working grub.cfg which includes the gentoo's initrdefi line

Comment 1 francesco florian 2015-05-20 07:56:04 UTC
Created attachment 1027565 [details]
the modified script

Comment 2 Fedora Update System 2015-10-20 21:17:44 UTC
os-prober-1.68-1.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-1441631cfe

Comment 3 Fedora Update System 2015-10-20 21:17:49 UTC
os-prober-1.68-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-2dae926f73

Comment 4 Fedora Update System 2015-10-24 12:11:03 UTC
os-prober-1.68-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update os-prober'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-2dae926f73

Comment 5 Fedora Update System 2015-10-26 10:28:23 UTC
os-prober-1.68-1.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update os-prober'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-1441631cfe

Comment 6 Fedora Update System 2015-10-26 18:30:47 UTC
os-prober-1.68-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update os-prober'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-6bfd7075b4

Comment 7 Fedora Update System 2015-11-01 21:49:52 UTC
os-prober-1.68-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2015-11-04 20:54:42 UTC
os-prober-1.68-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2015-11-14 01:51:42 UTC
os-prober-1.68-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.