LFS kernel panic/boot problem
Hi
After successfully building lfs stable 7.4 using jhalfs I run into problems when rebooting. I get kernel panic - no init found. When I try to boot manually using the GRUB command line, I can see the root folder structure and the kernel image is where it is supposed to be. However, /dev only contains console and null. sda1 is not there for some reason. I have read a lot of threads describing similar problems, but I could not find a solution. It looks as if the kernel was missing a driver. But I did the kernel config using essentially default settings. A large number of drivers is compiled into the kernel (not as a module). In particular, ext4 is there. I really don't know what to look for... Any ideas? I did do chapter 8 manually, grub install went through ok... Code:
# Begin /boot/grub/grub.cfg Code:
# /etc/fstab |
I'm not sure this is a grub problem.
Have you double checked the /etc/inittab file for correctness and the presence of /sbin/init? |
Hi druuna
Thanks for your reply. Hm, I installed mingetty and changed /etc/inittab accordingly (in order to get auto login). However, now I have overwritten the file with the original from the book and reinstalld the lfs-bootscripts. It still doesn't work (same message). What do you mean by /sbin/init, exactly? Because the book version does not contain this line: http://www.linuxfromscratch.org/lfs/...r07/usage.html |
The init command itself is installed here: 6.59. Sysvinit-2.88dsf
Can you post the exact error message (or a screen-shot) with +/- 10 lines leading up to the error? |
I tried again, this time I reinstalled Sysvinit-2.88dsf, then the bootscripts. Still the same.
Here is the screenshot: http://postimg.org/image/atxeznalb/ Unfortunately, that's all the console shows. I'm on a virtual box right now, but the error also appears on an physical machine. |
Looking at the output posted you can see that sda1 (device 8:1) can be mounted, grub seems to be doing its part.
That leaves the following: - /sbin/init - /etc/inittab - /etc/rc.d/* I would concentrate on the last 2. - There's either a mistake in /etc/inittab. - One (or more) files in /etc/rc.d is missing or incorrect. |
Hm...
/sbin/init is in place. So are the contents of /etc/rc.d. I checked the files from appendix D, i.e. the files from the bootscripts, and they are all there. /etc/inittab is a copy/paste from the book so it should be correct. I really don't know what to look for. I'm sure it's something very simple... |
Quote:
Quote:
Quote:
|
Quote:
Code:
root:/# ls sbin/ |grep init Quote:
Quote:
Code:
root:/# cat etc/inittab |
The output shown looks correct.
BTW: You might be able to use SHIFT-PAGEUP in the console to see some more lines, which might tell us more. |
I'm on the physical machine now. Shift-Pageup does not work but I can see a little mor due to higher resolution. Right before the EXT4 message two error messages failing to mount ext2 and ext3 appear. Before this there is only a long list of drivers being loaded. No errors or warnings. Looks reasonable to me.
From looking at inittab and /etc/rc.d I can't find anything wrong. But maybe I don't know what to look for exactly. I think the best thing for me to do is to rebuild the whole system, sticking to the book as closely as possible. Then try to reboot again and see if it works... |
Ok, I restarted where jhalfs finished, i.e. at the end of chapter 6. Then I sticked as closely to the book as possible. Now I get a different error message (this time from the virtual box, where shift+page up works):
http://postimg.org/image/fzc6j8asd/ http://postimg.org/image/u68kevm4b/ I will try this on a physical machine to see if it has something to do with virtualbox. |
I don't see any virtual box related errors.
The errors I do see indicate possible missing or wrong entries in /etc/fstab. It should look something like this (looks different then the one in your first post): Code:
# Begin /etc/fstab Also have a look at /etc/rc.d/init.d/mountvirtfs to determine what is done. |
Right! My /etc/fstab is bad.
The test system I created booted perfectly with the corrected file. The other system still does not boot. The reason is the kernel config. It can't mount the root file system. I suspect it misses some driver, but I have yet to find which. My system does not have any modules, but a lot of drivers compiled into the kernel. I don't know how I could have missed such an important part. But I will simply compare the config files to find out where the problem lies. The other system does boot with a defconfig kernel... I will post back when I have the solution. Thanks so far, druuna! |
You've talked about and been using different machines and different configurations.
To stay on the right track can you post the error(s) shown (as much as possible, like post #12) from the machine you are having problems with? First thing that comes to mind without seeing any errors: This one needs to be selected Device Drivers -> Generic Driver Options -> Maintain a devtmpfs filesystem to mount at /dev |
All times are GMT -5. The time now is 03:41 PM. |