[COLUG] Re: Sharing a kernel
Josh Glover
colug at jmglov.net
Wed Jun 30 07:01:30 EDT 2004
Quoth Stephen J. Smith (Tue 2004-06-29 10:07:50PM -0400):
> On Tue, 2004-06-29 at 07:41, Josh Glover wrote:
>
> > Quoth Stephen J. Smith (Mon 2004-06-28 11:35:35PM -0400):
> >
> > > Hrm, when does the kernel load modules? Would it be after partitions
> > > listed in /etc/fstab have been mounted?
> >
> > Nope, it must load at least the filesystem modules *before* /etc/fstab
> > is considered.
>
> I think the driver for the root filesystem is generally either built in
> to the kernel, or is part of the initrd image and is loaded from there.
> When exactly any given module is loaded is still a mystery to me. I
> have tried sharing /lib/modules now, and I haven't noticed any problems
> _yet_. YMMV of course.
Right, most people build their root filesystem driver into the kernel to
*avoid* initrd. :) As long as your /lib/modules parition is the same type
of filesystem as your root one, the above will work.
When a module is loaded depends on which kernel you are running (e.g.
2.4.x or 2.6.x) and whether you have module autoloading turned on. With
module autoloading, the kernel loads only the modules in your
modules.conf (or modules.autoload, in a *real* distro) at startup. These
modules are loaded *before* /etc/fstab is considered, so that necessary
filesystem driver modules are there for mounting the partitions listed in
/etc/fstab. (Do a little test if you don't believe me: put a smbfs mount
in your /etc/fstab and make sure smbfs support is compiled as a module.)
In your case, if /lib/modules is not mounted when the kernel loads
modules.conf, there is going to be trouble. How much trouble? In 2.6.x
kernels, where lazy module loading has been virtually perfected, very
little. 2.6.x will load modules on demand to deal with filesystem mounts,
hotplugged hardware, module dependencies, etc. So, failing to load
modules that are listed in modules.conf will just create some spew in
/var/log/messages, but as soon as you mount /lib/modules, the kernel will
be fine.
In 2.4.x kernels, you are probably going to have a bit more trouble. How
much, I know not. But why would anyone want to run a 2.4.x kernel
anymore? ;) (Don't answer that, I know of at least three reasons: don't
fix what ain't broken, my hardware is only supported under 2.4.x, my
software is only supported under 2.4.x).
The bottom line is, Steven, if this is working for you, more power. The
Unix sysadmin in me cringes at /lib/modules being on a different file-
system than /. Rob Funk, what think ye?
In any case, bully on you Steven, for having the hutzpah to try this. :)
Cheers,
Josh
--
Josh Glover
Gentoo Developer (http://dev.gentoo.org/~jmglov/)
Tokyo Linux Users Group Listmaster (http://www.tlug.jp/)
GPG keyID 0xDE8A3103 (C3E4 FA9E 1E07 BBDB 6D8B 07AB 2BF1 67A1 DE8A 3103)
gpg --keyserver pgp.mit.edu --recv-keys DE8A3103
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.colug.net/pipermail/colug/attachments/20040630/248100ad/attachment.bin
More information about the colug
mailing list