Skip to Content.
Sympa Menu

sm-users - Re: [SM-Users] kernel compilation + initrd

sm-users AT lists.ibiblio.org

Subject: Sourcemage Users List

List archive

Chronological Thread  
  • From: "David Brown" <dmlb2000 AT gmail.com>
  • To: "Javier Vasquez" <jevv.cr AT gmail.com>
  • Cc: sm-users AT lists.ibiblio.org
  • Subject: Re: [SM-Users] kernel compilation + initrd
  • Date: Fri, 16 Mar 2007 10:08:52 -0700

I'm new to smgl, although not so for linux, neither kernel
compilation. I just wanted to move into source based distros, and I
liked smgl sorcery stuff.... Iwas a debian fan, although just at
user, non guru level.

WooHoo!!! :)

Beyond that, I managed to install smgl in my laptop, but the kernel I
compiled didn't work because I compiled requiring an inird image to
boot (all FS's as modules, including ext2 and ext3). I thought the
initrd was going to get generated after the compilation process, but
it didn't happen.

Wha?!?!? someone else other than me is trying to use that ????

Okay a little background I'm kinda the overall maintainer guy of the
linux spell and some of the supporting scripts (/sbin/installkernel,
/sbin/mkinitrd, etc) there should have been an optional depends on the
smgl-initramfs spell that if enabled generates the initrd for that
kernel (should anyway if it doesn't there should probably be a bug put
in and some more information provided).

Any ways, I didn't rush. I just rebooted into debian, compiled
2.6.20, and generated its initrd image with mkinitrd. I used as root
in the grub menu.lst the partition for smgl though...

Then everything works nice, I could update the system and everything
(scribe update + sorcery update + cast -c gcc g++ gettext + cleanse +
sorcery queue + cast --queue). However afterwords I wanted to compile
a kernel using the linux spell (cast -r linux), and for some reason
the 2.6.19 vanilla kernel doesn't want to compile for me, it gives me
some network dependencies problems, which I never had under debian
(I'm guessing it grabbed the config from 2.6.20 containing stuff not
there for previous kernel, and if that is so, then oldconfig wouldn't
work either).

Not sure about this one either I'd have to have the compile log to see
what's going on...

Any ways, not a problem, I had an early source, 2.6.18.8 available,
then I managed to compile it with the regular way "make menuconfig" +
"make" + "make modules_install" under smgl. However I compiled it
again hoping to be able to generate an initrd for it. Compilation
went OK, but at the time of generating the initrd it proved to be a
pain. I had to use "--ignore-missing" because although the modules I
have under "/etc/modules", which are the ones I want loaded after the
cramfs is loaded (not during its load), are there, but they are not
found because they don't depend upon others... OK, I figured, but
then I had to remove "klibc_parts" function call inside mkinitrd bash
script since it looks for /usr/lib/klibc/bin/* files, which don't
exist. After this hacks the initrd image got generated, but then
including it the usual way, by including the initrd line after the
kernel one under grub menu.lst, didn't work, there's a panic error at
boot indicating the init file was not found and I should use something
a init boot parameter...

Yeah I just used /etc/modules cause it was there I probably should
change the script to add modules from a different file and the
initramfs spell should probably have a dependency on klibc since
that's kinda needed...

BTW, I had casted already linux-initrd spell and cramfs one as well,
so I guess I shouldn't have any problems generating initrd images to
boot, but I guess I'm wrong....

I want to 1st be able to manually compile a kernel under smgl and
generate its initrd image, by using regular tools, make + mkinitrd,
etc. When succeeding on that, then I want to do it with the linux
spell...

This is really all a user should be expected todo... this is really
the first set of feed back I've gotten on these scripts so its much
appreciated.

Could you please let me know how to do this? I don't want the
dependency of a 2nd distro to generate the kernel..

And really, the above is what you should be expected todo... make +
make modules_install + mkinitrd. Also the linux 2.6 also can use a
`make install` (I know its kinda crazy) but that will do the
modules_install and copy the kernel since it uses the
/sbin/installkernel that's provided by smgl-initramfs.

Most probably I'm doing things the wrong way, as I said I'm new to
smgl, so maybe some one can share some light with me.

No they're just ways that need some holes filled... since the road is
still kinda new and a little bumpy.

Thanks very much for the feed back and feel free to submit bugs on
these to bugs.sourcemage.org you can assign them to me if you like
dmlb2000 AT gmail.com

- David Brown




Archive powered by MHonArc 2.6.24.

Top of Page