Hi Peter

From: Peter Hardy <[EMAIL PROTECTED]>
To: slug@slug.org.au
Subject: Re: [SLUG] How to build a kernel on debian (with modules enabled)
Date: Mon, 12 Jun 2006 08:47:44 +1000
Heya.

On Sun, 2006-06-11 at 12:23 +0000, Paul Davies wrote:
> INITIAL CONDITIONS: I downloaded Debian from the web.  It installed
> a kernel on my behalf. I got the config from which this kernel was built
> from /boot to build my kernel.

Just out of interest, why are you compiling a kernel?
I work for Gelato (I assume you are the former sys admin guy from NICTA).
I work on page tables (I have Adam Wiggins GPT running under 2.6.17-rc5) on a clean
page table interface (fed to linux-mm on May 30).  At the moment I just get
the default page table to be chosen at compile time from a config.  But, one
day (far off in time) it might be a nice idea to be able to put a page table into
a module.  Probably fantasy but there you go.

At present I am just mucking around trying to build a kernel with modules
manually on my home machine.

> 1) I have compiled 2.6.15-1 with modules enabled.  COMPILES FINE.
> Copied bzImage to /boot as vmlinuz-2.6.15-1.

Rather than doing all of these steps manually, it may be worth looking
in to installing and using the kernel-package package. Once you've got
your kernel config good to go, you can use the make-kpkg command in
kernel-package to automate away all the boring bits, and hand you
a .dpkg file you can just install.
I installed the package and I know I can do that.  But I wanted to do it
manually.  I need to understand the steps involved.

> 4) I ran a script mkinitrdramfs to create the image for the ram disk
> (WORKED)
> and copied it to /boot.

Woah. What's this mkinitrdramfs script? Do you
mean /usr/sbin/mkinitramfs, which is shipped in the initramfs-tools
package? Is it a custom script?
It is the custom script (not yaird or anything).  It is the equivalent of
mkinitrd that ships with red hat.

Also, how are you calling this script? Are you sure it's building an
initrd using the modules for your new kernel, and not grabbing the ones
for the kernel you're currently running?
I just execute it as root. It is grabbing the ones for the kernel I am running. Very early in boot. It claims it can't find modules.dep in the directory that
it ought to be in.

FATAL: Could not load /lib/modules/2.6.15.1/modules.dep: No such file
or directory.

This is the correct file and directory, its just that initrd never mounted properly
(I THINK).

What did you call the initrd image?
ramdisk.img

> When I try to boot the kernel, the kernel insists that hda5 does not exist.
> No reason why it should either.  I simply copied the original grub entry
> (theoretically
> an identical kernel) and hoped for the best.

What changes have you made to grub? What's the exact error you get?

Grub ORI

title                     Debian GNU/Linux, kernel 2.6.15-1-486
root                     (hd0,4)
kernel                /boot/vmlinuz-2.6.15-1-486  root =/dev/hda5 ro
initrd                  /boot/initrd.img-2.6.15-1-486
savedefault
boot

New Entry

title                     Test Kernel
root                     (hd0,4)
kernel                /boot/vmlinuz-2.6.15-1  root =/dev/hda5 ro
initrd                  /boot/ramdisk.img
savedefault
boot

EXACT ERROR message:

FATAL: Could not load /lib/modules/2.6.15.1/modules.dep: No such file or directory. FATAL: Could not load /lib/modules/2.6.15.1/modules.dep: No such file or directory.
ALERT! /dev/hda5 does not exist.  Dropping to shell!

BusyBox v1.01 (Debian 1:1.01-4) Built-in shell (ash)
Enter 'help' for a list of built in commands.

/bin/sh: can't access tty; job control turned off
/#_

Thanks for any help...

Paul Davies

_________________________________________________________________
realestate.com.au: the biggest address in property http://ninemsn.realestate.com.au

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to