What is "generic" kernel? Why does module-assistant work?

Francis Earl francis.earl at gmail.com
Mon May 26 23:20:30 UTC 2008


On Mon, 2008-05-26 at 15:30 -0500, Paul Johnson wrote:
> I'm new in Ubuntu, coming from RedHat/Fedora.
> 
> I encountered some weirdness after I installed the openafs client
> program.  I noticed in the logs from apt that a kernel module had to
> be built for that program and I followed some steps it mapped out.

Heh... you found one of the tools I miss the most when I'm outside the
Debian community.

> module-assistant prepare openafs-modules
> module-assistant auto-build openafs-modules
> 
> Seemed to work OK--plopped some deb packages into /usr/src.  It is a
> bit too automagical for my taste, though.
> 
> I don't understand why it worked, and I feel a bit "out of control".
> Maybe all those years of building RPMs damaged my brain.  I'm looking
> to understand the debian build framework.  In RPM framework, there
> would be a designated directory structure with subdirectories for the
> SOURCE code, the BUILD, the SPEC (equivalent to control file & pre  &
> post scripts), and results would go into RPM and SRPM.

This is because of the preinst and postinst scripts of the module, so
it's not that different really. I have had no luck with modules randomly
picked up off the internet, although I haven't poked
the /var/lib/dpkg/info files of the modules to see for sure. Maybe you'd
like to though.

This is simply people specializing in packaging going a step above what
is required of them. I believe it uses debconf hooks like many other
packages in Debian-based distros.

> 1. Why can't the "ordinary" user build the deb?  It should not be
> necessary to be root!  Fedora guys say that's bad :(

They can if they change the root.

See: --instdir= option in dpkg.

> 2. Why it doesn't make a source package?

You didn't ask it to.  :P

You installed a source package, and told it to compile it and apply it
to /lib/modules dir correctly when you ran m-a.

> 3. Where can I find the control file from which the deb was manufactured?

apt-get source <package>
dpkg -x <package>

https://wiki.ubuntu.com/PackagingGuide Is a good place to start for
trying to comprehend the resulting directory structure.

> 4. Should I find a build tree and a fakeroot directory and erase them
> to clean up after the build?

No.

> While Googling on that,  I found a more puzzling question.  I ran the
> basic Ubuntu install.  I have linux-image-generic.  Is that right?
> In Fedora, there's a kernel for i386, and one for i686, and one for
> x86_64, etc.  In Ubuntu I don't see one especially for i686.

http://archive.ubuntu.com/ubuntu/pool/main/l/linux/

The Packages.gz of the repo does some package to only grab the correct
version, you can clearly see though that the file names still clearly
state arch.

> Here's one of the pages I found about it.
> 
> http://beginlinux.com/index.php/desktop_training/ubuntu/ubfile_m/ub_kernel
> 
> If the server kernel is "better" for i686, why doesn't the installer
> just use it for desktop systems?  It just seems odd to me that I'm
> supposed to install a kernel labeled "server" just to get the i686
> optimization.

It isn't better in all cases, both kernels are optimized for their specific use case.





More information about the ubuntu-users mailing list