Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

Kernel panic--Unable to mount root fs

First I just test the flow of build uclinux is right or not. So I config the uclinux kernel without:

1. network

2. pio

3. loadable module

I builde the kernel sucessfully, and "run it as hardware" in SDRAM directly.

But the last line tells "kernel panic". I am newbie in uclinux ,I don't know much about "VFS, root fs" and how to build kernal in custom board, how to tell the hardware name and address to the kernal?

uClinux/Nios II
Altera Nios II support (C) 2004 Microtronix Datacom Ltd.
Built 1 zonelists
Kernel command line: root=/dev/mtdblock0 ro
PID hash table entries: 128 (order: 7, 2048 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 15240k/16384k RAM, 0k/0k ROM (777k kernel code, 171k data)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Linux NoNET1.0 for Linux 2.6
Serial: JTAG UART driver $Revision: 1.4 $
ttyJ0 at MMIO 0x82000868 (irq = 2) is a jtag_uart
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Altera NDK flash (AMD): Found 1 x16 devices at 0x0 in 8-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
Altera NDK flash (AMD): CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
RedBoot partition parsing not available
Using Altera NDK partition definition
Creating 4 MTD partitions on "Altera NDK flash (AMD)":
0x00200000-0x00600000 : "romfs/jffs2"
0x00000000-0x00200000 : "loader/kernel"
0x00600000-0x00700000 : "User configuration"
0x00700000-0x00800000 : "safe configuration"
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,0)

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You need to create the "rootfs" in Eclipse IDE as well...just select new->project and choose uclinux filesystem instead of kernel and add the applications you want...make a build...and do an upload to the flash memory...

    From the kernel messages you see where the rootfs is stored in flash:

    0x00200000-0x00600000 : "romfs/jffs2"

    And please read the startup guide supplied during installation of uclinux...gives a quick overview how to build kernel/filesystem and install them...

    rick
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you, Rick.

    Yes, I feel happy that uclinux runs when I just upload the root fs.

    Thanks to microtronix, they do lots of hard works for us. They have done the excellent job.