LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Linux halts soon after mounting root filesystem (https://www.linuxquestions.org/questions/linux-software-2/linux-halts-soon-after-mounting-root-filesystem-4175519062/)

dhowey 09-16-2014 11:40 AM

Linux halts soon after mounting root filesystem
 
Hello, all,

I am trying to get my own Linux running on a powerpc dev board. I have a working kernel from the manufacturer of the board. I'm trying to replace the stock BSP/rootfs with one that I built from Yocto Linux. I've followed the instructions to build and install the Yocto root filesystem to an SD card and I think I've done that correctly. Linux is able to detect and mount the partition as root, however the system powers down and halts a few seconds after mounting. Below is a snippet from the output to the console.

Code:

Waiting for root device /dev/mmcblk0p1...
mmc0: new high speed SDHC card at address e624
mmcblk0: mmc0:e624 SU04G 3.69 GiB
 mmcblk0: p1
kjournald starting.  Commit interval 5 seconds
EXT3-fs (mmcblk0p1): using internal journal
EXT3-fs (mmcblk0p1): mounted filesystem with writeback data mode
VFS: Mounted root (ext3 filesystem) on device 179:1.
Freeing unused kernel memory: 188k init
Power down.
System Halted, OK to turn off power

There are a few seconds between the kernel memory message and the power down message.

I've tried setting the runlevel in inittab to both 3 and 1, but the same error happens. I've also tried putting echo messages in the rc scripts that should be called by init, but they don't appear in the console. I've also tried specifying the rootfs in the fstab by the partition's UUID and commenting out everything altogether in fstab but the issues remains.

Does anyone have any idea how I can debug this issue? I've tried passing "ignore_loglevel" and "debug" to my kernel command line but no extra messages are printed. I'm not sure where to proceed from here. Thanks.

P.S. Here is what I'm passing to the kernel command line:

Code:

root=/dev/mmcblk0p1 rw rootfstype=ext3 rootwait mem=248M console=ttyS0,115200 ignore_loglevel

linosaurusroot 09-17-2014 06:51 AM

Do you have valid /dev/console, /dev/null, /dev/zero, /sbin/init on this root fs ?

What's the next message seen when you use the stock BSP/rootfs - that will be a clue on what it's trying next.

dhowey 09-17-2014 09:54 AM

Hello, linosaurusroot,

It turns out there was no /dev/console or /dev/zero in my filesystem. After I added these files, init started and I was able to progress farther into the boot process. Now the system is complaining about the fstab, but I think I should be able to troubleshoot this on my own.

As a reference, I created /dev/console and /dev/zero with these commands:

Code:

mknod -m 622 /dev/console c 5 1
mknod -m 666 /dev/zero c 1 5

Thanks!


All times are GMT -5. The time now is 02:22 AM.