[vox-tech] problem encountered when creating a ramdisk

Peter Jay Salzman p at dirac.org
Sat Dec 16 20:36:46 PST 2006


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


More information about the vox-tech mailing list