Re: openmosix on debian sarge

"Scott Franzyshen" <[email protected]>
Newsgroups gmane.linux.cluster.openmosix.general
Message-ID <[email protected]>
>thanks very much for the info. i will definitely use what you have if i
>don't get this working soon...
>
>but right now, i really want to get this working so i tried recompiling the
>kernel again, this time with most things built-in and not as modules.
>
>however, i still get kernel panic (can't mount root fs...)
>and in addition, i get
>
>cramfs wrong magic
>
>i sure don't have that a while ago... :(
>
>i think that something is wrong with my mkinitrd. some of the howtos in
>openmosix-debian does away with that part, but how do you boot without the
>initrd? my other red hat 9 machine here uses ext2 instead of cramfs.
>
>i am still confused. please help. thanks a lot.
>
>mary


Hi Mary!


I too have had problems with making custom kernel installs for debian. The 
problem you
are having is with the initrd. I am not clear as to how you are installing 
your kernel. Are
you using debian packages (deb) or are you compile and copying everything 
over.

If you are doing the later, then you will need to also create a new initrd 
image with your
new kernel modules. If you use lvm, then this initrd will also need to load 
everything up
before it gets pasted to the init (this is when you get the wrong magic 
message)

Here is what I do: (using Debian Sarge w/2.4.27 kernel installed by default 
with install)

Build Kernel -

I installed the kernel-source-2.4.27_2.4.27-10_all.deb

"apt-get install kernel-source-2.4.27"

This will install the file kernel-source-2.4.27.tar.bz2 into your /usr/src 
subdirectory.
I extract the archive into the /usr/src subdirectory

"tar -xvjf kernel-source-2.4.27.tar.bz2"

This creates the folder /usr/src/kernel-source-2.4.27 with the kernel source 
code
I also create a symbolic link in the /usr/src subdirectory to point 
/usr/src/linux to
the source code.

"ln -s /usr/src/kernel-source-2.4.27 /usr/src/linux"

Setup the kernel source ...

"cd linux"
"make distclean"
"make mrproper"

I use the config file from the original kernel install.

"cp /boot/config-2.4.27-2-386 .config"

edit your Makefile and change "EXTRAVERSION =" to read "EXTRAVERSION = 
-2-om-386"
so that the new kernel wont conflict with other kernels durring the install.

I then patch the kernel, compile, and install ...

"patch -p1 <../PATCHFILE" (PATCHFILE = your kernel patch)
"make dep bzImage modules modules_install"

After building and installing the new kernel, you will need to copy the 
System.map, bzImage, and config file to your /boot (directory or partition)

"cp System.map /boot/System.map-2.4.27-2-om-386"
"cp arch/i386/boot/bzImage /boot/vmlinux-2.4.27-om-386"
"cp .config /boot/config-2.4.27-om-386"

You will now need to rebuild your initrd. I use the one already installed 
with the original
kernel. There are probably OFFICAL ways to do this within debian, but this 
works for me
and it is quick and simple. (using script files ...)

"cp /boot/initrd.img-2.4.27-2-386 /usr/src"
"cd /usr/src"
"mkdir initrd"
"mount -t cramfs -o loop initrd.img-2.4.27-2-386 initrd/"
"tar -cvf initrd.tar initrd/ >list"
"umount initrd/"
"rm -rf initrd/"
"tar -xvf initrd.tar"
"rm -rf initrd/lib/modules/2.4.27-2-386"

Using the "list" file generated to determin what files need to be copied 
from the /lib/modules/2.4.27-2-om-386 subdirectory to initrd/lib/modules/. I 
use a script
to do this, but you could simple copy your entire 
/lib/modules/2.4.27-2-om-386
to the initrd/lib/modules/ subdirectory. It will be unnessaryly larger then 
needed
and may slow down booting, but it will work. Try to match what was there
already in the original initrd.img file is the best way though.

After you have copied the nessary modules it is time to rebuild the 
initrd.img

"mkcramfs initrd/ /boot/initrd.img-2.4.27-2-om-386"

Finally, update the grub loader ...

"update-grub"

Now, reboot and you should see your new kernel in the bootmenu list.
Select your new kernel and boot. If everything was done correctly ...
You should boot into your system using the new kernel.

Some Notes:

If you are using stock openmosix patches then you may also need to make
sure that aout format is built into the kernel and NOT a module. If using
migshm you may also need to make sure that ext3 is built in and NOT a
module.

Hope this helps other Debian user out there ...

Personal Plug :)

I have built several kernels based on debian kernel-sources ... I can create 
.deb
files for openmosix kernels if anyone is interested, let me know! I am 
currently
working on the following debian packages (.deb) These packages are 
combinations
of the original debian kernel-source (2.4.27-2), openmosix, and the migshm 
patch.
I am creating two version. The first version is based on the offical CVS 
source code.
The next version is based on Vincent Hanquez's (aka tab) patchset that has 
been modified
by Konstantin Arkhipov (aka voxus) for use with the gentoo 
(http://www.gentoo.org/)
distribution and others.

Current Work: (Debian Openmosix Kernel Packages)

kernel-image-2.4.27-2-om1-migshm                          (original CVS 
source)
kernel-image-2.4.27-2-om-migshm-no-mfs-20050716  (from 
http://dev.gentoo.org/~voxus/om/)


I am available to assist. - Email me 4 help.

I am avaiable for hire. - Remote or Onsite. Email me 4 linux, cluster, 
openmosix, everything.

Scott Franzyshen ([email protected])




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.