RAMDISK incomplete write error kernel panic
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).
Related videos on Youtube
Brock
Updated on September 17, 2022Comments
-
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:
- tar xvf linux-2.6.36.4.tar.bz2
- sudo cp /boot/config-2.6.35.11generic ~/linux-2.6.36.4/.config
- cd ~/linux-2.6.36.4
- make menuconfig
- sudo make
- sudo make modules_install
- sudo make install
- sudo update-initramfs -k 2.6.36.4 -c
- 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 over 13 yearsIn that sequence of commands, I see that there many places where you used superuser powers when you didn't need to (e.g.
cp
andmake
). 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' over 13 yearsYou'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 runmake oldconfig
instead ofmake menuconfig
to just upgrade the config file to the new kernel version). -
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 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 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 over 13 yearsThis 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 over 13 yearsWhere did you get this version? Is it a bleeding edge version? Can you use a more stable version?
-
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.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. -
ctrl-alt-delor over 13 yearsI 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 over 13 yearsThank 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.