Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 299665

Summary: elilo script does not properly initialize $loop
Product: Gentoo Linux Reporter: Tom Noonan <tom>
Component: [OLD] Core systemAssignee: IA-64 team <ia64>
Status: RESOLVED FIXED    
Severity: major CC: daniel, dschridde+gentoobugs
Priority: High    
Version: unspecified   
Hardware: IA64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: elilo-3.12-loop.patch

Description Tom Noonan 2010-01-04 19:52:17 UTC
The elilo script does not properly initialize the loop variable.  If this variable, for whatever reason, contains garbage then the mount will fail.

Example:
For some reason on my system loop initialized to contain "/image.squashfs" which caused the following error: FAT: Unrecognized mount option "umask=077/image.squashfs" or missing value.

Reproducible: Always




This bug is easily fixed by adding loop= on line 327 immediately before the 'if [ -f "$boot" ]' test.
Comment 1 Tom Noonan 2010-01-04 20:01:36 UTC
The workaround specified was for elilo-3.10.  I upgraded to ~ia64 as a test, I experienced this problem with the ia64 build (elilo-3.6_p20060314) as well.
Comment 2 Raúl Porcel (RETIRED) gentoo-dev 2010-01-14 19:41:10 UTC
Hrm...i don't get it.

Why its not properly initialized?
Comment 3 Tom Noonan 2010-01-14 20:40:18 UTC
(In reply to comment #2)
> Hrm...i don't get it.
> 
> Why its not properly initialized?
> 

I honestly have no idea where that "/image.squashfs" came from.  However, it looks to me that $loop is never initialized anywhere if it is supposed to be blank. It is just assumed that it will be blank if it is unset.  Based on my knowledge of bash scripting that should be correct, but it doesn't seem like good programming practice.

Curiously, If I run the unmodified script now on my working system it runs as expected.  I experienced this problem when chrooted in from the livecd.
Comment 4 evillase 2012-04-18 21:35:02 UTC
it is more than likely because of the options used to boot the livecd.

I encountered the env var $loop set after using gentoo-ilo.

if you just boot the live cd with no special options the env var does not get set and elilo will work just fine.

elilo should still have this fixed though...
Comment 5 Dennis Schridde 2013-03-29 18:36:02 UTC
I wrote a patch for this.

See also: http://sourceforge.net/tracker/?func=detail&atid=598709&aid=3606213&group_id=91879
Comment 6 Dennis Schridde 2013-03-29 18:36:21 UTC
See also: http://forums.gentoo.org/viewtopic-t-684290.html
Comment 7 Dennis Schridde 2014-03-12 17:27:25 UTC
Created attachment 372516 [details, diff]
elilo-3.12-loop.patch

Please set Keywords+=PATCH
Comment 8 SpanKY gentoo-dev 2015-12-28 19:14:28 UTC
i've added your fix to the new 3.16 ebuild:
http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6344f771c7953a9cda0765ea27e701c117f2cd1

probably should get e-mailed to the debian guys since it's a bug in their script :)