Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 206703 - sys-kernel/genkernel-3.4.9 - ls: : No such file or directory" message during boot
Summary: sys-kernel/genkernel-3.4.9 - ls: : No such file or directory" message during ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
: 207157 208950 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-19 20:49 UTC by Laurento Frittella (mrfree)
Modified: 2010-09-28 21:17 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurento Frittella (mrfree) 2008-01-19 20:49:03 UTC
I noticed a strange message after the modules in the initrd load, a message like "ls: command not found" or something like that.

Reproducible: Always
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2008-01-19 22:54:46 UTC
What kernel commandline are you using?
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2008-01-19 22:55:45 UTC
Also, does it actually hurt anything, or is it just cosmetic?
Comment 3 Laurento Frittella (mrfree) 2008-01-20 00:32:20 UTC
The system seems to work well, it boots correctly and I'm using it since about 6 hours without any problems (but I thing the problem should eventually affects the boot process only, doesn't it?).

This is my cmdline:
dolvm processor.max_cstate=2 libata.atapi_enabled=1 root=/dev/ram0 init=/linuxrc real_root=/dev/vg/root CONSOLE=/dev/tty1 quiet resume=file:/dev/dm-0:0x44ed0
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2008-01-23 16:30:54 UTC
*** Bug 207157 has been marked as a duplicate of this bug. ***
Comment 5 Richard Scott 2008-01-24 15:09:37 UTC
I've got to test, but I think this "ls" error could be coming from this line in initrd.scripts that comes with genkernel

local device=$(ls -l "${REAL_RESUME}" | sed 's/\ */ /g' | cut -d \  -f 6-7 | sed 's/,\ */:/')

I've found that REAL_RESUME is set as follows:

REAL_RESUME="/dev/mapper/swap"

What happens if that /dev/mapper/swap there? 
Surely the ls will output an error as it does when you try at the command line:

rjs generic # REAL_RESUME="/dev/mapper/swap"
rjs generic # ls -l "${REAL_RESUME}" | sed 's/\ */ /g' | cut -d \  -f 6-7 | sed 's/,\ */:/'
ls: cannot access /dev/mapper/swap: No such file or directory
rjs #

I'll see if I can test with my next livecd build.
Comment 6 Richard Scott 2008-01-24 15:10:25 UTC
Sorry, that should have been:

What happens if that /dev/mapper/swap device is not there? 

oops ;-)
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2008-01-25 20:36:34 UTC
(In reply to comment #6)
> What happens if that /dev/mapper/swap device is not there? 

Not using anything like that; same message.
Comment 8 Andrew Gaffney (RETIRED) gentoo-dev 2008-02-02 20:35:47 UTC
This has been fixed in SVN. Thanks.
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2008-02-05 08:28:11 UTC
*** Bug 208950 has been marked as a duplicate of this bug. ***
Comment 10 Billy DeVincentis 2008-02-06 13:52:43 UTC
To  fix  until next  release  of  genkernel

open terminal and do
svn co svn://anonsvn.gentoo.org/genkernel/trunk

this will give you svn version in your home folder. Open file manager and go to /usr/share/genkernel and delete generic folder and replace with generic folder from svn version. Don't forget to delete .svn folder inside generic folder from svn. Redo your kernel with your now updated genkernel and error message gone.
Comment 11 Chris Gianelloni (RETIRED) gentoo-dev 2008-02-14 04:32:37 UTC
I just released genkernel 3.4.10_pre1, which has this fix included.  Feel free to REOPEN this bug or make a comment if it is not resolved.
Comment 12 Hendrik Lemelson 2008-04-08 16:15:19 UTC
(In reply to comment #11)
> I just released genkernel 3.4.10_pre1, which has this fix included.  Feel free
> to REOPEN this bug or make a comment if it is not resolved.
> 

Method swsusp_resume() in /usr/share/genkernel/generic/initrd.scripts still uses unchecked variable $REAL_RESUME.

I suggest to add a check to the method. Maybe by doing the following:

swsusp_resume() {
        # determine swap resume partition
        if [ -z "$REAL_RESUME" ]
        then
                bad_msg "Device to resume from is not set!"
                return 1
        fi
        local device=$(ls -l "${REAL_RESUME}" | sed 's/\ */ /g' | cut -d \  -f 6-7 | sed 's/,\ */:/')
        [ -f /sys/power/resume ] && echo "${device}" > /sys/power/resume
        return 0
}