Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
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? –  Tshepang Mar 9 '11 at 20:02
    
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). –  Gilles Mar 9 '11 at 20:29
    
@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. –  TheCottonSilk Mar 10 '11 at 4:44
    
@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. –  TheCottonSilk Mar 10 '11 at 4:47
add comment

1 Answer

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|improve this answer
    
@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! –  TheCottonSilk Mar 11 '11 at 4:00
    
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". –  richard Mar 11 '11 at 13:30
    
Where did you get this version? Is it a bleeding edge version? Can you use a more stable version? –  richard Mar 11 '11 at 13:31
    
$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.32.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. –  TheCottonSilk Mar 12 '11 at 5:05
    
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 –  richard Mar 12 '11 at 10:36
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.