# /etc/modprobe.devfs has not been automatically generated

## Gentree

I noticed a warning about  /etc/modules.conf on boot so I tried to fix it.

bash-3.2#update-modules

 * Warning: the current /etc/modules.conf has not been automatically generated

 * Use "update-modules force" to force (re)generation

bash-3.2#update-modules force

 * Warning: the current /etc/modules.conf has not been automatically generated

 * --force specified, (re)generating file anyway

 * Warning: the current /etc/modprobe.conf has not been automatically generated

 * --force specified, (re)generating file anyway

 * Warning: the current /etc/modprobe.devfs has not been automatically generated

 * --force specified, (re)generating file anyway

 * Updating /etc/modules.conf ...                                         [ ok ]

 * Updating /etc/modprobe.conf ...                                        [ ok ]

 * Updating modules.dep ...                                               [ ok ]

bash-3.2#update-modules

 * Warning: the current /etc/modprobe.devfs has not been automatically generated

 * Use "update-modules force" to force (re)generation

bash-3.2#update-modules force

 * Warning: the current /etc/modprobe.devfs has not been automatically generated

 * --force specified, (re)generating file anyway

 * Updating /etc/modules.conf ...                                         [ ok ]

 * Updating /etc/modprobe.conf ...                                        [ ok ]

 * Updating modules.dep ...                                               [ ok ]

bash-3.2#update-modules

 * Warning: the current /etc/modprobe.devfs has not been automatically generated

 * Use "update-modules force" to force (re)generation

bash-3.2#

So having cleared the initial problem (which was not my manaul intervention so I presume portage changed something) I'm left with a similar warning about /etc/modprobe.devfs  which will not clear.

Is it serious doc?

TIA, Gentree.   :Cool: 

----------

## potatoface

look here

regards

potatoface

----------

## Gentree

the "fixed" bug does not seem to fix me.

It does sound similar though so I think it has a related cause. Although the linked bug report is marked as fixed it does not resolve the issue I see here. MountainMan also posted an identical problem in that thread.

Thanks.   :Cool: 

----------

## wynn

 *Gentree wrote:*   

> the "fixed" bug does not seem to fix me.
> 
> It does sound similar though so I think it has a related cause. Although the linked bug report is marked as fixed it does not resolve the issue I see here. MountainMan also posted an identical problem in that thread.

 The bug had to do with not running depmod which caused modprobe to say that modules weren't present when they were.

You are quite right, this is a different problem: adding modprobe.devfs to the list of candidate config files to renew depends on the value of GENERATE_DEVFS. This is initialized to "false" and can only be set to "true" by "-D" or "--devfs" on the command line or the presence of the directory /etc/devfs.d.

In this last case the script assumes that it should include /etc/modprobe.devfs and then complains that the file (which must exist and be readable for this error to appear) doesn't have the first line

```
### This file is automatically generated by update-modules
```

This is all highly theoretical having been gleaned from the text of the script. I would be grateful to have it confirmed if true or to be given more evidence otherwise.

P.S. You can run

```
/sbin/update-modules --debug
```

and it will run "set -x" internally and print out the code it executes.

----------

## Gentree

Thanks for the detailed explaination.

```
  GNU nano 2.0.6           File: /etc/modprobe.devfs                            

### This file is automatically generated by modules-update

#

# Please do not edit this file directly. If you want to change or add

# anything please take a look at the files in /etc/modprobe.d and read

# the manpage for modules-update(8).

#

```

```
++ sed -ne 1p /etc/modprobe.devfs

+ [[ ### This file is automatically generated by modules-update != \#\#\#\ \T\h\

i\s\ \f\i\l\e\ \i\s\ \a\u\t\o\m\a\t\i\c\a\l\l\y\ \g\e\n\e\r\a\t\e\d\ \b\y\ \u\p\

d\a\t\e\-\m\o\d\u\l\e\s ]]
```

sed what ?!

Could this be  modules-update  / update-modules confusion?

 :Cool: 

----------

## wynn

Yes, it looks as if it's an old modprobe.devfs created (empty?) by modules-update and, as you can see (??), the header doesn't match.

The output following "sed -ne 1p /etc/modprobe.devfs" looks interesting though I expect, to sed, "'#" is the same as "\#": it's just crossing its eyes and dotting its teas.

If you are not using devfs then, of course, you can remove the directory "/etc/devfs.d" and the file "/etc/modprobe.devfs" and be rid of the error message ... but perhaps this is obvious   :Smile: 

If this does solve/has solved your problem, one of us could add a note in the other thread pointing here.

----------

## Gentree

you seem to have missed the point of my post , the \#\e\v\e\r\y\ \l\e\t\t\e\r\ \ c\r\a\p actually spells the reversed name and is NOT the same at the first part of the expression.

I dont have time to get to grips with the cryptology of sed or start trying to debug the script but it appears that this renaming may the cause of this oddity.

It may be that there is a dependancy issue that is not getting covered by portage.

thanks for you help.

 :Cool: 

----------

## wynn

 *Gentree wrote:*   

> you seem to have missed the point of my post , the \#\e\v\e\r\y\ \l\e\t\t\e\r\ \ c\r\a\p actually spells the reversed name and is NOT the same at the first part of the expression.

 "modules-update" used to be called "update-modules".

I should have written *Quote:*   

> Yes, it looks as if it's an old modprobe.devfs created (empty?) by update-modules and, as you can see (??), the header doesn't match.

 and it would have been clearer.

----------

## The Mountain Man

I'm having seemingly the same problem.  I run "update-modules force" like I'm told:

```
 * Warning: the current /etc/modprobe.devfs has not been automatically generated

 * --force specified, (re)generating file anyway

 * Updating /etc/modules.conf ...                                                         [ ok ]

 * Updating /etc/modprobe.conf ...                                                        [ ok ]

 * Updating modules.dep ...                                                               [ ok ]
```

But next time I boot up, I get the warning message again.  What's up?

On a related note, it's nice to know that this isn't problem unique to me.

----------

## wynn

 *The Mountain Man wrote:*   

> I'm having seemingly the same problem.  I run "update-modules force" like I'm told:
> 
> ```
>  * Warning: the current /etc/modprobe.devfs has not been automatically generated
> 
> ...

 Well, first, are you using devfs anyway? It has been deprecated in the kernel for quite some time and has been replaced by udev.

If you are using udev then you have no need of either /etc/modprobe.devfs or /etc/devfs.d â which directory is causing modules-update to try and recreate /etc/modprobe.devfs.

So you can just delete /etc/modprobe.devfs (this would be enough to stop the warning) and the directory /etc/devfs.d and any contents that may still be lingering there.

They are both left overs from another time when you did have devfs running. For some reason (probably timestamps) when devfs was unmerged these were left behind.

"update-modules --force" has no effect as the first line of /etc/modules.devfs doesn't match

```
### This file is automatically generated by update-modules
```

and, as the file is not being recreated because of this mismatch, this will never change and the warning message will always be issued.

----------

## The Mountain Man

Yeah, on a whim I changed the name of the file to see what would happen and found that this eliminated the error message.

Incidentally, there's also a file in etc named "devfsd.conf".  I assume this is safe to delete as well?

----------

## wynn

From what you say you aren't running devfs (I think only people running 2.4 kernels will have it now).

Probably best is to rename it (as you did with modprobe.devfs) and see if that changes anything for the worse.

If not, and you remember, you can delete them all in a week's time, say.

P.S. You could also have eliminated the error message by changing the first line of /etc/modprobe.conf to

```
### This file is automatically generated by update-modules
```

----------

## Gentree

hmm. I think all this renaming crap is a sloppy work around which is not more effective than closing my eyes to I dont see the warning come up. (In fact that's exactly what it is doing.)

I know there was a reason that I retained devfs but it escapes by memory just now. Nothing to do with 2.4 I stopped using that shortly after installing Gentoo years back when 2.6 was still testing.

When I saw devfs was marked depreciated I removed it but found I still needed it for something.  I'll have to find out again .

Anyway I'm still sure this is a timewaster brought about by the great idea of invert the name and that insufficient dep checking ebuilds fails to sync the offending pkg versions.

Two good reasons not to do this kind of shit without a definite need.

 :Confused: 

----------

## Matteo Azzali

Is it so difficult?

Make sure you have the no-old-linux flag on for module-init-tools

,if not add it in /etc/portage/package.use and then do an:

#emerge -auvDN module-init-tools

then just 

#rm -r /etc/devfs.d

#rm /etc/modprobe.devfs*

and now an 

#update-modules

----------

## Gentree

Thanks for the explaination of what is required. It is not that difficult once you know.

The point of this whole issue is , why the hell do I need to know that?

I could probably have spent the best part of a day googling scratching around in bugzilla or ploughing my way the the scripts to see what was happending , why and how I could get around or fix the problem. 

THAT is the difficult bit. I simply have better things to do with my life , like contributing to OSS or fixing my ignition timing so I can get to work tommorrow.

Now, since you seem to be fairly close to this code maybe you can explain:

1/ was there a really good reason for reversing the name and causing breakage?

2/ why is this not handled by portage and the packages concerned?

This is the sort of thing that makes Gentoo time consuming and a pain to maintain. If we could say " yes this is not good, we will make a policy to try to avoid doing this sort of thing in the future" it would be a plus for Gentoo. Learning from a small mistake and improving the distro.

I think this would be more positive than "Is this so difficult?".

Gentoo on the whole is great otherwise I would still be here. Nothings perfect but I would be good to eliminate this sort of time waster.

Thanks again for the explaination of how to clear this one up. I dont like loose ends at boot.

 :Wink: 

----------

## Matteo Azzali

Sorry I was thinking it was obvious as I got that method from a couple threads here,

it wasn't so obvious then....

About the policy , yes, I think also that the flag should have been "old-linux" (as is now)

and not "no-old-linux" from the start, and I'm sorry this was a little nasty (shouldn't have

blocked any boot, however). 

The truth is probably well known: too much work and too less developers, so this little

issue is passed unnoticed in ~ branch, if you want to be sure to avoid this kind of issues

better to move to stable branches (sorry, that's all I can say or suggest about the issue...)

----------

