[vox-tech] problem encountered when creating a ramdisk

Hai Yi yihai2004 at gmail.com
Sat Dec 16 22:17:34 PST 2006


hey peter:
first, thank you very much! after reading your post, I did the following things:
I ran the make bzImage to create a vmlinuz in the boot and I saw its
corresponding system map as well (without doing any additional work),
and I modified menu.1st and added the new kernel's entry.

However, here comes the problem. I found the last line of each entry
is about the initrd.img, I can find 2.4.17's initrd.img from /boot,
but as I mentioned earlier, I couldn't create the initrd.img for my
new kernel.

Ignoring this line for the new kernel's entry in menu.1st or using the
old kernel's initrd.img for the new entry would cause kernel panic,
whatsoever.

Good news is that I eventually created this file using:
 mkinitrd -o /boot/initrd.img-2.6.8.13 2.6.8.13

and added it to the menu.1st. Then the new kernel is installed and
worked! and I used uname -r to verify the installation.

Bad news is that the usb port has problem - I couldn't make the mouse
work. I guess it's a bout the configuration. But how come this was not
the problem for my old kernel? I used the same configuration, I think.

Basically, I followed this link to compile the new kernel:
http://www.howtoforge.com/kernel_compilation_debian

Thanks,
Hai

On 12/16/06, Peter Jay Salzman <p at dirac.org> wrote:
> On Sat 16 Dec 06,  4:26 PM, Hai Yi <yihai2004 at gmail.com> said:
> >    Hello, there:
> >
> >    I start a process to create a new kernel, 2.6.13. When I came to the step
> >    of creating a ramdisk, I had a problem. I used the command:
> >    mkinitrd.yaird -o /boot/initrd.img-2.6.18.3-default1 2.6.18.3-default1
> >
> >    and I got this error:
> >    yaird error: can't open /proc/bus/input/devices (fatal)
> >
> >    I check the directory of /proc/bus/, there is no 'input'
> >
> >    I did some google, someone said it's a yaird's bug, anyhow, I can't find
> >    possible solution; as  an alternative, I might use initramfs-tools, but
> >    how to proceed, I don't know.
> >
> >    Anyone can kindly point a direction for me?
> >
> >    Thanks,
> >    Hai
>
> Hai, I believe you don't need the ramdisk.  The ramdisk is used so the
> kernel can bootstap itself on wildly different hardware.  I'm no expert, but
> I *think* the process goes:
>
> 1. Load the kernel.
> 2. Use ramdisk to make minimal root filesystem required by the kernel.
> 3. Probe hardware(?) and load any modules that are needed.
> 4. Mount the "real" root filesystem.
>
> Useful for distros trying to cater to a variety of hardware.  Not so useful
> once the kernel is tuned for your particular machine.
>
> What sets of instructions are you using?
>
> Here's how I do it:
>
> 1. Configure the kernel.  Use "make oldconfig" to import current
>    configuration.   Then "make menuconfig" to finetune and make
>    sure everything looks good.
>
> 2. make bzImage
>
> 3. Copy the resulting vmlinuz to /boot (I rename the kernel).  Here is my
>    /boot directory:
>
>       grub/
>       lost+found/
>       System.map-2.6.11 System.map-2.6.12 System.map-2.6.14
>       System.map-2.6.15 System.map-2.6.16 System.map-2.6.18
>       vmlinuz-2.6.11    vmlinuz-2.6.12    vmlinuz-2.6.14
>       vmlinuz-2.6.15    vmlinuz-2.6.16    vmlinuz-2.6.18
>
>    Once "make bzImage" is done, it'll tell you where the file "vmlinuz" is.
>
> 4. Copy System.map into /boot, renaming it after the kernel as I do in the
>    ls listeing above.
>
> 5. "make modules && make modules_install"
>
> 6. Make a new entry in /boot/grub/menu.lst
>
>
> I think that's everything.  I don't compile my kernel nearly as much as I
> did back in grad school.  No time anymore.  If there's a mistake here,
> someone will catch it.
>
> If you have any questions about a specific step, don't hesitate to ask.
>
> Peter
> _______________________________________________
> vox-tech mailing list
> vox-tech at lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>


More information about the vox-tech mailing list