Kernel panic: EXT2-fs panic (device 3/66): ext2_find_entry: buffer head pointer is NULL
when kernel tries to start init process. When i boot from another
partition and mount 3/66 (/dev/hdb2, my main root partition), i will get
same message every time i try to create file in root directory of 3/66.
fsck will NOT fix this problem. In hope defrag will reorganize directories
and clean trash, i tried to defrag. Nothing new, panic again. Luckily, i
solved my problem with debugfs, and i am posting recipe here in hope it will
help in similar situtaion, and this posting will prompt someone to look at
fsck source. :)
Recipe :)
This problem has two flawors, one when directory with problem is /, and
one when it is not /. Second case is easy:
mkdir new-dir
mv old-dir/* new-dir
mv old-dir/.* new-dir
rmdir old-dir
mv new-dir old-dir
In first case, mount /dev/hdb2 on /mnt, move all entries except mnt and
lost+found from /mnt to /mnt/mnt, umount /dev/hdb2 and with
debugfs -w /dev/hdb2
clri /
clear root inode. Now, start fsck -f on this partition, and answer
questions. After first fsck, start another one, and when second fsck ends,
reboot from main parititon.
EOR :)
dragisha