RAMDISK incomplete write error kernel panic

11,116

The source had few syntax errors So it would not even compile (the lowest form of test ).

If I understand correctly then I would be highly surprised if it did not have problems. There is probably no way you could have fixed all the bugs by fixing compilation errors, you would need a lot of knowledge of the code, and what has changed (so you can focus in).

Share:
11,116

Related videos on Youtube

Brock
Author by

Brock

Updated on September 17, 2022

Comments

  • Brock
    Brock almost 2 years

    I am building Linux Kernel 2.6.36.4 on a Dell Laptop which has Linux Kernel 2.6.35.11 running.

    BTW I got the source from kernel.org.

    The source had few syntax errors which I fixed in the process and finished building Kernel.

    After reboot, I keep getting following error:

    RAMDISK: incomplete write error(6022 != 28860)
    write error
    Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0, 0)
    Pid: 1, comm: swapper Not tainted 2.6.36.4 #2
    Call Trace:
    ? printk....

    I followed following steps while building the source:

    1. tar xvf linux-2.6.36.4.tar.bz2
    2. sudo cp /boot/config-2.6.35.11generic ~/linux-2.6.36.4/.config
    3. cd ~/linux-2.6.36.4
    4. make menuconfig
    5. sudo make
    6. sudo make modules_install
    7. sudo make install
    8. sudo update-initramfs -k 2.6.36.4 -c
    9. sudo update-grub

    I tried following things after my internet search:

    • After reboot with working kernel, ran sudo update-initramfs -u -k all
    • Ran fsck

    However I still get this error for every attempt to boot using 2.6.36.4

    Has anybody come across such an issue and what do you suggest in this context?

    Thank you in advance!

    EDIT:
    Some developers have increased the ramdisk size to few MBs from 4096 default. Is that a good idea?

    • tshepang
      tshepang over 13 years
      In that sequence of commands, I see that there many places where you used superuser powers when you didn't need to (e.g. cp and make). Why do that? I don't know how to build the kernel, so maybe that's how it's done. Where did you get your instructions?
    • Gilles 'SO- stop being evil'
      Gilles 'SO- stop being evil' over 13 years
      You're missing one of the necessary drivers for your boot disk. You typically need a driver for your chipset as well as various generic disk drivers, and of course the partition and filesystem drivers. Since you're using an initramfs, they can be compiled as modules. You were probably too eager removing things during make menuconfig. Review the differences between your .config and the one you started with, or start again (you can run make oldconfig instead of make menuconfig to just upgrade the config file to the new kernel version).
    • Brock
      Brock over 13 years
      @Tshepang: Yes, cp and make may not require sudo. I thought since it is kernel related operations, superuser power may be required...which now I realize was not required. Well, I compiled this list of instructions from a few sites, and in the past it has worked correctly.
    • Brock
      Brock over 13 years
      @Gilles: I just copied the oldconfig, renamed and used it for the new kernel. I did not do any change. However I did notice the .config changed after the build process was complete. Not sure when that change happened.
  • Brock
    Brock over 13 years
    @richard: You are right, one has to have a good understanding before fixing the errors in Kernel. However I came across errors which were purely (surprisingly all) typos, like struct was syruct, cache was csche, etc. or misspelled function names. So the errors were like implicit declaration of function, etc. I think, these can be resolved by having a look at the header files, or other functions in the source itself. I was really surprised to see such issues in source one which was declared stable at kernel.org!
  • ctrl-alt-delor
    ctrl-alt-delor over 13 years
    This sort of error could be fixed easily of they where generated by someone ( an non programmer ) copy typing the text from say a printed book. But I do not think this is what happened. These errors where introduced much earlier, along with other more significant errors. All they tell you is "this code has never been compiled" therefore "this code has never been tested" therefore "it does not work", "it probably has errors that are hard to see".
  • ctrl-alt-delor
    ctrl-alt-delor over 13 years
    Where did you get this version? Is it a bleeding edge version? Can you use a more stable version?
  • Brock
    Brock over 13 years
    $richard: As I wrote in my earlier comment, I got the source from kernel.org. To be specific: http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.3‌​2.y.git;a=summary This page has a section called 'shortlog': 2011-01-07 Greg Kroah... Linux 2.6.32.28 master v2.6.32.28. I clicked on snapshot option on the same line and it starts downloading the gz version.
  • ctrl-alt-delor
    ctrl-alt-delor over 13 years
    I had a look this page is I think for developers and contains work in progress, it is [I think] possible to download tagged versions, but seems overly complex for most of us. Have a look here instead kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.32
  • Brock
    Brock over 13 years
    Thank you, @richard for the link, that 'longterm' in the link indicates its stable! And yes you may be right above my link may not be ideal place to download source.