@kao
I guess I know your situation pretty well. I was also rather skeptical of my skills and getting all this to work; just check my first post on page 4... And to be honest, the information in this thread is anything but easily accessible. In the this post, I'll try to outline the steps to get NSA325v2 to run Debian. In the end it's not as complicated as it first looks :)
DISCLAIMER - I already did this to my NSA325v2 a while ago so I couldn't confirm whether the procedure works as a "fresh install". However, I tried to recall everything I had problems with and cover them as well I could. Furthermore, I am by no means an expert with these things so I take no responsibility if you manage to break something due to an error in this "guide".
If anyone spots any errors in my post, please point it out so I can fix it, thanks :)
1. Prerequisites
The USB-to-UART adapter is a must. As I found out here the serial header on the NSA325v2 is a 3.3 volt one. This means you risk damaging it if you interface it with an adapter with 5 V logic levels. The only way to make sure an adapter is compatible is to check the datasheet of the main chip. Personally I bought one with the CP2102 chipset from Ebay.
My perception is that you cannot (or no easy way exists to) install a custom OS onto the SATA-drives if you want to have them configured as a RAID array. Therefore, you need a USB-drive from which Debian will boot. In this thread, there has been discussion about incompatibility of certain brands so I bought a SanDisk Cruzer Fit 16 GB as recommended.
2. Preparations
I - Serial connection
Open the casing and install the ribbon cable. You'll need some small Phillips screwdrivers. After undoing the two screws on the bottom side you'll need to carefully bend the larger half of the casing to slide it past the HDD rack. Disassembling the rest is quite straightforward.
In order to have access to the serial console even after reassembling the casing I routed the cables out of the back next to the USB ports. This required a bit of deforming the USB port shielding with pliers. If you have a longer cable I'd suggest using the other openings eg. the one for Kensington lock.
Pay attention to the header pinout. I assume at least RX, TX and GND have to be connected. I have 3V3 as well. RX and TX need to be cross-connected with each other - assuming the silkscreen on your USB adapter is correct. The first thing to check - if you see no output in the serial console - is this!
Ensure you have the necessary drivers installed for the adapter and some piece of software with which to communicate over the serial connection. At least the newer Linux kernels are likely to ship with drivers for any common USB-to-TTL chips but on Windows you probably have to find and install them yourself.
On Linux you can check if the system recognises your adapter by looking for something like 'ttyUSB0' in the '/dev' directory while plugging the device in and out.
Personally I use a program called 'screen' on a Debian desktop terminal emulator. I've read somewhere that on Windows, Putty should work after configuring the serial ports correctly.
II - USB drives
Follow the procedure described by Buttzy in the first post of this thread:
On your OS drive (in my case it's the Cruzer Fit) create two partitions of which the first must be ext2, flagged as bootable, and labelled "boot". It'll only hold the boot files so 100 MiB should be enough. The second, main partition must be labelled "rootfs" and can be formatted as whatever(?*) file system you want - I use ext4.
Download and extract Bodhi's latest rootfs (not kernel!) to the main partition according to the guidelines given in the corresponding thread. Then copy(?**) the contents of the '/boot' directory to the root of the first partition.
On a separate USB-stick (formatted as fat32) extract the files from 'usb-debian-uboot.tar.gz' aquired from the first post.
3. Box configuration
Insert the fat32-formatted USB drive into one of the USB-ports on the back*** of the NSA325.
Plug in your USB-TTL adapter and open the serial connection. Personally I do this on Linux by opening a terminal emulator and issuing
Now power up the box and watch for a message like "Press any key to to stop auto-boot" in the serial console. As it appears press a key and you should get the U-boot command prompt denoted by "Marvell>>". In the prompt type as Buttzy instructs:
Let the device reboot normally. It should reboot itself once again and write the new U-Boot configuration to the NAND. After this point it searches for USB-partitions to boot from at start-up. In order to switch between stock and custom OS supply commands "run to_stock" or "run to_linux" correspondingly in the U-Boot command prompt.
If the USB-drive containing Debian isn't plugged to the box - as it shouldn't be - you'll see a "Bad magic number" error message in the serial console and the device will reset itself. To stop the reboot loop enter the U-Boot prompt and power down the box by removing the power supply. Remove the utility USB-drive and insert the one containing your OS. Re-plugging the power should cause the device to start and if everything goes right it should now boot Debian.
You can log in through the serial console with the default credentials. From here you should probably go for configuring the network interfaces and SSH so you can drop the serial connection.
Good luck!
* This probably depends on the file system support of U-Boot.
** I'm not sure if it's necessary to leave the files on the "rootfs" partition but at least copying seems to work for me.
*** As someone pointed out earlier, the USB3 port in the front panel won't work.
I guess I know your situation pretty well. I was also rather skeptical of my skills and getting all this to work; just check my first post on page 4... And to be honest, the information in this thread is anything but easily accessible. In the this post, I'll try to outline the steps to get NSA325v2 to run Debian. In the end it's not as complicated as it first looks :)
DISCLAIMER - I already did this to my NSA325v2 a while ago so I couldn't confirm whether the procedure works as a "fresh install". However, I tried to recall everything I had problems with and cover them as well I could. Furthermore, I am by no means an expert with these things so I take no responsibility if you manage to break something due to an error in this "guide".
If anyone spots any errors in my post, please point it out so I can fix it, thanks :)
1. Prerequisites
The USB-to-UART adapter is a must. As I found out here the serial header on the NSA325v2 is a 3.3 volt one. This means you risk damaging it if you interface it with an adapter with 5 V logic levels. The only way to make sure an adapter is compatible is to check the datasheet of the main chip. Personally I bought one with the CP2102 chipset from Ebay.
My perception is that you cannot (or no easy way exists to) install a custom OS onto the SATA-drives if you want to have them configured as a RAID array. Therefore, you need a USB-drive from which Debian will boot. In this thread, there has been discussion about incompatibility of certain brands so I bought a SanDisk Cruzer Fit 16 GB as recommended.
2. Preparations
I - Serial connection
Open the casing and install the ribbon cable. You'll need some small Phillips screwdrivers. After undoing the two screws on the bottom side you'll need to carefully bend the larger half of the casing to slide it past the HDD rack. Disassembling the rest is quite straightforward.
In order to have access to the serial console even after reassembling the casing I routed the cables out of the back next to the USB ports. This required a bit of deforming the USB port shielding with pliers. If you have a longer cable I'd suggest using the other openings eg. the one for Kensington lock.
Pay attention to the header pinout. I assume at least RX, TX and GND have to be connected. I have 3V3 as well. RX and TX need to be cross-connected with each other - assuming the silkscreen on your USB adapter is correct. The first thing to check - if you see no output in the serial console - is this!
Ensure you have the necessary drivers installed for the adapter and some piece of software with which to communicate over the serial connection. At least the newer Linux kernels are likely to ship with drivers for any common USB-to-TTL chips but on Windows you probably have to find and install them yourself.
On Linux you can check if the system recognises your adapter by looking for something like 'ttyUSB0' in the '/dev' directory while plugging the device in and out.
Personally I use a program called 'screen' on a Debian desktop terminal emulator. I've read somewhere that on Windows, Putty should work after configuring the serial ports correctly.
II - USB drives
Follow the procedure described by Buttzy in the first post of this thread:
On your OS drive (in my case it's the Cruzer Fit) create two partitions of which the first must be ext2, flagged as bootable, and labelled "boot". It'll only hold the boot files so 100 MiB should be enough. The second, main partition must be labelled "rootfs" and can be formatted as whatever(?*) file system you want - I use ext4.
Download and extract Bodhi's latest rootfs (not kernel!) to the main partition according to the guidelines given in the corresponding thread. Then copy(?**) the contents of the '/boot' directory to the root of the first partition.
On a separate USB-stick (formatted as fat32) extract the files from 'usb-debian-uboot.tar.gz' aquired from the first post.
3. Box configuration
Insert the fat32-formatted USB drive into one of the USB-ports on the back*** of the NSA325.
Plug in your USB-TTL adapter and open the serial connection. Personally I do this on Linux by opening a terminal emulator and issuing
$ sudo screen /dev/ttyUSB0 115200where /dev/ttyUSB0 is the adapter device file and 115200 is the baud rate of the connection.
Now power up the box and watch for a message like "Press any key to to stop auto-boot" in the serial console. As it appears press a key and you should get the U-boot command prompt denoted by "Marvell>>". In the prompt type as Buttzy instructs:
Marvell>> resetenv Marvell>> reset < The device resets itself. Press a key to get into the U-Boot prompt again. > Marvell>> saveenv Marvell>> reset
Let the device reboot normally. It should reboot itself once again and write the new U-Boot configuration to the NAND. After this point it searches for USB-partitions to boot from at start-up. In order to switch between stock and custom OS supply commands "run to_stock" or "run to_linux" correspondingly in the U-Boot command prompt.
If the USB-drive containing Debian isn't plugged to the box - as it shouldn't be - you'll see a "Bad magic number" error message in the serial console and the device will reset itself. To stop the reboot loop enter the U-Boot prompt and power down the box by removing the power supply. Remove the utility USB-drive and insert the one containing your OS. Re-plugging the power should cause the device to start and if everything goes right it should now boot Debian.
You can log in through the serial console with the default credentials. From here you should probably go for configuring the network interfaces and SSH so you can drop the serial connection.
Good luck!
* This probably depends on the file system support of U-Boot.
** I'm not sure if it's necessary to leave the files on the "rootfs" partition but at least copying seems to work for me.
*** As someone pointed out earlier, the USB3 port in the front panel won't work.