[SOLVED] Init isn't running - no output - how to debug?
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I created LFS on one system and then transported the entire filesystem over to another system. On the target system, I booted from a LiveCD and used it to install grub and edit fstab, the grub.cfg file, and so on.
Upon booting, the kernel loads fine, but init never responds. The last messages on the console are from the kernel, representing devices attached and detected by the kernel. Typing on the kernel does not produce anything, however the system is not frozen or panicked - I can shift-pageup to view the message history. The system basically hangs here and nothing happens.
When I booted with init=/bin/bash as a parameter bash ran fine and I was able to remount the root filesystem rw and so on, and poke around. However, I can't seem to actually get init to do anything.
Are there any options I can setup so that init will verbosely print out what it's trying to do? I can't really debug this further until I can see why init won't proceed...
/dev/sda5 is the root filesystem, while /boot is on /dev/sda1. Again, the kernel does boot successfully (as I'm able to force a shell with init=/bin/bash). The problem seems to be init.
Another point worth making is that if I run /bin/bash via init= then try to do "exec /sbin/init", the system accesses the hard drive for a while without any console output from either the kernel or init, then powers off.
But, somehow, my kernel didn't get compiled with devtmpfs. Therefore my /dev directory is completely empty...
Quote:
Originally Posted by linosaurusroot
/dev needs null zero and console
As linosaurusroot said. And an LFS system never has an empty /dev folder, even when it's not running. Section 6.2.1 (Creating Initial Device Nodes) of the 7.3 book has us create /dev/null and /dev/console on the hard drive.
Maybe their absence has something to do with your method of cloning the system to the new partition.
P.S.: CONFIG_DEVTMPFS=y is also required for LFS nowadays, as you said. So I wonder if the original system was ever booted before it was cloned. I sort of assumed that it was a working system, but you never really said that either. And it never would have booted without devtmpfs filesystem support built in.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.