[vox-tech] problem encountered when creating a ramdisk

Peter Jay Salzman p at dirac.org
Sat Dec 16 22:55:36 PST 2006


OK.  Not finding /proc/config.gz is a bad thing.  Change that!!!

Under "General Setup" check the two options:

   Kernel .config support
   Enable access to .config through /proc/config.gz

Modules come into the kernel via two methods:

   * When they're asked to (often via access to a device file)
   * When you ask them to (see below).

To load a module foo, use:

   modprobe -a foo

To remove a module, use:

   modprobe -r foo

Don't forget to make sure your filesystems are built into the kernel and not
as modules.  That may be the cause of the kernel panic with no initrd.

Peter




On Sun 17 Dec 06,  1:42 AM, Hai Yi <yihai2004 at gmail.com> said:
> peter:
> 
> I didn't find /proc/config.gz
> 
> also, when is a *module* loaded into the kernel? How can I control the
> modules's loading/unloading? for instance, when I tried to install
> nviadia's driver, it complained about conflict with a nv-related
> module already loaded in the kernel. In this case, I want to remove it
> at runtime.
> 
> thanks,
> Hai
> 
> On 12/17/06, Peter Jay Salzman <p at dirac.org> wrote:
> >Hola Hai,
> >
> >Yeah.  Don't put in the initrd line in menu.lst.
> >
> >This is the perfect opportunity to rid yourself of the ramdisk, so I'd take
> >advantage of it if possible.
> >
> >Look at /proc/config.gz.  Make sure that ext3 is built into the kernel:
> >
> >   CONFIG_EXT3_FS=y
> >
> >What you don't want to see is this:
> >
> >
> >   CONFIG_EXT3_FS=m
> >
> >It's always helpful if you post error messages to the list
> >
> >If you see that ext3 is being built as a module, go back to menuconfig and
> >change it to "y".  That's assuming you're using ext3.  Make sure that any
> >filesystem on your hard drive is built directly into the kernel.
> >
> >As for USB... hmmm.  I'm guessing your USB system is built as a module if
> >you're using oldconfig from previous kernel.  Do lsmod.  See any USB 
> >related
> >modules?   Do lsusb.  Anything?   What happens when do "ls /proc/bus/usb/"?
> >
> >Also, go through "dmesg | less" and look for anything usb related.
> >
> >Peter
> >
> >
> >
> >On Sun 17 Dec 06,  1:17 AM, Hai Yi <yihai2004 at gmail.com> said:
> >> 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
> >> >
> >> _______________________________________________
> >> vox-tech mailing list
> >> vox-tech at lists.lugod.org
> >> http://lists.lugod.org/mailman/listinfo/vox-tech
> >
> >--
> >How VBA rounds a number depends on the number's internal representation.
> >You cannot always predict how it will round when the rounding digit is 5.
> >If you want a rounding function that rounds according to predictable rules,
> >you should write your own.
> >              -- MSDN, on Microsoft VBA's "stochastic" rounding function
> >
> >Peter Jay Salzman, email: p at dirac.org web: http://www.dirac.org/p
> >PGP Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D
> >_______________________________________________
> >vox-tech mailing list
> >vox-tech at lists.lugod.org
> >http://lists.lugod.org/mailman/listinfo/vox-tech
> >
> _______________________________________________
> vox-tech mailing list
> vox-tech at lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech

-- 
How VBA rounds a number depends on the number's internal representation.
You cannot always predict how it will round when the rounding digit is 5.
If you want a rounding function that rounds according to predictable rules,
you should write your own.
              -- MSDN, on Microsoft VBA's "stochastic" rounding function

Peter Jay Salzman, email: p at dirac.org web: http://www.dirac.org/p    
PGP Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D


More information about the vox-tech mailing list