Bug 906592

Summary: Bad kernel check in 40grub and 40grub2 in os-prober-1.56-1.fc18.x86_64
Product: [Fedora] Fedora Reporter: H.J. Lu <hongjiu.lu>
Component: os-proberAssignee: Hedayat Vatankhah <hedayatv>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: hedayatv
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-01 10:14:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description H.J. Lu 2013-01-31 23:44:35 UTC
40grub and 40grub2 have

entry_result () {
	if [ "$ignore_item" = 0 ] && \
	   [ -n "$kernel" ] && \
	   [ -e "$mpoint/$kernel" ]; then
		result "$rootpart:$bootpart:$title:$kernel:$initrd:$parameters"
		found_item=1
	fi

[ -e "$mpoint/$kernel" ] will always be false since the kernel is installed
under $mpoint/boot, not $mpoint.

Comment 1 Hedayat Vatankhah 2013-02-01 10:14:25 UTC
If it was really wrong, 40grub & 40grub2 would never work, while they do. If you read the code more carefully, you'll see that /boot/ is actually in $kernel varialbe; so $kernel includes the path from / to kernel, not only the kernel name. 
If the code doesn't work in some situations, the bug is somewhere else.