The power supply of my eSata SheevaPlug died recently. Quite impressively, it triggered the 16 amps automatic circuit breaker, but fortunately, the rest of the SheevaPlug still works.
Because of this event, I had a look at the plugcomputer.org forum and found a post about the IB-NAS6210. It is a NAS case for a single 3,5” hard disk (+ 1 eSATA port) using the same hardware platform as the SheevaPlug, which is ideally suited for my use as a remote backup system. Furthermore, it has an integrated USB hub with 3 external USB ports (2 on the rear and one on the front). However, it has only 256 MB of RAM, 256 MB of flash and no SD card slot. I don’t care, since it can boot via the USB ports (and apparently also via SATA) and 256MB of RAM are plenty for my purposes. What’s best, I got it for 66 Euros.
Attaching the serial port
The following steps will most probably void the warranty on your box. I take no responsability for your actions. Furthermore, RaidSonic may change the hardware at any time (even without changing the type label), rendering this description completely useless or even harmful. You have been warned.
In order to be able to boot your own system, U-Boot has to be configured accordingly via the serial console. The box I have (with the type label “IB-NAS6210-B”) has a 3.3v serial port connector on the PCB. Opening the case (which makes a high quality impression considering the price, btw.) to get at the connector is really easy (remove the HDD tray when doing that):
Unscrew the four screws on the back to remove the back plate.
Unscrew the two rear case feet:
Now you should be able to the slide out the PCB assembly. The connector for the serial port is “buried” under cables next to the power connector for the hard drive.
The PCBs of the IB-NAS6220 (2-bay version) and the IB-NAS6210 seem to be essentially the same. Thus, the serial connector is at the same place and has the same pinout as described here:
The connector is labeled with “J5″ and has a 2.0mm pitch. As said, it is a 3.3v interface which can’t be connected directly to a PC’s serial port. Thus, I needed to build an adapter using a MAX3232 like described here (obviously, you have to adapt the pinout of the 3.3v serial side.)
Boot from USB
Serial settings are 1152008N1.
Here is the output of U-Boot when booting:
__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__|
** MARVELL BOARD: DB-88F6281A-BP LE
U-Boot 1.1.4 (Oct 12 2009 - 13:41:53) Marvell version: 3.4.16
U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CEE60
Soc: MV88F6281 Rev 3 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz
DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000 size 256MB
DRAM Total size 256MB 16bit width
Flash: 0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:256 MB
CPU : Marvell Feroceon (Rev 1)
Streaming disabled
Write allocate disabled
USB 0: host mode
PEX 0: interface detected no Link.
Net: egiga0 [PRIME]
The U-Boot is rather old, but works for me. It seems to be rather picky regarding USB sticks. Especially larger ones do not seem to work. You may have to try a few to find a working one. I have received multiple questions whether it is possible to update U-Boot. I don’t know of any newer U-Boot version for the device. Thus, I left the original U-Boot alone.
Here are the original environment variables:
Marvell>> printenv
baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
netmask=255.255.255.0
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_end=:::DB88FXX81:eth0:none
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$
(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(xx:xx:xx:xx:xx:xx,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=xx:xx:xx:xx:xx:xx
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
bootargs_root=ubi.mtd=2,2048 root=ubi0:rootfs rootfstype=ubifs init=/linuxrc
console=console=ttyS0,115200
bootcmd=nand read.e 0x800000 0x100000 0x300000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000
rootpath=/tftpboot/marvell.nfs.rootfs
image_name=uImage.6281a.ubifs.20090513
serverip=10.128.129.205
ethaddr=xx:xx:xx:xx:xx:xx
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=no
Environment size: 1192/131068 bytes
In order to boot from USB, I copied my SheevaPlug Debian Squeeze install from an SD-Card to an USB-Stick that is partioned as follows:
# fdisk -ucl /dev/sda
Disk /dev/sda: 4051 MB, 4051697664 bytes
125 heads, 62 sectors/track, 1021 cylinders, total 7913472 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x046352a3
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 411647 204800 83 Linux
/dev/sda2 411648 7913471 3750912 83 Linux
Partition 1 is the boot filesystem (ext2) with uImage and uInitrd. Partition 2 is the root filesystem (ext3). After copying the data from the SD-Card, I changed /etc/fstab to adapt the UUIDs of the boot and root partitions. As I found out, you should also use the UUID of the root device in the “root” parameter to the kernel (or the LABEL), since the USB stick may be detected as /dev/sda or as /dev/sdb depending on the type of hard disk… (Thus, a parameter like “root=/dev/sda2″ does not work reliably)
In U-Boot, the following commands should do the trick to let the box boot from USB (if the partitions are laid out as above). Of course, you will have to use the UUID or the LABEL of your root device:
setenv mainlineLinux yes
setenv arcNumber 1680
setenv bootargs_console console=ttyS0,115200
setenv bootargs_root 'root=UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rootdelay=10'
setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x00800000 /uImage; ext2load usb 0:1 0x01100000 /uInitrd'
setenv bootcmd 'setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_usb; bootm 0x00800000 0x01100000'
saveenv
This should leave the original firmware in the NAND untouched. If you ever decide to return to the original firmware, you should be able to do this by restoring the original environment variables as listed above. (I did not verify this, since I even never booted into the original firmware once).
IMPORTANT: The arcNumber used here (1680 for “Marvell DB-88F6281-BP Development Board”) uses an MTD partitioning that is incompatible with the layout of the IB-NAS6210. You should not do anything with the mtd partitions!
Note that there is a short description (in German) in the comments below on how to install ArchLinux ARM. Thanks sudoquai!
Adapting the flash-kernel script of Debian Squeeze
Debian’s flash-kernel script does not know the machine used here (“Marvell DB-88F6281-BP Development Board”) and refuses to install a new kernel. A simple patch helps.
TODOs
- The constant blinking of the power LED makes me nervous. Here is a patch to support the IB-NAS6210 directly. The patch works fine for me, use arcNumber 3104 for booting with this patch. However, in order to get kernels > 2.6.27 stable (this has nothing to do with the kernel patch; I have general problems using mv_cesa and NFS file systems on armv5t), I had to revert commit f8b63c184ad13cc8adc3dadb557d4fbc29f76e4d. Here is the patch to do so. Thanks to Phil for pointing this out.
- Is there a newer U-Boot version available which runs on the box?





Hi,
hab deine Amleitung sorgfältig studiert und auf der Kiste nun auch Archlinux drauf. Möglicherweise hab ich dir ne Möglichkeit für das root=LABEL Problem.
Würde dann über U-Boot Environment Variablen gehen und sucht dabei einfach das erste bootfähige USB Device.
Ich sollte aber vorher U-Boot upgraden. Frage: Weisst du ob das geht und wie ?
Danke
Nein, weiß ich leider nicht. U-Boot ist meines Wissens sehr spezifisch für die Plattform, d.h. hier sollte man genau das Richtige tun sonst endet das böse. Ich habe das geschilderte Problem aber auch noch nicht wirklich verstanden.
Sorry, hab mich vielleicht etwas missverständlich ausgedrückt:
Die oben erwähnte Anleitung funktioniert perfekt bis auf die Sache, dass root=UUID=… oder root=LABEL=… unter Archlinux Arm nicht gleich funktioniert (mit Debian gehts).
Bei der mitgelieferten Tarball is keine uInitrd dabei, die muss erst generiert werden.
Ich habs mittlerweile gelöst und zwar einfach nen Stick mit 1 Partition (ext2) und Label ist “rootfs”.
Dann “wget http://archlinuxarm.org/os/ArchLinuxARM-armv5te-latest.tar.gz” und auf dem Stick auspacken.
Danach muss man von Hand eine uInitrd erzeugen unter Archlinux Arm.
Folgende Anleitung war hierzu sehr hilfreich:
http://archlinuxarm.org/forum/viewtopic.php?f=23&t=1248
Was ich vergessen habe: der Umstand das die Kiste kein U-Boot Upgrade verträgt ist etwas problematisch, da mein erster USB Stick von Verbatim (16GB) nicht erkannt wurde (usb start hängt sich auf). Erst mit einem SD-Card Reader mit MicroSD war es schliesslich möglich. Anscheinend funktioniert diese Geschichte reibungslos mit einem Ubot Upgrade …
Daher würde ich 2 Sachen sicherheitshalber in der Anleitung:
1) kein UBoot Upgrade durchführen
2) mehrere Sticks probieren, falls der erste nicht gleich funktioniert
3) Eine Partition reicht auch auf dem Stick (Grösse egal) – vereinfach die Anleitung etwas.
Danke übrigens! Hat mir prima geholfen die Anleitung. Thumbs up!
Ah was ich vergessen habe:
Bevor man die uInitrd unter Archlinux ARM erzeugen kann, braucht man einen initialen Login in SSH.
D.h. Bevor man die uInitrd erzeugen kann, sollten die Variablen wie oben beschrieben gesetzt werden bis auf (Platte und sonstige USB Geräte bis auf den Stick abhängen, Stick vorne rein)
setenv bootargs_root ‘root=/dev/sda1 rootdelay=10′
setenv bootcmd_usb ‘usb start; ext2load usb 0:1 0×00800000 /boot/uImage’
setenv bootcmd ‘setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_usb; bootm 0×00800000′
saveenv
reset
Nach dem Login und erfolgreichem Erzeugen der uInitrd, wieder in U-Boot und folgendermassen setzen:
setenv bootargs_root ‘root=/dev/disk/by-label/rootfs rootdelay=10′
setenv bootcmd_usb ‘usb start; ext2load usb 0:1 0×00800000 /boot/uImage; ext2load usb 0:1 0×01100000 /boot/uInitrd’
setenv bootcmd ‘setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_usb; bootm 0×00800000 0×01100000′
saveenv
reset
root=LABEL… funktioniert leider nicht (udev schmeisst Fehler)
Fazit: Mit einer Partition, rootfs per LABEL statt UUID starten hat den Vorteil, dass du so auf dem Stick das verwendete Linux schnell tauschen kannst, ohne jedesmal in U-Boot Variablen ändern zu müssen (das Label der verwendeten Partition sollte halt gleich bleiben).
Hoffe konnte bischen helfen und dir einen kleinen Denkanstoss zur Verbesserung deiner Anleitung geben.
Danke!
So, hier noch ein paar Bilder (bischen verwaschen) von mir zum fertigen “Produkt”.
Hab ein CA-42 Kabel für Nokia Handys verwendet (wenn magst, kannst auch eine kleine Auwahl gängiger Kabel verwenden, oder zumindest ein verwendetes Referenzkabel für die Anleitung, Test mit RX/TX kurzschliessen und im Terminal Programm einen Echo Test durch Eingabe von Text is auch hilfreich, Hab so ne Kiste zum ersten Mal “gerootet” ;)
Sinnvoll ist auch der benutze USB Stick / SD Card Reader. Bei mir wars ein “Sharkoon Flexidrive XC+). Verbatim 16GB USB Stick ging nicht mit dem festgefressenen U-Boot.
Kleiner Trick noch von mir: Das serielle Kabel kannst in der Kiste geschickt verstauen (siehe Bild). Stecker ragt bischen raus, bei Bedarf aufschrauben hinten, leicht rausziehen und USB Verlängerungskabel ran – erleichtert das Leben ungemein ;)
Bildchen Icybox fertig:
http://www.freeimagehosting.net/34c79
Bildchen Icybox + USB:
http://www.freeimagehosting.net/e84dd
Bildchen Icybox + verwendeter SD Card Reader:
http://www.freeimagehosting.net/586c9
Die nächsten Tage wird das Teil vom Bett aus installiert mit drangeklemmtem WLAN-Stick, dann kann ich das LAN-Kabel auch abziehen :)
Danke für die Hinweise! Habe im Artikel einen Verweis auf Deine Archlinux Anleitung eingebaut.
Hi ich möchte auch gerne Linux drauf machen da die Optionen bei diesem gerät ja sehr beschränkt sind.
Da mein English nicht das beste ist hat jemand nen link für ne Deutsche Anleitung oder könnte eine schreiben?Das wäre nice^^
Google Spuckt nix aus -.-
Danke im voraus…
Hi,
ich bin gerade dabei eine komplette Anleitung zu schreiben fuer Archlinux.
Die Anleitung umfasst die vollstaendige Installation und Starten von Archlinux auf einem USB Stick als komplette “Walkthrough”-Anleitung, die auch Gebrauch macht vom Copy Button um eine interne Platte 1:1 auf eine externe Platte zu replizieren.
Bitte um etwas Geduld :)
Es ist mir gelungen Debian aufzuspielen. Das habe ich als Übung gemacht während ich auf deine sudoquai’s Anleitung zu Arch-Linux warte.
Zu Arch-Linux konnte ich leider nicht herausfinden wie ich ‘initrd’ passend zum Download Arch Linux ARM auf Ubuntu bauen kann. Das ist aber nicht das Thema in diesem Blog, denke ich.
bmglob, gute Arbeit und Danke für den Blog!
Auf der Icybox:
mkinitcpio -v -k 3.0-ARCH -g /boot/temp.img
mkimage -A arm -O linux -T ramdisk -C gzip -a 0×00000000 -e 0×00000000 -n initramfs -d /boot/temp.img /boot/uInitrd
Hallo Herr Baatz.
Ich spiele mit dem Gedanken mir diese NAS zu besorgen um Debian Squeeze darauf zu installieren.
In Ihrem Guide benutzen Sie eine fertige Installation von einer SheevaPlug.
Könnte man also der “Installationsanweisung für Debian auf SheevaPlug” folgen um ein funktionierendes System zu erhalten oder ist das ohne weiteres nicht möglich?
PS: Vielen Dank für die ansonsten sehr ausführliche Anleitung :)
Danke für die Blumen! Eine Anleitung zur Installation von Debian auf dem IB-NAS6210 habe ich kürzlich auf xythobuz.org gefunden. Ich hoffe das hilft weiter.
Hmm you can just login with root right? I just did on my 6210. No need for a serial.
-bash-3.2$ ls
GedeeldeBestanden MijnBestanden
-bash-3.2$ sudo -E -s
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
Password:
audit_log_user_command(): Connection refused
bash-3.2# ls
GedeeldeBestanden MijnBestanden
bash-3.2# whoami
root
bash-3.2#
If that is what you need: Great!
As said in the text above, I never booted the original system. The description is about running your own operating system on the device, not about modifying the original system that comes with the 6210.
However, if you can change the U-Boot configuration from there in order to boot your own OS, this might be interesting for some people, since they would not need to open the device.
Sorry mate. Didn’t mean to offend. Actually, i’m soldering the DKU5 as we speak to feed my urge to tinker and this tutorial is highly practical! :)
Could you please explain how you got root access to the device? Maybe SSH to it, but with which account/password?
Hi all,
I just bought a NAS-6210 device and would like to install arch linux on it. I read all you posts and found very helpful informations! Unfortunately I can’t find a solution to get root access. Now I’m wondering how Jayare got root acces.
@Jayare: Could you please explain how you got root access to the device? Maybe SSH to it, but with which account/password?