A few days ago, I mentioned that one of my servers had died. I spent some time thinking about how I would replace it. I like having a 24/7 hooked up to the Internet to serve as a file drop and a place where I can use SSH to connect to other devices on my home network, but the machine need not be hugely fast, and it would probably be better if it were fairly low power. My previous server drew about 30 watts, and I suspected that I could get something more compact and lower power to replace it.
So, I ordered a TonidoPlug 2. It’s a cute little server based upon the Sheeva Plug computer concept, but includes space to insert a 2.5″ SATA laptop drive. It has all sorts of “personal cloud” applications running on it, which I had no interest in, but doing a bit more research, I found that I could install ArchLinux on the internal hard drive, and it would boot to that automatically. Cool, think I. I ordered mine off Amazon.
It arrived yesterday. I powered it up, verified that it worked in its default configuration, then proceeded to follow the directions on the ArchLinux ARM page. Upon reboot… not good. I ended up with a flashing red LED, and the network never comes back up. So, I pulled the internal drive, and it reboots back to its default configuration.
I then start tracking through various support and Wiki links. I find that some people have had difficulty booting from the internal drives, and the Tonido support guys have been very coy, claiming that “we don’t support that”. Frown. Not good.
But in doing this research, I found that it was possible to access the boot loader and serial console. On the bottom side of the tonido is a nice little rubber cover, concealing 4 pins. Most people seem to make a small adapter to use an FTDI-serial adapter cable with it (the six pin ones like you would use for the Arduino), but I had a Bus Pirate sitting around, and I thought that it might work. And… it did!
In case anyone else (or me in the future) wants to know how to do this:
- The four pins are Vcc, Rx, Tx, and GND, starting from the power supply side and working toward the USB/Ethernet cable side.
- I just hooked up MOSI to RX, MISO to TX, and GND to GND
- To use the Bus Pirate with my Mac laptop, I like to use GNU screen. If you run “screen /dev/tty.usbserial-AH00MPIK 115200” (your tty device will likely be different), it makes a convenient terminal emulator. From there, you can access the Bus Pirate, configure it in UART mode with a baud rate of 115200 and sensible other defaults.
- You can then use the Bus Pirate as a UART bridge by invoking the “(1)” macro. You’ll then essentially be talking directly to the Tonido via the BusPirate.
- Using screen’s C-a H command, you can start a log file, which will record all the output from the serial port. Doing the command again will stop logging.
Hooking it up, I got lots of cool info from the Tonido:
__ __ _ _ | \/ | __ _ _ ____ _____| | | | |\/| |/ _` | '__\ \ / / _ \ | | | | | | (_| | | \ V / __/ | | |_| |_|\__,_|_| \_/ \___|_|_| _ _ ____ _ | | | | | __ ) ___ ___ | |_ | | | |___| _ \ / _ \ / _ \| __| | |_| |___| |_) | (_) | (_) | |_ \___/ |____/ \___/ \___/ \__| ** MARVELL BOARD: DB-88F6282A-BP LE U-Boot 1.1.4 (Sep 13 2011 - 13:25:05) Marvell version: 3.4.27 USISH-SMB Ver: topkick1281p2-001-008-20110913-codelathe U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006D0120 Soc: MV88F1155 Rev 1 (DDR2) CPU running @ 800Mhz L2 running @ 400Mhz SysClock = 400Mhz , TClock = 200Mhz DRAM unknown CAL tRP = 8 tRAS = 20 tRCD=8 DRAM CS base 0x00000000 size 512MB DRAM Total size 512MB 16bit width Addresses 8M - 0M are saved for the U-Boot usage. Mem malloc Initialization (8M - 7M): Done NAND:512 MB Flash: 0 kB CPU : Marvell Feroceon (Rev 1) Streaming disabled Write allocate disabled USB 0: host mode PEX 0: interface detected no Link. Net: egiga0 [PRIME] Hit any key to stop autoboot: 0 (Re)start USB... USB: scanning bus for devices... 1 USB Device(s) found Waiting for storage device(s) to settle before scanning... 0 Storage Device(s) found ** Bad partition 1 ** ## Booting image at 00800000 ... Bad Magic Number Saving Environment to NAND... Erasing Nand...Writing to Nand... done Reset IDE: Marvell Serial ATA Adapter Integrated Sata device found [0 0 0]: Enable DMA mode (5) Device 0 @ 0 0: Model: TOSHIBA MK6465GSX Firm: GJ003M Ser#: 50OAC319T Type: Hard Disk Supports 48-bit addressing Capacity: 610480.3 MB = 596.1 GB (1250263728 x 512) ** Unable to read "/boot/uImage" from ide 0:1 ** ## Booting image at 00800000 ... Bad Magic Number Saving Environment to NAND... Erasing Nand...Writing to Nand... done NAND read: device 0 offset 0x200000, size 0x600000 6291456 bytes read: OK ## Booting image at 01200000 ... Image Name: Linux-188.8.131.52-topkick1281p2-001 Created: 2011-11-10 3:58:11 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3121408 Bytes = 3 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK OK Starting kernel ... Uncompressing Linux................................................................................................................................................................................................... done, booting the kernel. Linux version 184.108.40.206-topkick1281p2-001-004-20101214 (email@example.com) (gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)) #2 Thu Nov 10 11:58:07 CST 2011 CPU: Feroceon 88FR131  revision 1 (ARMv5TE), cr=00053977 CPU: VIVT data cache, VIVT instruction cache Machine: Feroceon-KW Using UBoot passing parameters structure Memory policy: ECC disabled, Data cache writeback Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048 Kernel command line: console=ttyS0,115200;version=topkick1281p2-001-006-20101103 mtdparts=nand_mtd:0x180000@0(u-boot),0x20000@0x180000(u-boot-env),0x600000@0x200000(uImage),0x1f800000@0x800000(rootfs) ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rootdelay=10 PID hash table entries: 2048 (order: 11, 8192 bytes) Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) Memory: 512MB = 512MB total Memory: 513280KB available (5612K code, 319K data, 148K init, 0K highmem) NR_IRQS:128 Console: colour dummy device 80x30 Calibrating delay loop... 794.62 BogoMIPS (lpj=3973120) Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok xor: measuring software checksum speed arm4regs : 723.200 MB/sec 8regs : 433.600 MB/sec 32regs : 600.800 MB/sec xor: using function: arm4regs (723.200 MB/sec) NET: Registered protocol family 16 Feroceon L2: Enabling L2 Feroceon L2: Cache support initialised. CPU Interface ------------- SDRAM_CS0 ....base 00000000, size 512MB SDRAM_CS1 ....disable SDRAM_CS2 ....disable SDRAM_CS3 ....disable PEX0_MEM ....base e8000000, size 128MB PEX0_IO ....base f2000000, size 1MB INTER_REGS ....base f1000000, size 1MB NFLASH_CS ....base fa000000, size 2MB SPI_CS ....base f4000000, size 16MB BOOT_ROM_CS ....no such DEV_BOOTCS ....no such CRYPT_ENG ....base f0000000, size 2MB Marvell Development Board (LSP Version KW_LSP_5.0.3)-- DB-88F6282A-BP Soc: MV88F1155 Rev 1 LE Detected Tclk 200000000 and SysClk 400000000 MV Buttons Device Load Marvell USB EHCI Host controller #0: df837740 PEX0 interface detected no Link. PCI: bus0: Fast back to back transfers enabled bio: create slab <bio-0> at 0 SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb raid6: int32x1 72 MB/s raid6: int32x2 101 MB/s raid6: int32x4 88 MB/s raid6: int32x8 80 MB/s raid6: using algorithm int32x2 (101 MB/s) cfg80211: Calling CRDA to update world regulatory domain NET: Registered protocol family 2 IP route cache hash table entries: 16384 (order: 4, 65536 bytes) TCP established hash table entries: 65536 (order: 7, 524288 bytes) TCP bind hash table entries: 65536 (order: 6, 262144 bytes) TCP: Hash tables configured (established 65536 bind 65536) TCP reno registered NET: Registered protocol family 1 rtc mv_rtc: rtc core: registered kw-rtc as rtc0 RTC registered cpufreq: Init kirkwood cpufreq driver XOR registered 4 channels XOR 2nd invalidate WA enabled mvCesaInit: sessions=640, queue=64, pSram=f0000000 Warning: TS unit is powered off. MV Buttons Driver Load JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc. SGI XFS with security attributes, large block/inode numbers, no debug enabled msgmni has been set to 1002 alg: No test for cipher_null (cipher_null-generic) alg: No test for ecb(cipher_null) (ecb-cipher_null) alg: No test for digest_null (digest_null-generic) alg: No test for compress_null (compress_null-generic) alg: No test for stdrng (krng) alg: No test for hmac(digest_null) (hmac(digest_null-generic)) async_tx: api initialized (sync-only) io scheduler noop registered io scheduler anticipatory registered (default) Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A console [ttyS0] enabled Integrated Sata device found IRQ 21/mvSata: IRQF_DISABLED is not guaranteed on shared IRQs scsi0 : Marvell SCSI to SATA adapter scsi1 : Marvell SCSI to SATA adapter scsi 0:0:0:0: Direct-Access TOSHIBA MK6465GSX GJ00 PQ: 0 ANSI: 5 sd 0:0:0:0: [sda] Sector size 0 reported, assuming 512. sd 0:0:0:0: [sda] 1250263728 512-byte logical blocks: (640 GB/596 GiB) sd 0:0:0:0: [sda] 0-byte physical blocks sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: Attached scsi generic sg0 type 0 Loading Marvell Ethernet Driver: o Cached descriptors in DRAM o DRAM SW cache-coherency o 2 Giga ports supported o Multi RX Queue support - 4 RX queues o Multi TX Queue support - 2 TX Queues o TCP segmentation offload (TSO) supported o Large Receive offload (LRO) supported o Receive checksum offload supported o Transmit checksum offload supported o Network Fast Processing (Routing) supported - (Disabled) o Network Fast Processing (NAT) supported o Driver ERROR statistics enabled o Driver INFO statistics enabled o Proc tool API enabled o SKB Reuse supported - (Disabled) o SKB Recycle supported - (Disabled) o Gateway support enabled o Using Marvell Header Mode o L2 IGMP support o Rx descripors: q0=128 q1=128 q2=128 q3=128 o Tx descripors: q0=532 q1=532 o Loading network interface(s): o register under mv88fx_eth platform sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA sd 0:0:0:0: [sda] Sector size 0 reported, assuming 512. o eth0, ifindex = 2, GbE port = 0 Warning: Giga 1 is Powered Off Warning: Giga 1 is Powered Off mvFpRuleDb (df280000): 16384 entries, 65536 bytes Intel(R) PRO/1000 Network Driver - version 7.3.21-k3-NAPI Copyright (c) 1999-2006 Intel Corporation. e1000e: Intel(R) PRO/1000 Network Driver - 1.0.2-k2 e1000e: Copyright (c) 1999-2008 Intel Corporation. e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI e100: Copyright(c) 1999-2006 Intel Corporation sda: PPP generic driver version 2.4.2 PPP Deflate Compression module registered PPP BSD Compression module registered PPP MPPE Compression module registered NET: Registered protocol family 24 PPPoL2TP kernel driver, V1.0 Using Hamming 1-bit ECC for NAND device NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit) Scanning device for bad blocks Bad eraseblock 1064 at 0x000008500000 Bad eraseblock 1065 at 0x000008520000 Bad eraseblock 1884 at 0x00000eb80000 Bad eraseblock 1885 at 0x00000eba0000 Bad eraseblock 2038 at 0x00000fec0000 Bad eraseblock 2039 at 0x00000fee0000 Bad eraseblock 2580 at 0x000014280000 Bad eraseblock 2581 at 0x0000142a0000 Bad eraseblock 2606 at 0x0000145c0000 Bad eraseblock 2844 at 0x000016380000 Bad eraseblock 3269 at 0x0000198a0000 Bad eraseblock 3547 at 0x00001bb60000 4 cmdlinepart partitions found on MTD device nand_mtd Using command line partition definition Creating 4 MTD partitions on "nand_mtd": 0x000000000000-0x000000180000 : "u-boot" sda1 sd 0:0:0:0: [sda] Sector size 0 reported, assuming 512. 0x000000180000-0x0000001a0000 : "u-boot-env" sd 0:0:0:0: [sda] Attached SCSI disk 0x000000200000-0x000000800000 : "uImage" 0x000000800000-0x000020000000 : "rootfs" UBI: attaching mtd3 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 129024 bytes UBI: smallest flash I/O unit: 2048 UBI: sub-page size: 512 UBI: VID header offset: 512 (aligned 512) UBI: data offset: 2048 UBI: attached mtd3 to ubi0 UBI: MTD device name: "rootfs" UBI: MTD device size: 504 MiB UBI: number of good PEBs: 4020 UBI: number of bad PEBs: 12 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 1 UBI: available PEBs: 75 UBI: total number of reserved PEBs: 3945 UBI: number of PEBs reserved for bad PEB handling: 40 UBI: max/mean erase counter: 3/1 UBI: image sequence number: 0 ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver ehci_marvell ehci_marvell.70059: Marvell Orion EHCI ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1 UBI: background thread "ubi_bgt0d" started, PID 480 ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100 ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver uhci_hcd: USB Universal Host Controller Interface driver usbcore: registered new interface driver usblp Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. usbcore: registered new interface driver ums-datafab usbcore: registered new interface driver ums-freecom usbcore: registered new interface driver ums-jumpshot usbcore: registered new interface driver ums-sddr09 usbcore: registered new interface driver ums-sddr55 usbcore: registered new interface driver ums-usbat pwrctl: dev_t_NO. = 0xdd00000, major = 221 pwrctl: request the irq power off registered. mice: PS/2 mouse device common for all mice i2c /dev entries driver Linux telephony interface: v1.00 md: linear personality registered for level -1 md: raid0 personality registered for level 0 md: raid1 personality registered for level 1 md: raid6 personality registered for level 6 md: raid5 personality registered for level 5 md: raid4 personality registered for level 4 device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: firstname.lastname@example.org sdhci: Secure Digital Host Controller Interface driver sdhci: Copyright(c) Pierre Ossman mmc0: mvsdio driver initialized, lacking card detect (fall back to polling) Advanced Linux Sound Architecture Driver Version 1.0.20. No device for DAI CS42L51 ALSA device list: No soundcards found. nf_conntrack version 0.5.0 (8192 buckets, 32768 max) mvFpNatDb (df360000): 16384 entries, 65536 bytes ip_tables: (C) 2000-2006 Netfilter Core Team TCP cubic registered NET: Registered protocol family 17 NFP (fdb) init 256 entries, 1024 bytes RPC: Registered udp transport module. RPC: Registered tcp transport module. 802.1Q VLAN Support v1.8 Ben Greear <email@example.com> All bugs added by David S. Miller <firstname.lastname@example.org> rtc mv_rtc: setting system clock to 2012-03-31 01:20:22 UTC (1333156822) Waiting 10sec before mounting root device... mmc0: new high speed SDIO card at address 0001 md: Waiting for all devices to be available before autodetect md: If you don't use raid, use raid=noautodetect md: Autodetecting RAID arrays. md: Scanned 0 and added 0 devices. md: autorun ... md: ... autorun DONE. UBIFS: mounted UBI device 0, volume 0, name "rootfs" UBIFS: file system size: 501387264 bytes (489636 KiB, 478 MiB, 3886 LEBs) UBIFS: journal size: 25159680 bytes (24570 KiB, 23 MiB, 195 LEBs) UBIFS: media format: w4/r0 (latest is w4/r0) UBIFS: default compressor: lzo UBIFS: reserved for root: 4952683 bytes (4836 KiB) VFS: Mounted root (ubifs filesystem) on device 0:11. Freeing init memory: 148K Using makefile-style concurrent boot in runlevel S. Starting the hotplug events dispatcher: udevd. Synthesizing the initial hotplug events...done. Waiting for /dev to be fully populated...done. Setting parameters of disc: (none). Activating swap...done. Starting early crypto disks...done. Starting remaining crypto disks...done. Loading kernel modules...done. Cleaning up ifupdown.... Setting up networking.... Activating lvm and md swap...done. Checking file systems...fsck from util-linux-ng 2.17.2 done. Mounting local filesystems...done. Activating swapfile swap...done. Cleaning up temporary files.... Setting kernel variables ...done. Configuring network interfaces...Internet Systems Consortium DHCP Client 4.1.1-P1 Copyright 2004-2010 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ eth0: started Listening on LPF/eth0/40:2c:f4:bc:8b:c9 Sending on LPF/eth0/40:2c:f4:bc:8b:c9 Sending on Socket/fallback DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7 No DHCPOFFERS received. No working leases in persistent database - sleeping. done. Cleaning up temporary files.... fuse init (API version 7.12) Using makefile-style concurrent boot in runlevel 2. Network Interface Plugging Daemon...start eth0...done. Starting enhanced syslogd: rsyslogd. Starting Samba daemons: nmbd smbdStarting periodic command scheduler: cron. . Starting system message bus: dbus. Starting OpenBSD Secure Shell server: sshd. EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended Debian GNU/Linux 6.0 TonidoPlug2 ttyS0 TonidoPlug2 login: --2012-03-30 18:21:50-- http://patch.codelathe.com/firmware/tonidoplug2/updates.list Resolving patch.codelathe.com... failed: Name or service not known. wget: unable to resolve host address “patch.codelathe.com” Debian GNU/Linux 6.0 TonidoPlug2 ttyS0 TonidoPlug2 login: root Password: Last login: Fri Mar 30 18:16:16 PDT 2012 on ttyS0 Linux TonidoPlug2 220.127.116.11-topkick1281p2-001-004-20101214 #2 Thu Nov 10 11:58:07 CST 2011 armv5tel The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@TonidoPlug2:~#
I suspect I’ll be able to debug it a lot better tomorrow.