
Debian on Iomega StoreCenter Ix2-200 or make a full service from a network drive

Somehow, at work, a need arose to organize a repository on the network for all kinds of documentation. Requirements: reliability, small size, a few terabytes. My choice was the Network Attached Storage of the Iomega StoreCenter Ix2-200. In the process of market research, it turned out that this device uses a stripped-down version of Debian Lenny, and it is possible to install a full-fledged Debian Squeeze. Thus, get all the features provided by this OS.
So, the device was purchased, I overlaid the documentation found on the Internet and proceeded to install the Debian Squeeze OS for armel architecture. Unfortunately, the available documentation turned out to be in English, incomplete and not accurate, in general there was room for thought. In addition, for the initial loading and reinstallation of the OS, a rather specific RS-232 cable was required.
As a result, my experiment (successful) was described under the cut, the necessary pieces of other people's instructions were translated, and the experimental information I received was presented.
About cable
For installation, we need an interface cable that runs on the rs-232 protocol with an ordinary DB9 on the one hand and an unusual (I don't know if it has its own name) connector on the other. I myself am confused on which side they approach the soldering iron, so I turned to my colleagues who soldered me this:
UPD from 01/19/2012 : As I was told, the connector on the other end (not DB9) is called BLS-04. Some technical details about the cable here .

Pinout:
Pin 1 VCC (3.3V) Pin 2 TxD Pin 3 GND Pin 4 RxD Pin 1 is signed by "JP1"
Instead, the original instructions recommend using the TTL-232-R-3V3-AJ cable . It’s better than mine because it connects to USB on the computer side, and it doesn’t have a lot of noise around (I had great interference when the board touched the computer case), but worse, I couldn’t buy it in Moscow with a little blood.
Therefore, they made their own.
UPD from 01/19/2012 : Other interface cable options are written in the comments, for which many thanks to the authors.
Features Iomega Storcenter ix2-200
Iron parameters:
CPU 1.0 GHz Marvell Kirkwood 88F6281 RAM 256 MB Zentel / Hynix Flash ROM 32 MB Hynix Network Gigabit Marvell Alaska 88E81116R USB 3x USB 2.0 Ports Internal HDD Two SATA-II drives HDD capacity Comes with total volume options 1/2/4 TB
Serial Connection Parameters:
- speed: 115200 baud
- parity: none
- flow control: xon / xoff
- 8 data bits
- 1 stop bit
About installation files
Files (uImage - the kernel and uInitrd - initrd.img) for downloading the installer NAS can take from partitions on one of the hard drives installed internally, from a USB flash drive or over a network from a tftp server. I chose the last option and used tftpd32 (there is also a 64-bit version of tftpd64) under the working Windows and net-ftp / tftp-hpa under the home gent.
Download the notorious files from here and throw in the directory from which the tftp server is distributed.
We start the terminal (putty, hyperterminal, etc.) in the listening mode of the corresponding port (in my case it was COM1), setting the parameters of the serial connection correctly (see above).
We connect NAS:
- to a computer with a tftp server over the network
- to the computer from which we will control the installation via rs-232 cable (may coincide with point 1)
- to electricity
If everything went well, then we see the following picture in the terminal: We

stop the startup at the right time by pressing any key and go to the next step.
Installer Download
We enter the following commands:
setenv mainlineLinux yes setenv arcNumber 1682 saveenv reset
Thus, we set the configuration parameters so that the NAS boots from the kernel we need and restarts the device.
We ship the installer core:
For TFTP:
setenv serverip 192.168.1.2 setenv ipaddr 192.168.1.147 tftpboot 0x01100000 uInitrd tftpboot 0x00800000 uImage
192.168.1.2 is the address of the tftp server, 192.168.1.147 is the address assigned by the NAS.
For flash drive (FAT only):
usb start fatload usb 0: 1 0x01100000 / uInitrd fatload usb 0: 1 0x00800000 / uImage
Install Debian
I will not describe in detail the standard Debian installer, as this is much done before me. For example, in the official guide . I will dwell only on the following subtle points in order of occurrence during installation.
Disk partitioning
I have now done this: each of the two two-terabyte hard drives is divided into two sections: 230 megabytes and everything else. The 230-megabyte partitions on the first and second drives are used under / boot and the root partition, respectively. As the output of df -hT below shows, the size of 200 megabytes is quite excessive.
The second sections on each of the disks are combined into software raid 1 (mirroring) and LVM is created on it.
df -hT:
F. system Type Dimension Use Access Use% mounted on / dev / sda1 ext2 223M 18M 194M 9% / boot / dev / sdb1 ext4 230M 79M 140M 36% / / dev / mapper / vg-home ext4 1.8T 267G 1.6T 15% / home / dev / mapper / vg-opt ext4 938M 18M 873M 2% / opt / dev / mapper / vg-tmp ext2 893M 17K 845M 1% / tmp / dev / mapper / vg-usr ext4 4.6G 782M 3.6G 18% / usr / dev / mapper / vg-var ext4 19G 802M 17G 5% / var
There is still / dev / mapper / vg-swap on 512MB (twice the amount of RAM).
I broke up into sections late at night, having difficulty recovering from the night of December 31 to January 3, so it turned out, obviously, far from ideal. But it was frankly lazy to redo it. Now, having already thought, I would have done this:
1) The root and / boot can NOT be on the raid and \ or lvm, so they are created as ordinary partitions on hard drives. At the same time, since everything else will be on raids - the root and / boot partitions must lie on different disks and be of equal size. 150 megabytes should be enough for the root, and especially under / boot. Although / boot most likely can be with ext [3-4], there is no sense in journaling, since the data will be written there only when the kernel is updated.
I'm not sure if this is necessary, but it is better to / boot on sda1.
2) / tmp and swap do not need to be done on raid 1. Under them it’s worth creating a raid 0, it has its own volume group and it already has / tmp and swap partitions per gigabyte and 512 megabytes respectively.
3) We give the remaining free space on both screws for raid 1, create lvm on it, and break up the partitions as you like.
I want to note that the proposed partitioning scheme is focused on network storage designed for backups, i.e. The basic requirement is reliability. If you plan to store movies / music, i.e. what is easily downloaded from the Internet, the main section (I have it / home, but it may well be / var, for example) should be on raid 0.
Kernel conversion
Unfortunately, the bootloader in this device does not know how to use the standard vmlinuz-2.6.32-5-kirkwood and initrd.img-2.6.32-5-kirkwood, and the Debian installer does not know anything about our device and does not flash the kernel where it should be . Therefore, we ourselves need to convert it to the desired format and feed the bootloader.
This is done by the following two commands (in / boot):
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n "Debian kernel" -d vmlinuz-2.6.32-5-kirkwood uImage mkimage -A arm -O linux -T ramdisk -C gzip -a 0x0 -e 0x0 -n "Debian InitRD" -d initrd.img-2.6.32-5-kirkwood uInitrd
Unfortunately, I don’t remember whether mkimage is set by default, if not, it can be installed from the uboot-mkimage package.
This is done either at the end of the installation, or after, rebooting into rescue mode, entering at startup instead
setenv bootargs console = ttyS0,115200n8 base-installer / initramfs-tools / driver-policy = mostthis is
setenv bootargs console = ttyS0,115200n8 rescue / enable = true
Auto Download
After installing the system, so that our
setenv bootargs_console console = ttyS0,115200 root = / dev / sdb1 setenv bootcmd_sata 'ide reset; ext2load ide 0: 1 0x01100000 / uInitrd; ext2load ide 0: 1 0x00800000 / uImage ' setenv bootcmd 'setenv bootargs $ (bootargs_console); run bootcmd_sata; bootm 0x00800000 0x01100000 ' saveenv
And, finally, we boot into our full-fledged system, rebooting, or giving a command:
run bootcmd
Notes
Harmless error
The following error message will appear in the kernel logs at boot time:
kernel: [6.327359] uncorrectable error: kernel: [96.499883] uncorrectable error: kernel: [96.503342] end_request: I / O error, dev mtdblock0, sector 8
This is completely normal, as it turned out from deep googling. It is connected, as I understand it, with some problems in the uboot bootloader, or maybe not. The main thing is that everything works fine with this error. Now, if the error was about mtdblock1, then it would be bad.
Iron monitoring
I would very much like to monitor the temperature of the device, especially since it writes it at boot, but sensors-detect at a certain stage hangs the system tightly. Saves only turning off and turning on the power. It’s quiet in the logs. Only smartmontools works, allowing you to see the temperature of the hard drives.
Used materials
nas-central wiki:
Ix2-200
Ix2-200 Debian Installation
Installing Debian on OpenRD by syrius