Fatal: Could not load /lib/modules/2.6.35-25-generic/modules.dep No such file or directory at boot-up.

Asked by Larry Whitehead on 2011-02-05

After the initial motherboard messages... I'm getting 2 lines of text, that wrap. "Fatal: Could not load /lib/modules/2.6.35-25-generic/modules.dep No such file or directory"

This is a new install. After apparently timing out, Ubuntu starts and everything thing appears to work fine.

I'm new to linux after working for years on the M platform and used FF, Thunderbird, and Open Office so they are already familiar to me. I'd played with other more utilitarian distributions some time ago but didn't have the time to explore and learn like I do now.

I'd appreciate any help.
Regards,
Larry

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu linux-meta Edit question
Assignee:
No assignee Edit question
Last query:
2011-02-16
Last reply:
2011-02-16

Open up a Terminal (Applications > Accessories > Terminal) window and run this command, by pasting it in (or typing it in very carefully) and then pressing enter:

sudo depmod -a

You may be prompted for your password. While you enter it, you won't see any placeholder characters (like *). That's OK, just type it in and press enter.

If that command fails with error messages like

WARNING: couldn't open /lib/modules/2.6.35-25-generic: No such file or directory
FATAL: could not open /lib/modules/2.6.35-25-generic/modules.dep.temp for writing: No such file or directory

then run the additional command:

sudo apt-get install --reinstall linux-generic

Copy all the text from the Terminal (Edit > Select All; Edit > Copy) and paste it into a text document (you can use Applications > Accessories > Text Editor). Save the document, and reboot your computer to see if the above steps fixed your problem. If they did not, please post all the text from the Terminal here.

Larry Whitehead (llw8008) said : #2

Thank you for your very quick response. Sorry, but I was called away and am just now getting back to this issue.
The sudo depmod -a command string appeared to run without creating any Warning nor Fatal messages. It caused the system to pump the hard drive for several seconds giving it a good workout...

Unfortunately when I rebooted, the same Fatal: Could not load /lib/modules/2.6.35-25-generic/modules.dep No such file or directory ... message appeared, twice. It waited several seconds and then appeared to continue normally.

Because I received no error message after executing the sudo depmod -a command.....I didn't issue the sudo apt-get install --reinstall linux-generic command.

During the initial install I was prompted with an option to go ahead after the install and continue with a download and install updates....which I did. I've made some optional screen changes and also installed a few programs that I use (FileZilla, Opera, Audacity, looking for a .wav .mp3 .wma converter). Are any of these at risk of being lost if I issue a reinstall command? If yes, I can deal with it.

My initial install appeared to be "generic"...is there something about my hardware (MB, Video, HD) that caused it to be "generic"?

Thanks, again for you previous response,
Regards,
Larry

The command with "--reinstall" only reinstalls your kernel, not the rest of your system. (Properly speaking, "Linux" is just the kernel, not the whole operating system.) Therefore, it should not affect the updates and customizations to other parts of your system.

There's a newer kernel version now, so you should update your system, and see if that fixes the problem. If not, then go ahead and run this somewhat different command instead, save the output, and then (assuming there are no error messages), go ahead and reboot. This is a single command, which I have split on multiple lines. You can copy and paste it in as-is (i.e. you don't need to combine the lines), and press enter to run it.

sudo apt-get --reinstall install linux-generic \
  linux-image-generic linux-image-$(uname -r)

That might well not work; if it doesn't, please post again (with the output, and a description of any changes that you notice).

> My initial install appeared to be "generic"...is there something about
> my hardware (MB, Video, HD) that caused it to be "generic"?

No. In Ubuntu, the "-generic" kernels are the ones intended for desktop versions of the operating system (i.e. everything but Ubuntu Server). To be more technical about it, the "-generic" kernels are built using essentially the default build configuration. The "-server" kernels, on the other hand, use a more modified configuration. If you're interested, see http://www.serverwatch.com/tutorials/article.php/3715071/Ubuntu-Server--Kernel-Configuration-Considerations.htm for a description of the differences.

Larry Whitehead (llw8008) said : #4

I found no updates when I went to the Update Manager. That's probably for Ubuntu, not Linux...?
Anyway, I executed your command from a terminal screen and it started a lot of activity...that went by my screen faster than I could read. I did recognize that it was doing something in the 2.6.35-25-generic folder and creating something similar....2.6.35-25-45.. I think.
Anyway, after the 20-30 seconds of looking at the boot-up error message the system zips thru anything I try to do.
AND, I wasn't loading Opera (wife uses it on W laptop) I loaded Chromium and use it along with Firefox.

> I found no updates when I went to the Update Manager.
> That's probably for Ubuntu, not Linux...?

The update I was referring to was to the Linux kernel, but it only applies if you have the ubuntu-proposed repository enabled, as I do. (You should not enable that, as it provides updates that have not yet been sufficiently tested for general use.) I should have checked to see if the update was yet available through the default-enabled repositories, before suggesting that you could update to get it. Sorry about that.

> Anyway, I executed your command from a terminal screen and
> it started a lot of activity...that went by my screen faster than I
> could read. I did recognize that it was doing something in the
> 2.6.35-25-generic folder and creating something similar....
> 2.6.35-25-45.. I think.

You can still copy that text, by selecting all the text in the Terminal (Edit > Select) and copying it (Edit > Copy). Also, in case you're interested: you can always scroll up in the Terminal (use the vertical slider bar on the right side of the window, or your mouse's wheel if it has one) to see text that has run off the top of the window. However, since you've rebooted, the text is gone. It's possible that it would provide some useful information, though likely not. But if there was a "-45" after the "2.6.35-25" that is strange, and merits investigation. Go ahead and run the command again. It is unlikely to effect any change--i.e. there's no way it's going to fix the problem, the second time around.

It is possible that the command produces so much text that the Terminal doesn't remember it all. When you scroll up to the top of the Terminal, if that appears to be the case, then there are other options for capturing the text. Since that's unlikely, I won't go into detail about that now. But if it does happen, please let me know.

Then reboot, and right after logging in, run this command in the Terminal:

dmesg > ~/Desktop/dmesg.txt

Then open the file dmesg.txt (it's on your desktop) with a text editor (just double-click on it...if that doesn't work, go to Applications > Accessories > Text Editor and open it with File > Open). Copy all the text from this file (Ctrl+A, then Ctrl+C), then paste it at http://pastebin.ubuntu.com/, click the Paste! button, and post the URL here. This is a log of all the messages that your kernel generated to log what it was doing, since booting up. It will hopefully provide insight into the cause of your problem.

Larry Whitehead (llw8008) said : #6

Da...I should have known that!! Sorry.

Here's the text from the terminal session.....

sebring@sebring-M61PMV:~$ sudo apt-get --reinstall install linux-generic \
> linux-image-generic linux-image-$(uname -r)
[sudo] password for sebring:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
  linux-headers-2.6.35-22 linux-headers-2.6.35-22-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 3 reinstalled, 0 to remove and 0 not
upgraded.
Need to get 0B/33.9MB of archives.
After this operation, 0B of additional disk space will be used.
(Reading database ... 155042 files and directories currently installed.)
Preparing to replace linux-image-2.6.35-25-generic 2.6.35-25.44 (using
.../linux-image-2.6.35-25-generic_2.6.35-25.44_i386.deb) ...
Done.
Unpacking replacement linux-image-2.6.35-25-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.35-25-generic
/boot/vmlinuz-2.6.35-25-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 2.6.35-25-generic
/boot/vmlinuz-2.6.35-25-generic
Preparing to replace linux-generic 2.6.35.25.32 (using
.../linux-generic_2.6.35.25.32_i386.deb) ...
Unpacking replacement linux-generic ...
Preparing to replace linux-image-generic 2.6.35.25.32 (using
.../linux-image-generic_2.6.35.25.32_i386.deb) ...
Unpacking replacement linux-image-generic ...
Setting up linux-image-2.6.35-25-generic (2.6.35-25.44) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.35-25-generic
Not updating initrd symbolic links since we are being updated/reinstalled
(2.6.35-25.44 was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled
(2.6.35-25.44 was configured last, according to dpkg)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools
2.6.35-25-generic /boot/vmlinuz-2.6.35-25-generic
run-parts: executing /etc/kernel/postinst.d/nvidia-common 2.6.35-25-generic
/boot/vmlinuz-2.6.35-25-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 2.6.35-25-generic
/boot/vmlinuz-2.6.35-25-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier
2.6.35-25-generic /boot/vmlinuz-2.6.35-25-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.35-25-generic
/boot/vmlinuz-2.6.35-25-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-25-generic
Found initrd image: /boot/initrd.img-2.6.35-25-generic
Found linux image: /boot/vmlinuz-2.6.35-22-generic
Found initrd image: /boot/initrd.img-2.6.35-22-generic
Found memtest86+ image: /boot/memtest86+.bin
done
Setting up linux-image-generic (2.6.35.25.32) ...
Setting up linux-generic (2.6.35.25.32) ...
sebring@sebring-M61PMV:~$

I'll continue with your next command after a reboot and get back to you.

On Sun, Feb 6, 2011 at 3:03 PM, Eliah Kagan <
<email address hidden>> wrote:

> Your question #144221 on linux-meta in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/linux-meta/+question/144221
>
> Status: Open => Needs information
>
> Eliah Kagan requested for more information:
> > I found no updates when I went to the Update Manager.
> > That's probably for Ubuntu, not Linux...?
>
> The update I was referring to was to the Linux kernel, but it only
> applies if you have the ubuntu-proposed repository enabled, as I do.
> (You should not enable that, as it provides updates that have not yet
> been sufficiently tested for general use.) I should have checked to see
> if the update was yet available through the default-enabled
> repositories, before suggesting that you could update to get it. Sorry
> about that.
>
> > Anyway, I executed your command from a terminal screen and
> > it started a lot of activity...that went by my screen faster than I
> > could read. I did recognize that it was doing something in the
> > 2.6.35-25-generic folder and creating something similar....
> > 2.6.35-25-45.. I think.
>
> You can still copy that text, by selecting all the text in the Terminal
> (Edit > Select) and copying it (Edit > Copy). Also, in case you're
> interested: you can always scroll up in the Terminal (use the vertical
> slider bar on the right side of the window, or your mouse's wheel if it
> has one) to see text that has run off the top of the window. However,
> since you've rebooted, the text is gone. It's possible that it would
> provide some useful information, though likely not. But if there was a
> "-45" after the "2.6.35-25" that is strange, and merits investigation.
> Go ahead and run the command again. It is unlikely to effect any change
> --i.e. there's no way it's going to fix the problem, the second time
> around.
>
> It is possible that the command produces so much text that the Terminal
> doesn't remember it all. When you scroll up to the top of the Terminal,
> if that appears to be the case, then there are other options for
> capturing the text. Since that's unlikely, I won't go into detail about
> that now. But if it does happen, please let me know.
>
> Then reboot, and right after logging in, run this command in the
> Terminal:
>
> dmesg > ~/Desktop/dmesg.txt
>
> Then open the file dmesg.txt (it's on your desktop) with a text editor
> (just double-click on it...if that doesn't work, go to Applications >
> Accessories > Text Editor and open it with File > Open). Copy all the
> text from this file (Ctrl+A, then Ctrl+C), then paste it at
> http://pastebin.ubuntu.com/, click the Paste! button, and post the URL
> here. This is a log of all the messages that your kernel generated to
> log what it was doing, since booting up. It will hopefully provide
> insight into the cause of your problem.
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+source/linux-meta/+question/144221
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Larry Whitehead (llw8008) said : #7

My dump is at Larry Whitehead Q#144221

Can you provide a link, please?

Manfred Hampl (m-hampl) said : #10

Seems to be another occurence of bug 642421

According to the messages there it is a kernel issue that is solved in natty, and in an experimental kernel at http://people.canonical.com/~apw/lp642421-maverick/

Larry Whitehead (llw8008) said : #11

My "experience" with Linux/Ubuntu is less than 2 weeks....?
Is this bug something unique triggered by my cheap MB/CPU?

Manfred Hampl (m-hampl) said : #12

> Is this bug something unique triggered by my cheap MB/CPU?
I have not experienced that error myself, I can only refer to the comments in bug 642421
Already 252 people have registered there as 'affects me too' (and potentially several hundred more who did not push that button). So it is definitely not something "unique".

It seems to me that in the moment you have a few options:
1. leave it as it is for the moment, and wait for an official upgrade that resolves that problem (should be with the natty narwhal release to be delivered late in April, or maybe earlier with a kernel update in maverick)
2. upgrade to natty which is currently in development (I do not recommend that, as using pre-releases is something where even experienced developers sometimes run into problems)
3. use the patched kernel developed by Andy Whitcroft from the link above.

You have to decide, if the error message and the 20-30 seconds delay is something that you can live with (stick with option 1), or if you want to get rid of it as fast as possible (option 3 as solution).

Larry Whitehead (llw8008) said : #13

Thank you Manfred and Eliah. I appreciate the help you've provided me very
much.
I'd been bragging to friends about how my new build was providing a good
alternative to buying another license of MW7 for an additional computer.
 (Doing web development I usually have one with 2 screens and wanted another
one for viewing the results with another computer with a couple additional
browsers. Even with 2 screens going, more is better.) This build will
continue to serve that purpose nicely.
I won't invite anyone over to experience this effort until the new release
and hopefully it'll be resoved. I've waited for fixes and enhancements on
the M platform before, often much longer. I accept your advise Manfred.
I'm definitely going to hang in there now knowing what a wealth of help and
experience is out there. Thanks again to all.

On Wed, Feb 9, 2011 at 2:22 AM, Manfred Hampl <
<email address hidden>> wrote:

> Your question #144221 on linux-meta in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/linux-meta/+question/144221
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> > Is this bug something unique triggered by my cheap MB/CPU?
> I have not experienced that error myself, I can only refer to the comments
> in bug 642421
> Already 252 people have registered there as 'affects me too' (and
> potentially several hundred more who did not push that button). So it is
> definitely not something "unique".
>
> It seems to me that in the moment you have a few options:
> 1. leave it as it is for the moment, and wait for an official upgrade that
> resolves that problem (should be with the natty narwhal release to be
> delivered late in April, or maybe earlier with a kernel update in maverick)
> 2. upgrade to natty which is currently in development (I do not recommend
> that, as using pre-releases is something where even experienced developers
> sometimes run into problems)
> 3. use the patched kernel developed by Andy Whitcroft from the link above.
>
> You have to decide, if the error message and the 20-30 seconds delay is
> something that you can live with (stick with option 1), or if you want
> to get rid of it as fast as possible (option 3 as solution).
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ubuntu/+source/linux-meta/+question/144221/+confirm?answer_id=11
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/linux-meta/+question/144221
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Larry Whitehead (llw8008) said : #14

Please see my previous comment.
Larry

Larry Whitehead (llw8008) said : #15

OK....

The FATAL start-up message and issues with the gnome-control-center where
I'd tried out various screen options and couldn't go back to one I'd
liked....has caused me to scrap my first install of Ubuntu. It became too
much to put up with. I even tried Madriva (pretty good) and Fedora (lacking
in some basics that Ubuntu comes with). I didn't experience the bugs with
Mandriva's version of gnome-control-center that I do with Ubuntu's.

This time I used a newer SATA HD with considerable more storage space, the
same MB/CPU/Mem. It's taken time to get everything loaded back the way I
like to use a system: Chromium, Thunderbird, FileZilla, Google Mail,
Audacity, Quanta, and even PokerTH. This time I knew which cosmetic
features I wanted. Even then I had trouble getting my favorite theme set
up, but perseverance and stubbornness was rewarded and it's finally just
right for me.

So now I have a computer that'l work along side of my mw7 doing the things I
need to do. I need to get back and concentrate on my web site work but if
someone wants to tackle any of the bugs I stumbled across I'd be happy to
get into the details of my experience. I've scrapped the other distros and
am staying with Ubuntu.

Regards to all,
Larry

On Wed, Feb 9, 2011 at 10:14 AM, Larry Whitehead <
<email address hidden>> wrote:

> Your question #144221 on linux-meta in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/linux-meta/+question/144221
>
> Larry Whitehead posted a new comment:
> Please see my previous comment.
> Larry
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

If you still want to fix this problem (with the start-up message), then you may want to install the experimental kernel described above and at bug 642421.

Alternatively, as indicated on that page, a fix for Maverick has already been committed to the sources in the revision control system; thus, an update fixing the problem will likely soon be released via the maverick-proposed software source. (See https://wiki.ubuntu.com/Testing/EnableProposed, and if you want to maintain a stable system, I *highly* recommend doing what it says under "Selective upgrading from -proposed".) There is, of course, no reason to enable this until bug 642421 indicates that the fix has been released to maverick-proposed.

Can you help with this problem?

Provide an answer of your own, or ask Larry Whitehead for more information if necessary.

To post a message you must log in.