[SOLVED] NSA320 - boot issues (kernel panic)

Install Arch Linux ARM on other devices.

[SOLVED] NSA320 - boot issues (kernel panic)

Postby chessplayer » Wed May 15, 2013 5:13 pm

Hi,

the NSA320 won't boot ALARM from USB key.

My situation is as follows:

I can boot Debian both from USB key as well as from SATA (and even the rescue system). To that extent, I installed a new uBoot following this post in the Doozan forum. I then modified the uBoot-env to support a separate boot partition and for USB to take precedence over SATA. As mentioned, everything is ok for Debian Squeeze.

However, when trying to boot the latest ALARM uImage (downloaded on May 15th, 2013), this is what happens:

$this->bbcode_second_pass_code('', '
U-Boot 2011.12 (May 03 2012 - 17:04:23)
ZyXEL NSA320 2-Bay Power Media Server
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot: 0
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 3 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
stopping USB..
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 3 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1 bytes read
Found bootable drive on usb 0:1
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
2869736 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
** File not found /boot/uInitrd
## Booting kernel from Legacy Image at 00800000 ...
Image Name: Linux-3.1.10-16-ARCH
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2869672 Bytes = 2.7 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...
')

So, as it should be. But then:

$this->bbcode_second_pass_code('', '
Uncompressing Linux... done, booting the kernel.
[ 22.351827] sd 2:0:0:0: [sda] Asking for cache data failed
[ 22.357343] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 22.365825] sd 2:0:0:0: [sda] Asking for cache data failed
[ 22.371509] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 22.515201] sd 2:0:0:0: [sda] Asking for cache data failed
[ 22.520737] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 30.499196] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 30.507530] [<c000d290>] (unwind_backtrace+0x0/0xe0) from [<c03cc914>] (panic+0x58/0x198)
[ 30.515787] [<c03cc914>] (panic+0x58/0x198) from [<c052fc2c>] (mount_block_root+0x230/0x280)
[ 30.524296] [<c052fc2c>] (mount_block_root+0x230/0x280) from [<c052ff3c>] (prepare_namespace+0x160/0x1c0)
[ 30.533935] [<c052ff3c>] (prepare_namespace+0x160/0x1c0) from [<c052f8c8>] (kernel_init+0x11c/0x14c)
[ 30.543134] [<c052f8c8>] (kernel_init+0x11c/0x14c) from [<c000945c>] (kernel_thread_exit+0x0/0x8)
')

This happens with various USB keys, even ones which have no problem booting Debian.

What could be the problem and how could this be resolved?
Last edited by chessplayer on Fri May 17, 2013 9:47 am, edited 1 time in total.
chessplayer
 
Posts: 4
Joined: Fri Mar 15, 2013 7:23 pm

Re: NSA320 - boot issues (kernel panic)

Postby WarheadsSE » Wed May 15, 2013 6:26 pm

Check your bootargs. You boot log excludes those.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: NSA320 - boot issues (kernel panic)

Postby chessplayer » Wed May 15, 2013 6:41 pm

Here is the relevant part of the uBoot-env. Please note that usb_load_image and usb_root are NOT used anymore (they are leftovers from the original environment by davygravy), Furthermore, there are no usb_custom_params defined:

$this->bbcode_second_pass_code('', '
bootcmd=usb start; usb stop; usb start; run usb_bootcmd; usb stop; run ide_bootcmd; run rescue_bootcmd; reset
usb_load_uimage=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage
usb_root=LABEL=USBROOT
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=run usb_scan
usb_rootdelay=10
usb_rootfstype=ext4
usb_root_label=USB-Root
usb_scan_1=usb=0:1 dev=sda2
usb_scan_2=usb=1:1 dev=sdb2
usb_scan_3=usb=2:1 dev=sdc2
usb_scan_4=usb=3:1 dev=sdd2
usb_scan_list=1 2 3 4
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_set_bootargs=setenv bootargs console=$console root=LABEL=$usb_root_label rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
')

Anything suspicious?
chessplayer
 
Posts: 4
Joined: Fri Mar 15, 2013 7:23 pm

Re: NSA320 - boot issues (kernel panic)

Postby WarheadsSE » Wed May 15, 2013 8:32 pm

Bootargs
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: NSA320 - boot issues (kernel panic)

Postby chessplayer » Wed May 15, 2013 9:13 pm

How do I see those? :?:

other than in the following line, I mean:

$this->bbcode_second_pass_code('', '
usb_set_bootargs=setenv bootargs console=$console root=LABEL=$usb_root_label rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
')

Substituting the values for the variables, this is what I would get:

$this->bbcode_second_pass_code('', '
console=ttyS0,115200 root=LABEL=USB-Root rootdelay=10 rootfstype=ext4 mtdparts=orion_nand:1M(u-boot),512K(uboot_env),512K(key_store),512K(info),10M(etc),10M(kernel_1),48896K(rootfs1),10M(kernel_2),-(rootfs2)
')

Is this what you are looking for?

addition: I have inserted a 'print bootargs' after the 'run usb_set_bootargs' in usb_bootcmd and the output is exactly the line shown above.
chessplayer
 
Posts: 4
Joined: Fri Mar 15, 2013 7:23 pm

Re: NSA320 - boot issues (kernel panic)

Postby WarheadsSE » Wed May 15, 2013 10:06 pm

There is your problem.
$this->bbcode_second_pass_code('', 'root=LABEL')
This assumes you are using an initrd
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: NSA320 - boot issues (kernel panic)

Postby chessplayer » Wed May 15, 2013 11:36 pm

WarheadsSE,

thanks a lot! So, now my bootargs for USB are set as follows:

$this->bbcode_second_pass_code('', '
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
')

This works and ALARM boots just fine! Thanks again for your help. 8-)
chessplayer
 
Posts: 4
Joined: Fri Mar 15, 2013 7:23 pm


Return to [Please read announcement] Community-Supported Devices

Who is online

Users browsing this forum: No registered users and 12 guests