Adding a SATA SSD to a PogoPlug Pro

Adding a SSD to a what?

10 years ago, I bought a PogoPlug Pro on a daily offers website.

A PogoPlug Pro

This was a small ARM device running some Linux flavour on an old 2.6 (I think) kernel. The device was equiped with some proprietary software from a company calledCloud Engines. The idea was to connect this device to your local network, attach an external hard drive using one of the four USB ports and tada your hard drive is now accessible from anywhere on the Internet. This service was totally free of charge. Free as in; you buy the device (price was around €30) plug it in and that was it. It was only later that Cloud Enines started to offer real cloud storage, hosted by themselves and started charging for that service.

With other cloud providers like dropbox, google's drive, microsoft's on drive and many others, Cloud Engines was struggling to stay afloat. Somewhere in 2017, the service along with the company finally shutdown, leaving a bunch of users with obsolete devices. There are newer PogoPlug 4 devices still being sold on Amazon ... but these are also obsolete though.

There is not much to be found on this shutdown (or maybe I don't know where to look for it), but none of the users received e-mails or notifications on this. They just disappeared.

2 years ago I refactored my home network adding a pi-hole to block adds for all devices on the network. Originally this was running on a raspberry pi 3. Like the PogoPlug, the raspberry pi is running on an ARM CPU, so I figured it might be an idea to repurpose the old plug and let it run Debian with the pi-hole software.

Installing Debian

To install Debian on the PogoPlug Pro, you need to gain access to the serial console first.

I used an FTDI cable to connect my computer with serial console on the plug and then followed this document to install debian on it. Make sure to use the following settings to make the connection (the FTDI cable was found on COM6 on my computer):

Well, you don't really install Debian _on_ the device, you need to attach a USB thumb drive labeled rootfs and the plug will boot Debian from there.

Installing pi-hole

Next I installed pi-hole on the plug using this manual. No need to compile pi-hole FTL yourself though, as it turns out, the more recent versions are now perfectly installable.

Upgrading to bullseye

The most recent rootfs is running Debian buster. At the time of this writing, there is a more recent version available, called bullseye, so I decided to try and upgrade to this newer version. As this is Debian, this is fairly easy, as you can read here

Replacing the USB stick with a SATA SSD

As you can see in below image the PogoPlug Pro came equiped with a norma SATA port, so why not attach an SSD instead of using an USB thumb drive.

I found people having successfully connected an mSATA SSD so I decided to try this as well.

I bought a Transcend "TS64GMSA230S 64GB" from Amazon, plugged this in an mSATA to SATA adapter card and try to boot from it.

U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12)
  Boot device: NAND
Attempting to set PLLA to 850 MHz ...
  plla_ctrl0 : 0000020a
  plla_ctrl1 : 00330000
  plla_ctrl2 : 0065008b
  plla_ctrl3 : 000000f1

PLLA Set


U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700)
OXNAS OX820

DRAM:  128 MiB
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   dwmac.40400000
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Reset IDE: Bus 0: OK
  Device 0: Model: TS64GMSA230S Firm: R0427GN1 Ser#: H368490172
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 61057.3 MB = 59.6 GB (125045424 x 512)

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            58316800        9e017078-01     83
  2     58318848        3121152         9e017078-02     83
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **

Partition Map for IDE device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            120848384       87f11582-01     83
  2     120850432       4194992         87f11582-02     83
loading envs from ide 0 ...
** File not found /boot/uEnv.txt **
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 157 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
5587376 bytes read in 567 ms (9.4 MiB/s)
loading uInitrd ...
6432066 bytes read in 674 ms (9.1 MiB/s)
loading DTB /boot/dts/ox820-pogoplug-pro.dtb ...
9032 bytes read in 205 ms (43 KiB/s)
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-5.4.210-oxnas-tld-1
   Created:      2022-11-09  13:01:37 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5587312 Bytes = 5.3 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 60e00000 ...
   Image Name:   initramfs-5.4.210-oxnas-tld-1
   Created:      2022-11-09  13:02:28 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6432002 Bytes = 6.1 MiB
   Load Address: 60000000
   Entry Point:  60000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 62c00000
   Booting using the fdt blob at 0x62c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 67804000, end 67e26502 ... OK
   Loading Device Tree to 677fe000, end 67803347 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.4.210-oxnas-tld-1 (root@tldDebian) (gcc version 10.2.1 20210110 (Debian 10.2.1-6)) #1.0 SMP PREEMPT Mon Aug 22 23:19:41 PDT 2022
[    0.000000][    T0] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr=00c5787d
[    0.000000][    T0] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000][    T0] OF: fdt: Machine model: Pogoplug V3 Pro
[    0.000000][    T0] Memory policy: Data cache writealloc
[    0.000000][    T0] percpu: Embedded 15 pages/cpu s30636 r8192 d22612 u61440
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=41000000.nand:14m(boot),-(data)
[    0.000000][    T0] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 110680K/131072K available (8192K kernel code, 234K rwdata, 2068K rodata, 1024K init, 258K bss, 20392K reserved, 0K cma-reserved)
[    0.000000][    T0] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0]  Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] FPGA IRQ chip 0 "interrupt-controller" @ (ptrval), 32 irqs, parent IRQ: 16
[    0.000017][    T0] sched_clock: 24 bits at 390kHz, resolution 2560ns, wraps every 21474835200ns
[    0.000048][    T0] clocksource: oxnas_rps_clocksource_timer: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 19112603332 ns
[    0.000064][    T0] timer_oxnas_rps: Registered clocksource rate 390625Hz
[    0.000089][    T0] timer_oxnas_rps: Registered clock event rate 6250000Hz prescaler 0 period 62500
[    0.000243][    T0] GIC: PPI13 is secure or misconfigured
[    0.000296][    T0] GIC: PPI13 is secure or misconfigured
[    0.000611][    T0] Console: colour dummy device 80x30
[    0.000686][    T0] Calibrating delay loop... 339.14 BogoMIPS (lpj=1695744)
[    0.050388][    T0] pid_max: default: 32768 minimum: 301
[    0.051138][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.051164][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.051435][    T0] *** VALIDATE tmpfs ***
[    0.052797][    T0] *** VALIDATE proc ***
[    0.053017][    T0] *** VALIDATE cgroup1 ***
[    0.053038][    T0] *** VALIDATE cgroup2 ***
[    0.053242][    T0] CPU: Testing write buffer coherency: ok
[    0.055738][    T1] Setting up static identity map for 0x60100000 - 0x60100038
[    0.056069][    T1] rcu: Hierarchical SRCU implementation.
[    0.057080][    T1] smp: Bringing up secondary CPUs ...
[    0.058344][    T0] GIC: PPI13 is secure or misconfigured
[    0.110653][    T1] smp: Brought up 1 node, 2 CPUs
[    0.110686][    T1] SMP: Total of 2 processors activated (678.29 BogoMIPS).
[    0.111874][    T1] devtmpfs: initialized
[    0.118648][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.118702][    T1] futex hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.118853][    T1] prandom: seed boundary self test passed
[    0.123156][    T1] prandom: 100 self tests passed
[    0.123174][    T1] pinctrl core: initialized pinctrl subsystem
[    0.125332][    T1] NET: Registered protocol family 16
[    0.127078][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.130424][    T1] cpuidle: using governor ladder
[    0.130501][    T1] cpuidle: using governor menu
[    6.088215][    T1] vgaarb: loaded
[    6.089280][    T1] SCSI subsystem initialized
[    6.090065][    T1] usbcore: registered new interface driver usbfs
[    6.090216][    T1] usbcore: registered new interface driver hub
[    6.090452][    T1] usbcore: registered new device driver usb
[    6.090731][    T1] pps_core: LinuxPPS API ver. 1 registered
[    6.090746][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti 
[    6.090782][    T1] PTP clock support registered
[    6.092564][    T1] clocksource: Switched to clocksource oxnas_rps_clocksource_timer
[    6.092620][    T1] *** VALIDATE bpf ***
[    6.093168][    T1] *** VALIDATE ramfs ***
[    6.113121][    T1] NET: Registered protocol family 2
[    6.113390][    T1] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    6.114401][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    6.114708][    T1] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    6.114754][    T1] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    6.114787][    T1] TCP: Hash tables configured (established 1024 bind 1024)
[    6.115015][    T1] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    6.115069][    T1] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    6.115371][    T1] NET: Registered protocol family 1
[    6.116625][    T1] RPC: Registered named UNIX socket transport module.
[    6.116654][    T1] RPC: Registered udp transport module.
[    6.116666][    T1] RPC: Registered tcp transport module.
[    6.116679][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    6.116702][    T1] PCI: CLS 0 bytes, default 32
[    6.117178][    T1] Unpacking initramfs...
[    6.849387][    T1] Freeing initrd memory: 6284K
[    6.850744][    T1] Initialise system trusted keyrings
[    6.850854][    T1] Key type blacklist registered
[    6.851276][    T1] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    6.864842][    T1] zbud: loaded
[    6.871203][    T1] NFS: Registering the id_resolver key type
[    6.871270][    T1] Key type id_resolver registered
[    6.871285][    T1] Key type id_legacy registered
[    6.871319][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    6.871334][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    6.871349][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    6.873082][    T1] fuse: init (API version 7.31)
[    6.873367][    T1] *** VALIDATE fuse ***
[    6.873397][    T1] *** VALIDATE fuse ***
[    6.874375][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    6.874716][    T1] orangefs_init: module version upstream loaded
[    6.924482][    T1] Key type asymmetric registered
[    6.924518][    T1] Asymmetric key parser 'x509' registered
[    6.924613][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    6.932352][    T1] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    6.933959][    T1] printk: console [ttyS0] disabled
[    6.934128][    T1] 44200000.serial: ttyS0 at MMIO 0x44200000 (irq = 55, base_baud = 390625) is a 16550A
[    7.571092][    T1] printk: console [ttyS0] enabled
[    7.591674][    T1] loop: module loaded
[    7.597829][    T1] scsi host0: sata_oxnas
[    7.602772][    T1] ata1: SATA max UDMA/133 irq 57
[    7.607674][   T75] sata_oxnas: resetting SATA core
[    7.672908][    T1] Could not find a valid ONFI parameter page, trying bit-wise majority to recover it
[    7.682319][    T1] ONFI parameter recovery failed, aborting
[    7.688025][    T1] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    7.695078][    T1] nand: Hynix NAND 128MiB 3,3V 8-bit
[    7.700195][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    7.708533][    T1] Scanning device for bad blocks
[    7.774853][    T1] Bad eraseblock 778 at 0x000006140000
[    7.800102][    T1] 2 fixed-partitions partitions found on MTD device 41000000.nand-controller
[    7.808714][    T1] Creating 2 MTD partitions on "41000000.nand-controller":
[    7.815767][    T1] 0x000000000000-0x000000e00000 : "boot"
[    7.822348][    T1] 0x000000e00000-0x000008000000 : "data"
[    7.829990][    T1] oxnas-dwmac 40400000.ethernet: IRQ eth_lpi not found
[    7.836869][    T1] oxnas-dwmac 40400000.ethernet: PTP uses main clock
[    7.843417][    T1] oxnas-dwmac 40400000.ethernet: no reset control found
[    7.913085][    T1] oxnas-dwmac 40400000.ethernet: User ID: 0x12, Synopsys ID: 0x35
[    7.920727][    T1] oxnas-dwmac 40400000.ethernet:   DWMAC1000
[    7.926502][    T1] oxnas-dwmac 40400000.ethernet: DMA HW capability register supported
[    7.934502][    T1] oxnas-dwmac 40400000.ethernet: RX Checksum Offload Engine supported
[    7.942469][    T1] oxnas-dwmac 40400000.ethernet: COE Type 2
[    7.948216][    T1] oxnas-dwmac 40400000.ethernet: TX Checksum insertion supported
[    7.955791][    T1] oxnas-dwmac 40400000.ethernet: Wake-Up On Lan supported
[    7.962754][    T1] oxnas-dwmac 40400000.ethernet: Enhanced/Alternate descriptors
[    7.970204][    T1] oxnas-dwmac 40400000.ethernet: Enabled extended descriptors
[    7.977510][    T1] oxnas-dwmac 40400000.ethernet: Ring mode enabled
[    7.983882][    T1] oxnas-dwmac 40400000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    8.037693][    T1] mdio_bus stmmac-0:00: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:00, irq=POLL)
[    8.047938][    T1] mdio_bus stmmac-0:03: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:03, irq=POLL)
[    8.059112][    T1] PPP generic driver version 2.4.2
[    8.064532][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.071726][    T1] ehci-pci: EHCI PCI platform driver
[    8.122616][   T75] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[    8.130242][   T75] ata1.00: ATA-10: TS64GMSA230S, R0427GN1, max UDMA/133
[    8.137080][   T75] ata1.00: 125045424 sectors, multi 16: LBA48 NCQ (depth 0/32)
[    8.145103][   T75] ata1.00: configured for UDMA/133
[    8.150714][    T7] scsi 0:0:0:0: Direct-Access     ATA      TS64GMSA230S     7GN1 PQ: 0 ANSI: 5
[    8.161802][   T54] sd 0:0:0:0: [sda] 125045424 512-byte logical blocks: (64.0 GB/59.6 GiB)
[    8.170368][   T54] sd 0:0:0:0: [sda] Write Protect is off
[    8.176120][   T54] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    8.282629][    T1] oxnas-ehci 40200100.ehci: EHCI Host Controller
[    8.288837][    T1] oxnas-ehci 40200100.ehci: new USB bus registered, assigned bus number 1
[    8.297418][    T1] oxnas-ehci 40200100.ehci: irq 52, io mem 0x40200100
[    8.332618][    T1] oxnas-ehci 40200100.ehci: USB 2.0 started, EHCI 1.00
[    8.339630][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    8.348625][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.356546][    T1] usb usb1: Product: EHCI Host Controller
[    8.362094][    T1] usb usb1: Manufacturer: Linux 5.4.210-oxnas-tld-1 ehci_hcd
[    8.369315][    T1] usb usb1: SerialNumber: 40200100.ehci
[    8.375802][    T1] hub 1-0:1.0: USB hub found
[    8.380380][    T1] hub 1-0:1.0: 2 ports detected
[    8.386378][    T1] usbcore: registered new interface driver cdc_wdm
[    8.392921][    T1] usbcore: registered new interface driver usb-storage
[    8.399843][    T1] usbcore: registered new interface driver usbserial_generic
[    8.407134][    T1] usbserial: USB Serial support registered for generic
[    8.414686][    T1] mousedev: PS/2 mouse device common for all mice
[    8.421066][    T1] i2c /dev entries driver
[    8.426764][    T1] hidraw: raw HID events driver (C) Jiri Kosina
[    8.433141][    T1] usbcore: registered new interface driver usbhid
[    8.439383][    T1] usbhid: USB HID core driver
[    8.445867][    T1] NET: Registered protocol family 10
[    8.452912][    T1] Segment Routing with IPv6
[    8.457418][    T1] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    8.466347][    T1] NET: Registered protocol family 17
[    8.471925][    T1] Key type dns_resolver registered
[    8.477634][    T1] registered taskstats version 1
[    8.482411][    T1] Loading compiled-in X.509 certificates
[    8.488125][    T1] zswap: loaded using pool lzo/zbud
[    8.493839][    T1] Key type ._fscrypt registered
[    8.498531][    T1] Key type .fscrypt registered
[    8.591342][    T1] Key type big_key registered
[    8.635760][    T1] Key type encrypted registered
[    8.672647][   T21] usb 1-1: new high-speed USB device number 2 using oxnas-ehci
[    8.874455][   T21] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=77.64
[    8.883368][   T21] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    8.891200][   T21] usb 1-1: Product: USB2.0 Hub
[    8.897082][   T21] hub 1-1:1.0: USB hub found
[    8.901964][   T21] hub 1-1:1.0: 4 ports detected
[    8.902630][   T26] oxnas-pcie 47c00000.pcie-controller: PCIe version/deviceID 0x82510b5
[    8.914856][   T26] oxnas-pcie 47c00000.pcie-controller: link up
[    8.921121][   T26] oxnas-pcie 47c00000.pcie-controller: PCI host bridge to bus 0000:00
[    8.929157][   T26] pci_bus 0000:00: root bus resource [mem 0x48000000-0x49ffffff]
[    8.936739][   T26] pci_bus 0000:00: root bus resource [mem 0x4a000000-0x4bdfffff pref]
[    8.944757][   T26] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff]
[    8.951697][   T26] pci_bus 0000:00: root bus resource [bus 00-7f]
[    8.957928][   T26] pci 0000:00:00.0: [1814:3090] type 00 class 0x028000
[    8.964687][   T26] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x0000ffff]
[    8.973004][   T26] PCI: bus0: Fast back to back transfers disabled
[    8.979274][   T26] pci 0000:00:00.0: BAR 0: assigned [mem 0x48000000-0x4800ffff]
[    8.987430][    T1] hctosys: unable to open rtc device (rtc0)
[    9.222609][   T21] usb 1-1.3: new high-speed USB device number 3 using oxnas-ehci
[    9.379832][   T21] usb 1-1.3: New USB device found, idVendor=058f, idProduct=6387, bcdDevice= 1.ff
[    9.388915][   T21] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    9.396948][   T21] usb 1-1.3: SerialNumber: 4D1A1CBB
[    9.403197][   T21] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[    9.411069][   T21] scsi host1: usb-storage 1-1.3:1.0
[   10.474944][   T21] scsi 1:0:0:0: Direct-Access              PHILIPS          8.07 PQ: 0 ANSI: 4
[   10.486935][    T7] sd 1:0:0:0: [sdb] 61440000 512-byte logical blocks: (31.5 GB/29.3 GiB)
[   10.496527][    T7] sd 1:0:0:0: [sdb] Write Protect is off
[   10.503006][    T7] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   10.594457][    T7]  sdb: sdb1 sdb2
[   10.603008][    T7] sd 1:0:0:0: [sdb] Attached SCSI removable disk
[   38.292602][   T75] sata_oxnas: resetting SATA core
[   38.634511][   T75] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[   38.642229][   T75] ata1.00: failed command: READ DMA
[   38.647339][   T75] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 2 dma 4096 in
[   38.647339][   T75]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[   38.663306][   T75] ata1.00: status: { DRDY }
[   38.667655][   T75] ata1: hard resetting link
[   39.172613][   T75] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[   39.180810][   T75] ata1.00: configured for UDMA/133
[   39.185827][   T75] ata1.00: device reported invalid CHS sector 0
[   39.191925][   T75] ata1: EH complete
[   69.632596][   T75] sata_oxnas: resetting SATA core
[   69.974489][   T75] ata1.00: limiting speed to UDMA/100:PIO4
[   69.980139][   T75] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[   69.987909][   T75] ata1.00: failed command: READ DMA
[   69.993000][   T75] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 2 dma 4096 in
[   69.993000][   T75]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[   70.008954][   T75] ata1.00: status: { DRDY }
[   70.013329][   T75] ata1: hard resetting link
[   70.512616][   T75] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[   70.520803][   T75] ata1.00: configured for UDMA/100
[   70.525824][   T75] ata1.00: device reported invalid CHS sector 0
[   70.531927][   T75] ata1: EH complete

Unfortunatelly this did not work. It was only later I came accross this post expalaining you need a specific (older) mSATA card to make this work. I found an older 16GB model on ebay and this one worked without any problems.

The 5V needed for the mSATA to SATA adapter was found by combining the +5V from an USB connector and ground, like you can see in the picture below.

Things started to work ... and then ...

Device hangs after starting a few services

After starting a few services, the device just "hung" and did not show a login prompt.

LABEL=rootfs is mounted
Done checking file systems.
Log is being saved in /var/log/fsck/checkfs if that location is writable.
Cleaning up temporary files...Cleaning /tmp...done.
 /tmp.
Will now mount local filesystems:.
Will now activate swapfile swap, if any:done.
Checking minimum space in /tmp...done.
Cleaning up temporary files....
[   23.062643] random: dd: uninitialized urandom read (512 bytes read)
Initializing random number generator...done.
Starting Setting kernel variables: sysctl.
[   23.385909] oxnas-dwmac 40400000.ethernet eth0: No phy led trigger registered for speed(-1)
[   23.394334] RTL8211DN Gigabit Ethernet stmmac-0:00: attached PHY driver [RTL8211DN Gigabit Ethernet] (mii_bus:phy_addr=stmmac-0:00, irq=POLL)
[   23.411025] oxnas-dwmac 40400000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[   23.420884] oxnas-dwmac 40400000.ethernet eth0: registered PTP clock
[   23.428413] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Configuring network interfaces...done.
Cleaning up temporary files....
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Starting cloudflared
[   24.498803] oxnas-dwmac 40400000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   24.508866] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
972 (syslogd)
.
[   25.142958] random: dbus-daemon: uninitialized urandom read (12 bytes read)
[   25.171128] random: use-ipv6.pl: uninitialized urandom read (4 bytes read)
[   25.252316] random: dbus-daemon: uninitialized urandom read (12 bytes read)
Starting periodic command scheduler: cron.
Starting system message bus: dbus.
[   26.160760] random: use-ipv6.pl: uninitialized urandom read (4 bytes read)
[   26.439539] random: avahi-daemon: uninitialized urandom read (4 bytes read)
[   26.520209] random: avahi-daemon: uninitialized urandom read (4 bytes read)
Starting NTP server: ntpd.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Starting web server: lighttpd.
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1005 (klogd)
.
[   27.406026] random: pihole-FTL: uninitialized urandom read (44 bytes read)
[   27.448348] random: pihole-FTL: uninitialized urandom read (128 bytes read)
[   27.455308] random: pihole-FTL: uninitialized urandom read (48 bytes read)
Not running

FTL started!

Just before it starts to hang, I could read random: SOME SERVICE: uninitialized urandom read (44 bytes read). In the snippet above, it hung while starting pihole-FTL, but it can actually hang on any service, for example SSHd.

Apparently, this is caused by "entropy starvation". There are a bunch of services that need random numbers from /dev/urandom and because there is not enough entropy ... the services can't get these numbers, resulting in "long" boot times or just hanging. This does not happen when booting from USB ... for some reason ...

I solved this by installing haveged and now it boots fine and fast.

INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Starting cloudflared
[   24.489100] oxnas-dwmac 40400000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   24.504640] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
968 (syslogd)
.
Starting periodic command scheduler: cron.
[   25.448983] random: use-ipv6.pl: uninitialized urandom read (4 bytes read)
[   25.494376] random: dbus-daemon: uninitialized urandom read (12 bytes read)
[   25.636006] random: dbus-daemon: uninitialized urandom read (12 bytes read)
Starting system message bus: dbus.
Starting entropy daemon: havegedhaveged: command socket is listening at fd 3
.
[   26.579276] random: use-ipv6.pl: uninitialized urandom read (4 bytes read)
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1005 (klogd)
.
[   27.001203] random: avahi-daemon: uninitialized urandom read (4 bytes read)
[   27.105420] random: avahi-daemon: uninitialized urandom read (4 bytes read)
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Starting NTP server: ntpd.
Starting web server: lighttpd.
[   28.210785] random: pihole-FTL: uninitialized urandom read (44 bytes read)
[   28.243793] random: pihole-FTL: uninitialized urandom read (128 bytes read)
[   28.250864] random: pihole-FTL: uninitialized urandom read (48 bytes read)
Not running

FTL started!

[   29.765719] random: crng init done
Starting OpenBSD Secure Shell server: sshd.
Running local boot scripts (/etc/rc.local)
.

Debian GNU/Linux 11 pogo02 ttyS0

pogo02 login:

I guess it seems a bit of overkill buying a bunch of stuff to resurrect old hardware but raspberry pi's have become very expensive these days so it made sense to me to repurpose the old plugs instead.

Comments

Popular posts from this blog

Remove copy protection from PDF documents

The story of the Cobalt Qube

Jori Hulkkonen feat. Jerry Valuri - Lo-Fiction