How to install firmware to an empty hard disk

How to install firmware to an empty hard disk

Postby maesoser » Tue Dec 06, 2016 4:53 pm

Hi! I recently adquired a Cloudbox case but the hard disk (3Tb) was wiped out. That's what I did to recover it:

I checked that the drive had a single ext2 partition.
I also installed a Serial2Usb dongle in order to watch the uboot process.

First I tried to be legal and installed the Lacie Network Assistant (LNA). I connected the drive straight to my laptop and then I configured the laptop to have a static IP and started the Recovery Mode on LNA. I selected the last original Lacie firmware ( well.. "capsule") and started the process. That's the output (Spoiler alert, the last lines are the most interesting ones):

Code: Select all
CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
SCSI:  Error SCSI Controller (11AB,6121) not found
Net:   egiga0 [PRIME]
egiga0 no link
egiga0 no link
egiga0 no link
egiga0 no link
egiga0 no link
Waiting for LUMP (3)
no lump receive; continuing
Hit any key to stop autoboot:  0

Reset IDE:
Marvell Serial ATA Adapter

Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (5)
  Device 0 @ 0 0:
Model: ST3000DM001-1CH166                       Firm: CC44     Ser#:             Z1F2DV9G
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
PCIe SATA:ffffffff

Booting Nexus layout from disk 0...
** Bad partition - ide 0:3 **
Booting Nexus layout from disk 1...
** Bad partition 3 **
Boot Nexus rescue from disk 0...
Loading file "/rescue/uImage" from ide device 0:2 (gpt2
)
** Bad partition - ide 0:2 **
Boot Nexus rescue from disk 1...
** Bad partition 2 **
Booting legacy layout...

Loading from IDE device 0, partition 6: Name: gpt6
  Type: U-Boot

** Bad Magic Number **

** Device 1 not available
Waiting for LUMP (0)
Lump received switching to NetConsole on 192.168.1.1
Uncompressing Linux......... // ............ done, booting the kernel.

[    0.000000] Linux version 2.6.31.14-svn7493 (root@Poutre1_node10_x86_32.lacie.com) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202) ) #1 Fri May 29 20:06:32 UTC 2015
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: familybox
[    0.000000] Using UBoot passing parameters structure
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,115200 tftp_server=192.168.1.1 static_addr=192.168.1.250 cap=gpt,lba64
[    0.000000] PID hash table entries: 1024 (order: 10, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 256MB = 256MB total
[    0.000000] Memory: 249728KB available (9320K code, 371K data, 140K init, 0K highmem)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:114
[   25.769944] Console: colour dummy device 80x30
[   25.769979] Calibrating delay loop... 999.42 BogoMIPS (lpj=4997120)
[   26.029961] Mount-cache hash table entries: 512
[   26.030293] CPU: Testing write buffer coherency: ok
[   26.032296] NET: Registered protocol family 16
[   26.034633] Feroceon L2: Enabling L2
[   26.034672] Feroceon L2: Cache support initialised.
[   26.035210] CPU Interface
[   26.035222] SDRAM_CS0 ....base 00000000, size 256MB
[   26.035237] SDRAM_CS1 ....disable
[   26.035245] SDRAM_CS2 ....disable
[   26.035253] SDRAM_CS3 ....disable
[   26.035262] PEX0_MEM ....base e8000000, size 128MB
[   26.035277] PEX0_IO ....base f2000000, size   1MB
[   26.035292] INTER_REGS ....base f1000000, size   1MB
[   26.035305] NFLASH_CS ....base fa000000, size   2MB
[   26.035320] SPI_CS ....base f4000000, size  16MB
[   26.035338] BOOT_ROM_CS ....no such
[   26.035359] DEV_BOOTCS ....no such
[   26.035382] CRYPT_ENG ....base f0000000, size   2MB
[   31.882695] rtc-mv rtc-mv: setting system clock to 2067-03-25 13:04:19 UTC (3068283859)
[   32.069860] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   32.109890] ata1.00: ATA-8: ST3000DM001-1CH166, CC44, max UDMA/133
[   32.116042] ata1.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   32.359946] ata1.00: configured for UDMA/133
[   32.364472] scsi 0:0:0:0: Direct-Access     ATA      ST3000DM001-1CH1 CC44 PQ: 0 ANSI: 5
[   32.373351] sd 0:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
[   32.381086] sd 0:0:0:0: [sda] 4096-byte physical blocks
[   32.386597] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   32.392279] sd 0:0:0:0: [sda] Write Protect is off
[   32.397145] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   32.406657]  sda: sda1
[   32.470936] sd 0:0:0:0: [sda] Attached SCSI disk
[   32.475557] Freeing init memory: 140K
[   32.479756] Freeing initramfs memory: 4312K
Entering runlevel base
 * Starting mount-base
 * Starting parse-cmdline
 * Starting get-board-id
 * Starting populate-dev
 * Starting kmap
Entering runlevel capsule
 * Starting network
 * Starting ipcommd
 * Starting check-capsule
Entering runlevel update-capsule
 * Starting start-raid
 * Starting assemble-rootfs
mount: can't find /rootfs in /etc/fstab
mount: can't find /rootfs in /proc/mounts
mount: can't find /rootfs in /proc/mounts
mount: mounting /dev/md6 on /rootfs/rw failed: No such file or directory
cp: can't stat '/rootfs/var/.': No such file or directory
cp: can't stat '/rootfs/etc/.': No such file or directory
cp: can't stat '/rootfs/root/.': No such file or directory
mount: mounting /rootfs/rw//var on /rootfs/var failed: No such file or directory
mount: mounting /rootfs/rw//etc on /rootfs/etc failed: No such file or directory
mount: mounting /rootfs/rw//root on /rootfs/root failed: No such file or directory
mount: mounting none on /rootfs/tmp failed: No such file or directory
 * Starting update-capsule
ERROR: Abort: nv_data partition /dev/sd?3 is invalid. Please check.
mount: mounting /rootfs/rw on /rw failed: Invalid argument
INFO:  * Retrieving
BusyBox v1.19.2 (2015-05-29 17:55:38 UTC) multi-call binary.

Usage: dirname FILENAME

Strip non-directory suffix from FILENAME

tftp: can't open '/rw/capsule/': Is a directory
ERROR: Abort: nv_data partition /dev/sd?3 is invalid. Please check.
/sbin/nexus_update.sh: line 85: arithmetic syntax error
ERROR: Unkown update file format for /rw/capsule
 * Stopping assemble-rootfs
 * Starting reboot
[   40.080189] Restarting system.


I think it's because my drive does not have the partitions structure that it is supposed to have, but I did not have enough information to rebuild it. Could someone provide me that data? Do you have another idea to bring bag to life this hard disk?

Thanks in advance.
maesoser
 
Posts: 3
Joined: Sun Dec 04, 2016 9:54 pm

Re: How to install firmware to an empty hard disk

Postby fvdw » Tue Dec 06, 2016 6:02 pm

Could someone provide me that data? Do you have another idea to bring bag to life this hard disk?


Setting up a cloudbox with lacie firmware is complicated as it uses raid setup for several partitions. Why they do that for a single disk nas? No idea. Further you will need the partition images, I don't have those. You can find several topics in the cloudbox forum of plugout were you can find the required partition table but not the images of the partitions as nobody has post them until today.

You could install our firmware as alternative ;)
fvdw
Site Admin - expert
 
Posts: 13472
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: How to install firmware to an empty hard disk

Postby maesoser » Thu Dec 08, 2016 6:56 pm

Oh, I finally did it. It The interface is ugly (personal opinion) but you've unleashed the power of linux! And that's pretty cool.

For instance, I didn't like the function of the leds (Is the red one even in use?) so I wrote a couple of scripts to change their behavior. The first script runs at boot and changes the behaviour of the blue one to make it more "stealth" and the second one runs every 10 minutes (with cron) and checks the temperature of the drive. I still have to test if this script affects the auto spin-down option....

Code: Select all
#!/bin/sh
echo timer > /sys/class/leds/familybox\:blue\:sata/trigger
echo 50 > /sys/class/leds/familybox\:blue\:sata/delay_on
echo 3000 > /sys/class/leds/familybox\:blue\:sata/delay_off


and

Code: Select all
#!/bin/sh
HDTEMP=$(smartctl -A /dev/sda | grep Temperature_Celsius | awk '{print $4}' | bc)
ALERTTEMP=55
if [ "$HDTEMP" -ge "$ALERTTEMP" ]; then
        echo heartbeat > /sys/class/leds/familybox\:red\:sata/trigger
fi
maesoser
 
Posts: 3
Joined: Sun Dec 04, 2016 9:54 pm

Re: How to install firmware to an empty hard disk

Postby Jocko » Thu Dec 08, 2016 8:15 pm

Yes it is a personal opinion issue...
maesoser wrote:HDTEMP=$(smartctl -A /dev/sda | grep Temperature_Celsius | awk '{print $4}' | bc)
:disapprove
use smartctl to get disk temp is not a good idea.
Indeed according with the disk manufactor you do not have directly the current temperature
Code: Select all
root@Sargas:/ # smartctl -A /dev/sda | grep Temperature_Celsius | awk '{print $4}'|bc
94
:shocked
Jocko
Site Admin - expert
 
Posts: 11558
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France


Return to Lacie cloudbox (white casing)

Who is online

Users browsing this forum: Bing Bot and 16 guests