Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3178

NSA325 - kernel panic, Cannot open root device "(null)" (powerloss while initial install) (no replies)

$
0
0
Hello,
I tried to do the initial install of the NSA325 with linux-4.12.1-kirkwood-tld and rootfs.
I head a powerloss before the reboot.

Status:
Since there is a lot of awesome information in this forum (thank you guys, thank you bodhi) I got it nearly working.
Booted with kwboot, restored Environment with uboot.2016.05-tld-1.environment.src and adjusted it to my environment.
USB Stick is an ext3 Corsair Survivor 16GB (USB3) labeled as rootfs (I tried also with a noname usb2.0 8GB stick).

Problem:
While booting debian it gives a kernel panic and is not finding root ?!
I think the relevant output is:
...
[    5.978414] ata2: SATA link down (SStatus 0 SControl F300)
[    5.994171] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    6.001726] Please append a correct "root=" boot option; here are the available partitions:
[    6.010185] 1f00            1024 mtdblock0
[    6.010189]  (driver?)
[    6.016749] 1f01             512 mtdblock1
[    6.016751]  (driver?)
[    6.023404] 1f02             512 mtdblock2
[    6.023408]  (driver?)
[    6.029991] 1f03             512 mtdblock3
[    6.029994]  (driver?)
[    6.036560] 1f04           10240 mtdblock4
[    6.036563]  (driver?)
[    6.043146] 1f05           10240 mtdblock5
[    6.043149]  (driver?)
[    6.049724] 1f06           48896 mtdblock6
[    6.049727]  (driver?)
[    6.056294] 1f07           10240 mtdblock7
[    6.056296]  (driver?)
[    6.062870] 1f08           48896 mtdblock8
[    6.062873]  (driver?)
[    6.069450] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    6.077746] CPU: 0 PID: 1 Comm: swapper Not tainted 4.12.1-kirkwood-tld-1 #1
[    6.084824] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[    6.091137] [<c010ea54>] (unwind_backtrace) from [<c010ab48>] (show_stack+0x10/0x14)
[    6.098919] [<c010ab48>] (show_stack) from [<c01dba9c>] (panic+0xb0/0x250)
[    6.105831] [<c01dba9c>] (panic) from [<c0c01274>] (mount_block_root+0x204/0x27c)
[    6.113343] [<c0c01274>] (mount_block_root) from [<c0c013d8>] (mount_root+0xec/0x118)
[    6.121209] [<c0c013d8>] (mount_root) from [<c0c01528>] (prepare_namespace+0x124/0x184)
[    6.129249] [<c0c01528>] (prepare_namespace) from [<c0c00e90>] (kernel_init_freeable+0x210/0x260)
[    6.138166] [<c0c00e90>] (kernel_init_freeable) from [<c0833200>] (kernel_init+0x8/0x10c)
[    6.146385] [<c0833200>] (kernel_init) from [<c01070f0>] (ret_from_fork+0x14/0x24)
[    6.153992] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    6.163114] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    6.369633] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    6.376371] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    6.398109] usb 1-1: Product: USB2.0 Hub
[    6.408637] hub 1-1:1.0: USB hub found
[    6.418117] hub 1-1:1.0: 4 ports detected
[    6.748113] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[    6.919382] usb 1-1.2: New USB device found, idVendor=1b1c, idProduct=1a04
[    6.926299] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    6.948109] usb 1-1.2: Product: Survivor 3.0
[    6.952403] usb 1-1.2: Manufacturer: Corsair
[    6.956685] usb 1-1.2: SerialNumber: 09020000001181700000001705
[    6.978782] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[    6.998286] scsi host2: usb-storage 1-1.2:1.0
[    8.018707] scsi 2:0:0:0: Direct-Access     Corsair  Survivor 3.0     1.00 PQ: 0 ANSI: 5
[    8.039543] sd 2:0:0:0: [sda] 31375360 512-byte logical blocks: (16.1 GB/15.0 GiB)
[    8.058137] sd 2:0:0:0: [sda] Write Protect is off
[    8.062971] sd 2:0:0:0: [sda] Mode Sense: 23 00 02 00
[    8.078132] sd 2:0:0:0: [sda] Write cache: disabled, read cache: disabled, doesn't support DPO or FUA
[    8.101240]  sda: sda1
[    8.105779] sd 2:0:0:0: [sda] Attached SCSI removable disk
... waiting some time...
[ 113.768638] random: crng init done
... nothing happens anymore ...

Printenv:

printenv
arcNumber=2097
baudrate=115200
bootargs_stock=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_linux=setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
console=console=ttyS0,115200
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa325.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
fileaddr=800000
filesize=ca0
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
machid=0x831
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
to_linux=setenv mainlineLinux yes; setenv bootcmd \\'run bootcmd_linux\\'; saveenv; reset
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Previous to the powerloss I mad a backup of /fw_env.config and proc_mtd:
# cat /backup/etc-fw_env.config 
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
# NAND example
/dev/mtd1               0x0000          0x20000         0x20000                 4

# cat /vb_backup/proc_mtd 
dev:    size   erasesize  name
mtd0: 00100000 00020000 "uboot"
mtd1: 00080000 00020000 "uboot_env"
mtd2: 00080000 00020000 "key_store"
mtd3: 00080000 00020000 "info"
mtd4: 00a00000 00020000 "etc"
mtd5: 00a00000 00020000 "kernel_1"
mtd6: 02fc0000 00020000 "rootfs1"
mtd7: 00a00000 00020000 "kernel_2"
mtd8: 02fc0000 00020000 "rootfs2"


now I see, that I didn't change the arc number after restoring the environment. Could that be the problem?
I tried many different thing. I don't know, why it cant find "root"


Thank you for every hint that leads me in the right direction

Viewing all articles
Browse latest Browse all 3178

Trending Articles