Doug Hunley | 20 Apr 2012 15:25
Picon
Gravatar

initramfs 'pro' needed

I recently started booting via initrams (thanks to the udev 'no
separate /usr' shit) and it works fine. However, I have a new issue
that requires me to recompile nouveau as a module (it's currently
compiled-in to the kernel as I don't use modules if I can avoid it). I
can easily enough flip the bits in the kernel compile to make it a
module, that's no biggie. However, I'm not sure what I need to do to
my initramfs to get the module included. ;)

I'm using an init.cfg (attached) to have the kernel build the
initramfs and pull in all the binaries that are needed. How do I tweak
this to pull in the appropriate modules?

Thanks!

--

-- 
Douglas J Hunley (doug.hunley <at> gmail.com)
Twitter:  <at> hunleyd                                               Web:
douglasjhunley.com
G+: http://goo.gl/sajR3
Attachment (init.cfg): application/octet-stream, 1020 bytes
I recently started booting via initrams (thanks to the udev 'no
separate /usr' shit) and it works fine. However, I have a new issue
that requires me to recompile nouveau as a module (it's currently
compiled-in to the kernel as I don't use modules if I can avoid it). I
can easily enough flip the bits in the kernel compile to make it a
module, that's no biggie. However, I'm not sure what I need to do to
my initramfs to get the module included. ;)

(Continue reading)

David A. Bandel | 21 Apr 2012 02:41
Picon
Gravatar

Re: initramfs 'pro' needed

On Fri, Apr 20, 2012 at 08:25, Doug Hunley <doug.hunley <at> gmail.com> wrote:
> I recently started booting via initrams (thanks to the udev 'no
> separate /usr' shit) and it works fine. However, I have a new issue
> that requires me to recompile nouveau as a module (it's currently
> compiled-in to the kernel as I don't use modules if I can avoid it). I
> can easily enough flip the bits in the kernel compile to make it a
> module, that's no biggie. However, I'm not sure what I need to do to
> my initramfs to get the module included. ;)

Q:  your distro?  Debian and derivatives (Ubuntu, Mint, etc.) have all
in /etc/initramfs-tools/initramfs.conf and with modules in the modules
file.

>
> I'm using an init.cfg (attached) to have the kernel build the

?? kernel doesn't build initrd.img, that's the job of update-initramfs
or similar script run during kernel upgrades (or on a whim from cli).

> initramfs and pull in all the binaries that are needed. How do I tweak
> this to pull in the appropriate modules?

Not sure -- doesn't look like anything in Deb distros.   Have you
looked in /etc/ for some kind of initramfs directory.  Must have a
configuration besides this (or what you have is not very
extensible/flexible).  Almost reminds me of Slackware.

>
> Thanks!
>
(Continue reading)

Doug Hunley | 21 Apr 2012 23:29
Picon
Gravatar

Re: initramfs 'pro' needed

On Fri, Apr 20, 2012 at 20:41, David A. Bandel <david.bandel <at> gmail.com> wrote:
> On Fri, Apr 20, 2012 at 08:25, Doug Hunley <doug.hunley <at> gmail.com> wrote:
>> I recently started booting via initrams (thanks to the udev 'no
>> separate /usr' shit) and it works fine. However, I have a new issue
>> that requires me to recompile nouveau as a module (it's currently
>> compiled-in to the kernel as I don't use modules if I can avoid it). I
>> can easily enough flip the bits in the kernel compile to make it a
>> module, that's no biggie. However, I'm not sure what I need to do to
>> my initramfs to get the module included. ;)
>
> Q:  your distro?  Debian and derivatives (Ubuntu, Mint, etc.) have all
> in /etc/initramfs-tools/initramfs.conf and with modules in the modules
> file.

Gentoo

>
>>
>> I'm using an init.cfg (attached) to have the kernel build the
>
> ?? kernel doesn't build initrd.img, that's the job of update-initramfs
> or similar script run during kernel upgrades (or on a whim from cli).

Yes, it can. If you point the kernel at the config file like so:
CONFIG_INITRAMFS_SOURCE="/usr/src/init.cfg"
then it parses that file and builds the initramfs into the kernel
itself and fetches whatever files/nodes are in that config

It's pretty slick actually

(Continue reading)

Doug Hunley | 23 Apr 2012 19:10
Picon
Gravatar

[solved] initramfs 'pro' needed

On Fri, Apr 20, 2012 at 09:25, Doug Hunley <doug.hunley <at> gmail.com> wrote:
> I'm using an init.cfg (attached) to have the kernel build the
> initramfs and pull in all the binaries that are needed. How do I tweak
> this to pull in the appropriate modules?

I consulted The Google and put some 'echo' statements into the
kernel's make file and determined that it is *not* possible to
auto-include the modules when building an initramfs in this fashion.
In fact, the initramfs is damn near the *first* thing the kernel
builds....

So I ended up just having my /sbin/init that runs inside the initramfs
use busybox to symlink /lib/modules/`uname -r` from the real_root to
the initramfs and then run modprobe. So the kernel boots up w/o the
modules, loads the initramfs, and then the modules get loaded and boot
gets handed off to the 'real' system

TL;DR you can't, but you can work around it and get close enough

--

-- 
Douglas J Hunley (doug.hunley <at> gmail.com)
Twitter:  <at> hunleyd                                               Web:
douglasjhunley.com
G+: http://goo.gl/sajR3
_______________________________________________
Linux-users mailing list
Linux-users <at> linux-sxs.org
http://mailman.celestial.com/mailman/listinfo/linux-users

Gmane