ZyXEL NSA320 booted from USB...once!

Install Arch Linux ARM on other devices.

ZyXEL NSA320 booted from USB...once!

Postby CharlesB » Fri Sep 14, 2012 4:38 am

I flashed my $30 PogoPlug fine, but I killed my $90 NSA-320 the first time I turned it on... :cry:
It looks like support for this device is very new (it doesn't show up in the platform drop-down menu, and the boot files are dated about a week ago), but I'm hoping for some guidance.

I followed the very simple install instructions here (put 4 boot files + rootfs.tgz on a FAT16 USB drive & boot it).

I turned the unit on, watched as all LEDs lit for a few seconds, then only the system LED, then obvious activity on the hard drive and the USB key for a while. Eventually everything calmed down, and we were back to just a solid system LED as the instructions suggest. I left it like that for about 20 minutes to make sure it wasn't going to do anything else.

My DHCP server showed no new leases. Thinking that the unit may need to reboot, I tried the power button (short, medium, long hold times) with no results. Eventually, I pulled the plug on it.

Now, every time I turn it on, after the initial POST (all LEDs on), I get a solid system LED and nothing else. Ever. It doesn't make a difference whether I have a USB drive plugged in or not.

I Yanked the hard drive and verified that it was still unpartitioned; it looks like it mangled the NAND and didn't do much else.

Suggestions?

If I'm understanding various things I've read, it's likely that this device may boot from the internal NAND (apparently no longer an option) or from a hard drive, but can't boot USB without a "helper" on one of the other two. Correct? What about directly preparing a hard drive? I suppose I ought to be able to use an ARM emulator (e.g. Qemu) to create a disk image that I can then move to the physical hard drive, but I don't know how closely I need to configure the virtual hardware to that of the real thing, or anything else. I'm 100% green when it comes to ARM, and am not much better when it comes to custom Linux builds (Been using Linux since '95, but am not a kernel hacker).

I also tore the device apart and noted serial header mentioned here, but I lack both experience and a device to connect to it, and don't know that it would even do me any good unless I can at least start the boot process. Yup, green there too. :roll: groan I already have too many projects started -- this one was supposed to go smoothly and save me time. 'Tis the risks...

Any advice would be appreciated. A working hard drive image would REALLY be appreciated! :D
CharlesB
 
Posts: 34
Joined: Fri Sep 14, 2012 3:53 am

Re: ZyXEL NSA320 booted from USB...once!

Postby WarheadsSE » Fri Sep 14, 2012 2:46 pm

Did you follow step 5?
"Place HDD in left slot, USB key into front USB port, power on the device."

You don't need to use a qemu to make a disk! It's just a linux filesystem. Ext2 16MB first partition, your choice for the second partition, ext3/4. Then copy the uImage to the first partition.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: ZyXEL NSA320 booted from USB...once!

Postby CharlesB » Sat Sep 15, 2012 8:22 pm

$this->bbcode_second_pass_quote('WarheadsSE', 'D')id you follow step 5?
"Place HDD in left slot, USB key into front USB port, power on the device."


Yes; and after several minutes (I didn't really pay attention to the time) of both the HDD1 and USB lights, I was rather surprised when there appeared to be no change to the drive.

$this->bbcode_second_pass_quote('WarheadsSE', 'Y')ou don't need to use a qemu to make a disk! It's just a linux filesystem. Ext2 16MB first partition, your choice for the second partition, ext3/4. Then copy the uImage to the first partition.


Ooh, sounds too easy! I was picturing doing an Arch install from scratch, which (I assume) I'd need to do running on ARM, not x86. I didn't realize that the tgz contained a complete ready-to-use filesystem!

Okay, I created a gpt partition table (it's a 3GB drive), created/formated the two partitions, extracted the entire contents of ArchLinuxARM-armv5te-latest.tar.gz to the 2nd one, then moved the uImage file from /boot to the 1st partition.
That leaves me lacking only a bootloader. (I assume that ARM needs something in the MBR, anyway.) Just for grins, I put the prepared drive in and turned it on. This time, the initial "all lights on" condition never went away (I left it on for over 5 minutes).

Hey, wait, it does that now even without a hard drive in there! I assume that those lights should be going off before it even tries to boot from a device (NAND or hard drive), so even if I had corrupt NAND that was crashing the machine, the lights should go off. [groan] This is starting to smell less like an install problem and more like a hardware problem. Your opinion?
CharlesB
 
Posts: 34
Joined: Fri Sep 14, 2012 3:53 am

Re: ZyXEL NSA320 booted from USB...once!

Postby WarheadsSE » Sun Sep 16, 2012 7:23 pm

Uboot doesn't support GPT, so you'd want to setup a Hybrid MBR to make uboot happy.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: ZyXEL NSA320 booted from USB...once!

Postby CharlesB » Sun Sep 16, 2012 8:54 pm

$this->bbcode_second_pass_quote('', 'U')boot doesn't support GPT


Good to know! (I actually wondered, and tried a smaller conventional layout at one point) I'll keep that in mind for when I get the unit working again (or replaced). :( Any hints as to how I might resurrect it? (Still just keeps all the lights on indefinitely after powering up.)
CharlesB
 
Posts: 34
Joined: Fri Sep 14, 2012 3:53 am
Top

Re: ZyXEL NSA320 booted from USB...once!

Postby WarheadsSE » Sun Sep 16, 2012 9:14 pm

I don't think you need it replaced just yet ...

MBR or Hybrid MBR
1- Ext2, 16MB, /uImage must exist
2- Ext3/4 .. something built into the kernel, I'd suggest at least 2GB (in case you botch a config), rootfs extracted here.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: ZyXEL NSA320 booted from USB...once!

Postby CharlesB » Sun Sep 16, 2012 11:32 pm

$this->bbcode_second_pass_quote('WarheadsSE', 'I') don't think you need it replaced just yet ...

I hope not! The lights do concern me, though. Does the motherboard not turn those off after POST, or do they stay on until it finds something to boot?

$this->bbcode_second_pass_quote('WarheadsSE', '
')MBR or Hybrid MBR
1- Ext2, 16MB, /uImage must exist
2- Ext3/4 .. something built into the kernel, I'd suggest at least 2GB (in case you botch a config), rootfs extracted here.


Right, I did that already, but to no avail. (I used GParted to create MSDOS-type table, specified 16MiB for the 1st partition [ext2], roughly 1GB for the 2nd [ext4].) Here's what the disk looks like:
$this->bbcode_second_pass_code('', '$ fdisk -l /dev/sdg
Note: sector size is 4096 (not 512)

Disk /dev/sdg: 3000.6 GB, 3000592977920 bytes
255 heads, 63 sectors/track, 45600 cylinders
Units = cylinders of 16065 * 4096 = 65802240 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0008fe14

Device Boot Start End Blocks Id System
/dev/sdg1 1 1 16384 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sdg2 1 15936 1024000000 83 Linux


$ parted /dev/sdg print
WARNING: You are not superuser. Watch out for permissions.
Model: Seagate GoFlex Desk (scsi)
Disk /dev/sdg: 3001GB
Sector size (logical/physical): 4096B/4096B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 17.8MB 16.8MB primary
2 17.8MB 1049GB 1049GB primary


$ ls /media/boot
lost+found uImage


$ ls /media/prim
bin dev home lost+found mnt proc run srv tmp var
boot etc lib media opt root sbin sys usr
$
')
Thanks for your continued help on this. See anything that sticks out?
CharlesB
 
Posts: 34
Joined: Fri Sep 14, 2012 3:53 am
Top

Re: ZyXEL NSA320 booted from USB...once!

Postby WarheadsSE » Mon Sep 17, 2012 1:18 am

Nothing really sticks out, unless this uboot (the boot loader) doesn't like 4K sectors. And the lights stay on like that until it proceeds to leave uboot by booting the kernel. So, it's having an issue finding a kernel at this point.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: ZyXEL NSA320 booted from USB...once!

Postby CharlesB » Mon Sep 17, 2012 1:44 am

$this->bbcode_second_pass_quote('WarheadsSE', 't')he lights stay on like that until it proceeds to leave uboot by booting the kernel.

That's really good to know.

$this->bbcode_second_pass_quote('WarheadsSE', 'i')t's having an issue finding a kernel at this point.

Does there need to be some executable code in the MBR like on an x86 system, or does the board actually have enough built-in smarts to be able to find the 1st partition and read the filesystem by itself? I haven't done anything to the MBR except create the partition table.
CharlesB
 
Posts: 34
Joined: Fri Sep 14, 2012 3:53 am
Top

Re: ZyXEL NSA320 booted from USB...once!

Postby WarheadsSE » Mon Sep 17, 2012 1:47 am

The board loads uboot from NAND, and it goes from there. Mind you, the method outlined on the page for it does not replace the uboot in NAND with a newer version of any kind, and merely points it at the 1st sata drive to look for /uImage on an ext2 partition.

If you are unable to get it to work, or to try a smaller disk (in the event the 4K sectors are messing with it) then you can very easily hook up to the board with a 3.3v TTL/RS232 serial. (that 3.3v is very important)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Next

Return to [Please read announcement] Community-Supported Devices

Who is online

Users browsing this forum: No registered users and 2 guests