Kernel panic when net booting OpenBMC
Nirenjan Krishnan
nkrishnan at nvidia.com
Sat Oct 17 05:56:44 AEDT 2020
Hi Deepak,
> It seems like the rootfs can't be found. The fitImage based approach usually works well for me. Can you elaborate what you did with the fitImage
> based approach? I typically do this (on an AST2500) :
> 1) Add IMAGE_FSTYPES += "cpio.${INITRAMFS_CTYPE}.u-boot" to the conf
> 2) Copy fitImage and obmc-phosphor-image-<platform>.cpio.lzma.u-boot to the tftp server.
> 3) Setup the tftp server and the BMC network
> 4) tftp 0x83000000 fitImage
> 5) tftp 0x93000000 initrd (in step 2 I had named the cpio image as initrd on the tftp server). At this stage 'iminfo' should show what images have > been loaded.
> 6) bootm 0x83000000 0x93000000
I have added the CPIO image to local.conf, but I don't see an obmc-phosphor-image-<platform>.cpio.*.u-boot, only obmc-phosphor-initramfs-<platform>.cpio.xz.u-boot. I figured this might be what you intended, but that doesn't work either. Perhaps it's an issue with the load address and entry point? Both show as 00000000 on the generated CPIO image, but if I look at the initramfs section of the fitImage, then these addresses are "unavailable".
When I use the corresponding initramfs.cpio directly, the system hangs at Loading kernel, I don't see any output on the console after this. If I change the initramfs load address and entry point to an address inside DRAM, then it starts the kernel, but then I get a kernel panic as shown below.
[ 1.248074] /dev/root: Can't open blockdev
[ 1.248634] VFS: Cannot open root device "ram" or unknown-block(1,0): error -6
[ 1.249139] Please append a correct "root=" boot option; here are the available partitions:
[ 1.250056] 1f00 32768 mtdblock0
[ 1.250094] (driver?)
[ 1.250626] 1f01 384 mtdblock1
[ 1.250633] (driver?)
[ 1.251036] 1f02 128 mtdblock2
[ 1.251042] (driver?)
[ 1.251509] 1f03 4352 mtdblock3
[ 1.251515] (driver?)
[ 1.251978] 1f04 23808 mtdblock4
[ 1.251983] (driver?)
[ 1.252450] 1f05 4096 mtdblock5
[ 1.252456] (driver?)
[ 1.252938] 1f06 32768 mtdblock6
[ 1.252944] (driver?)
[ 1.253585] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
One observation that I had is that by using the initramfs that is integrated into the fitImage, I'm able to boot into an initrd shell by appending the following to bootargs - debug-init-sh enable-initrd-debug-sh.
Based on that shell, it appears that the initrd does not pick up the kernel IP configuration, which is perhaps why the NFS mount is failing. Is there a standard location for the init script that is built into the initramfs?
Thanks and regards
Nirenjan Krishnan
More information about the openbmc
mailing list