Recovery (Home Media CE)

From NAS-Central Iomega Wiki
Jump to: navigation, search
Warning.png Warning: This article is about recovering of the firmware, not recovery of lost data. Actually all existing data will be deleted when using this recovery method.

Prerequisites

The Iomega Home Media Network Hard Drive Cloud Edition (HMNHDCE) boots entirely from harddisk. There is no flash-memory in the system at all. The first 32 MB of the harddisk store various system files that are needed for booting. You can find details here. The content of these first 32 MB has to be intact for the recovery procedure. You will need a PC and a USB-Stick with at least 512MB free space (the free space is needed when the recovery files are already on it, so a 512MB stick will NOT work, you'll need at least 1GB).

Preparing the USB-Stick

Linux

  • If your USB-Stick is not formatted with FAT already, do it now (Warning: This will erase all data on it):
mkfs -t vfat /dev/sdX1

(replace the X with the correct letter for your usb-stick)

  • create mount point and mount stick
mkdir -p /mnt/hmnhdce-recover && mount /dev/sdX1 /mnt/hmnhdce-recover

(replace the X with the correct letter for your usb-stick)

perl <<EOF > /mnt/hmnhdce-recover/bootrom.txt
      print "\x00" x 0x1a4;
      print "\x00\x5f\x01\x00";
      print "\x00\xdf\x00\x00";
      print "\x00\x80\x00\x00";
      print "\x00" x (0x1b0 -0x1a4 -12 );
      print "\x22\x80\x00\x00";
      print "\x22\x00\x00\x00";
      print "\x00\x80\x00\x00";
EOF
  • create special directory on the stick, where images are picked up during recovery boot:
mkdir -p /mnt/hmnhdce-recover/emctools/hmnhd_images
  • copy the decrypted firmware archive to the stick:
cp imager_3.1.14.995.tgz /mnt/hmnhdce-recover/emctools/hmnhd_images/
  • create trigger file for full recovery:
touch /mnt/hmnhdce-recover/emctools/hmnhd_images/reinstall

Windows

  • Format the USB Stick as FAT (this will erase all data on it)
  • Open the Explorer, go to the drive of the USB stick and recreate this file/directory structure:
+--G:
   +--emctools
   |  +--hmnhd_images
   |     +--imager_3.1.14.995.tgz
   |     +--reinstall
   +--bootrom.txt

Recovery Boot

  • Power off HMNHDCE by pulling the power cord.
  • Put the prepared USB-Stick in.
  • Press and hold Reset-Button while plugging in power cord (refer to [picture], use a needle or similar tool).
  • Release the button when the activity LED of the USB-Stick starts to flicker.
  • Wait until HMNHDCE powers down on its own.
  • Pull the stick.
  • Pull the power cord and reattach it to reboot.
  • You should be able to reach the webinterface now.
  • Optional: Do a factory reset.
  • Give feedback in the forum.

Recovery Log

A successful recovery looks on the serial console like this:

Attempting to set PLLA to 600MHz ...
  plla_ctrl0 : 0x0000021A
  plla_ctrl1 : 0x00480000
  plla_ctrl2 : 0x008F008B
  plla_ctrl3 : 0x00000154
PLLA Set

Setup memory, testing
Reading disk 0, Image 0
  Sector : 0x0000009A
  Hdr len: 0x00019480
  Hdr CRC: 0x94C61658
 OK
Initialising disks
SATA PHY not ready for device 1
Detecting SATA busses:
Bus 0: Found first device OK
  Device 0: Model: SAMSUNG SP1614C  Firm: SW100-34 Ser#: S01XJ20Y136883
            Type: Hard Disk
            Capacity: 131071.9 MB = 127.9 GB (268435455 x 512)
  Device 1: not available
Environment successfully read from disk 0 primary image


U-Boot 1.1.2 (Jun  9 2011 - 14:14:20)

U-Boot code: 60D00000 -> 60D19480  BSS: -> 60D1D110
RAM Configuration:
        Bank #0: 60000000 256 MB
SRAM Configuration:
        64KB at 0x50000000
In:    serial
Out:   serial
Err:   serial
Setting Linux mem= boot arg value

IDE read: device 0 block # 288, count 1 ... 1 blocks read: OK
Hit any key to stop autoboot:  0

IDE device 0: Model: SAMSUNG SP1614C  Firm: SW100-34 Ser#: S01XJ20Y136883
            Type: Hard Disk
            Capacity: 131071.9 MB = 127.9 GB (268435455 x 512)
... is now current device

IDE read: device 0 block # 1290, count 5700 ... 5700 blocks read: OK

IDE read: device 0 block # 16674, count 5700 ... 5700 blocks read: OK
## Booting image at 60500000 ...
   Image Name:   Linux-2.6.31.14
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2189140 Bytes =  2.1 MB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 60800000 ...
   Image Name:
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    2787475 Bytes =  2.7 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux.............................................................                                                                              ........................................................................ done, b                                                                              ooting the kernel.
[    0.000000] Linux version 2.6.31.14 (soho@bsoho089.lss.emc.com) (gcc version                                                                               4.3.2 (crosstool-NG-1.3.1) ) #1 SMP Thu Sep 8 12:39:35 EDT 2011
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr                                                                              =00c5387f
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction ca                                                                              che
[    0.000000] Machine: Oxsemi NAS
[    0.000000] 1 memory region
[    0.000000] Ignoring unrecognised tag 0x00000000
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pag                                                                              es: 65024
[    0.000000] Kernel command line: root=/dev/md0 console=ttyS0,115200 elevator=                                                                              cfq mem=256M poweroutage=yes mac_adr=0x00,0xd0,0xb8,0x19,0x81,0xfb
[    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: 252544KB available (3768K code, 275K data, 136K init, 0K                                                                               highmem)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:96
[    0.000000] OX820_RPS_init_irq: interrupts 64 to 96
[    0.000000] ox820_clocksource_init() Timer 2 running at 390625 Hz
[    0.010000] Console: colour dummy device 80x30
[    0.010000] console [ttyS0] enabled
[    0.020000] Calibrating delay loop... 239.20 BogoMIPS (lpj=1196032)
[    0.260000] Security Framework initialized
[    0.260000] Mount-cache hash table entries: 512
[    0.270000] CPU: Testing write buffer coherency: ok
[    0.270000] Calibrating local timer... 299.99MHz.
[    0.340000] CPU1: Booted secondary processor
[    0.440000] Calibrating delay loop... 239.20 BogoMIPS (lpj=1196032)
[    0.680000] Brought up 2 CPUs
[    0.690000] SMP: Total of 2 processors activated (478.41 BogoMIPS).
[    0.700000] NET: Registered protocol family 16
[    0.700000] Number of DMA channels = 4, version = 4
[    0.710000] Reserving a DMA channel for ODRB
[    0.710000] Allocating 475 SRAM generic DMA descriptors
[    0.730000] bio: create slab <bio-0> at 0
[    0.740000] SCSI subsystem initialized
[    0.740000] usbcore: registered new interface driver usbfs
[    0.750000] usbcore: registered new interface driver hub
[    0.760000] usbcore: registered new device driver usb
[    0.790000] NET: Registered protocol family 2
[    0.790000] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.800000] Switched to NOHz mode on CPU #0
[    0.800000] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.800000] Switched to NOHz mode on CPU #1
[    0.810000] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.820000] TCP: Hash tables configured (established 8192 bind 8192)
[    0.820000] TCP reno registered
[    0.830000] NET: Registered protocol family 1
[    0.830000] Trying to unpack rootfs image as initramfs...
[    0.840000] rootfs image is not initramfs (no cpio magic); looks like an init                                                                              rd
[    0.880000] Freeing initrd memory: 2720K
[    0.880000] Create fragment cache
[    0.890000] fuse init (API version 7.12)
[    0.890000] SGI XFS with ACLs, security attributes, large block/inode numbers                                                                              , no debug enabled
[    0.900000] msgmni has been set to 499
[    0.910000] alg: No test for stdrng (krng)
[    0.910000] io scheduler noop registered
[    0.920000] io scheduler anticipatory registered
[    0.920000] io scheduler deadline registered
[    0.930000] io scheduler cfq registered (default)
[    0.950000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.960000] serial8250: ttyS0 at MMIO 0x44200000 (irq = 55) is a 16550A
[    0.980000] brd: module loaded
[    0.990000] loop: module loaded
[    0.990000] ox820sata: OX820 sata core.
[    1.000000] scsi0 : oxnassata
[    1.000000] scsi1 : oxnassata
[    1.010000] ata1: SATA max UDMA/133 irq 50
[    1.010000] ata2: SATA max UDMA/133 irq 50
[    1.020000] ox820sata: reseting SATA core
[    1.540000] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    1.540000] ata1.00: ATA-7: SAMSUNG SP1614C, SW100-34, max UDMA7
[    1.550000] ata1.00: 312581808 sectors, multi 0: LBA48
[    1.560000] ata1.00: configured for UDMA/133
[    1.560000] ox820sata: reseting SATA core
[    2.280000] ata2: SATA link down (SStatus 0 SControl 300)
[    2.280000] scsi 0:0:0:0: Direct-Access     ATA      SAMSUNG SP1614C  SW10 PQ                                                                              : 0 ANSI: 5
[    2.290000] sd 0:0:0:0: [sda] 312581808 512-byte logical blocks: (160 GB/149                                                                               GiB)
[    2.300000] sd 0:0:0:0: [sda] Write Protect is off
[    2.300000] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, does                                                                              n't support DPO or FUA
[    2.310000] tun: Universal TUN/TAP device driver, 1.6
[    2.310000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    2.310000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.310000] Start USB clocks
[    2.310000] oxnas-ehci oxnas-ehci.0: OXNAS EHCI Host Controller
[    2.310000] oxnas-ehci oxnas-ehci.0: new USB bus registered, assigned bus num                                                                              ber 1
[    2.340000] oxnas-ehci oxnas-ehci.0: irq 39, io mem 0x00000000
[    2.350000]  sda:
[    2.360000] oxnas-ehci oxnas-ehci.0: USB 0.0 started, EHCI 1.00
[    2.360000] usb usb1: configuration #1 chosen from 1 choice
[    2.370000] hub 1-0:1.0: USB hub found
[    2.370000] hub 1-0:1.0: 2 ports detected
[    2.380000] Initializing USB Mass Storage driver...
[    2.380000] usbcore: registered new interface driver usb-storage
[    2.390000] USB Mass Storage support registered.
[    2.390000] usbcore: registered new interface driver ums-alauda
[    2.400000] usbcore: registered new interface driver ums-datafab
[    2.410000] usbcore: registered new interface driver ums-freecom
[    2.410000] usbcore: registered new interface driver ums-isd200
[    2.420000] usbcore: registered new interface driver ums-jumpshot
[    2.430000] usbcore: registered new interface driver ums-sddr09
[    2.430000] usbcore: registered new interface driver ums-sddr55
[    2.440000]  sda1 sda2
[    2.440000] usbcore: registered new interface driver ums-usbat
[    2.450000] mice: PS/2 mouse device common for all mice
[    2.450000] md: linear personality registered for level -1
[    2.460000] md: raid0 personality registered for level 0
[    2.460000] md: raid1 personality registered for level 1
[    2.470000] device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-d                                                                              evel@redhat.com
[    2.480000] TCP cubic registered
[    2.480000] NET: Registered protocol family 17
[    2.490000] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.490000] md: Waiting for all devices to be available before autodetect
[    2.500000] md: If you don't use raid, use raid=noautodetect
[    2.510000] md: Autodetecting RAID arrays.
[    2.540000] md: Scanned 1 and added 1 devices.
[    2.540000] md: autorun ...
[    2.550000] md: considering sda1 ...
[    2.550000] md:  adding sda1 ...
[    2.550000] md: created md0
[    2.560000] md: bind<sda1>
[    2.560000] md: running: <sda1>
[    2.560000] md0: detected capacity change from 0 to 21474770944
[    2.570000] md: ... autorun DONE.
[    2.570000] RAMDISK: gzip image found at block 0
[    2.700000] usb 1-2: new high speed USB device using oxnas-ehci and address 2
[    3.000000] usb 1-2: configuration #1 chosen from 1 choice
[    3.020000] scsi2 : SCSI emulation for USB Mass Storage devices
[    3.240000] VFS: Mounted root (ext2 filesystem) on device 1:0.
Looking for shell in cmdline: root=/dev/md0 console=ttyS0,115200 elevator=cfq me                                                                              m=256M poweroutage=yes mac_adr=0x00,0xd0,0xb8,0x19,0x81,0xfb
Start Blinking Power LED
USB Device node is /dev/sdb1
Started
/dev/buttons file does not exist creating it
Opened /dev/buttons with fd 3
The Button ID from drive is 2 state is 2
Reset Button is pressed
Checking to see the if the reset button is pressed or not
Checking if there is an attached EMC Imager
[    8.020000] scsi 2:0:0:0: Direct-Access     Generic  Flash Disk       8.07 PQ                                                                              : 0 ANSI: 2
[    8.030000] sd 2:0:0:0: [sdb] 15663104 512-byte logical blocks: (8.01 GB/7.46                                                                               GiB)
[    8.040000] sd 2:0:0:0: [sdb] Write Protect is off
[    8.040000] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[    8.050000] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[    8.060000]  sdb: sdb1
[    8.420000] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[    8.430000] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[   13.370000] FAT: utf8 is not a recommended IO charset for FAT filesystems, fi                                                                              lesystem will be case sensitive!
Checking for pre-image script... none.
Image tar file found: /usb_drive/emctools/hmnhd_images/*.tgz
Extract Image tar file.
apps
apps.md5
config
config.md5
initrd
initrd.md5
oem
oem.md5
stage1.wrapped
stage1.wrapped.md5
u-boot.wrapped
u-boot.wrapped.md5
zImage
zImage.md5
apps is valid
config is valid
initrd is valid
zImage is valid
Found EMC Imager with apps and config image...
Started USB Imaging...
[  248.410000]  md0: unknown partition table
  2 logical volume(s) in volume group "md0_vg" now active
[  250.230000] EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
Going to do a full install
Reading the old environment values
16+0 records in
16+0 records out
[  253.090000] md: md0 stopped.
[  253.090000] md: unbind<sda1>
[  253.120000] md: export_rdev(sda1)
mdadm: stopped /dev/md0
---Creating partitions
32+0 records in
32+0 records out
Information: You may need to update /etc/fstab.

Information: You may need to update /etc/fstab.

Information: You may need to update /etc/fstab.

---Writing bootrom directions
0+1 records in
0+1 records out
---Writing hidden sectors
17+1 records in
17+1 records out
202+1 records in
202+1 records out
4275+1 records in
4275+1 records out
5444+1 records in
5444+1 records out
17+1 records in
17+1 records out
202+1 records in
202+1 records out
4275+1 records in
4275+1 records out
16+0 records in
16+0 records out
[  258.610000] md: bind<sda1>
[  258.620000] md0: detected capacity change from 0 to 21474770944
mdadm: array /dev/md0 started.
[  258.650000]  md0: unknown partition table
  WARNING: Forcing physical volume creation on /dev/md0 of volume group "md0_vg"
  Physical volume "/dev/md0" successfully created
  Volume group "md0_vg" successfully created
  Logical volume "BFDlv" created
mke2fs 1.41.3 (12-Oct-2008)
ext2fs_check_if_mount: No such file or directory while determining whether /dev/md0_vg/BFDlv is mounted.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
262144 inodes, 1048576 blocks
52428 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1073741824
32 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
  1 logical volume(s) in volume group "md0_vg" now active
Copied apps config and oem image
Copied kernel image
BusyBox v1.9.2 (2011-07-22 13:36:28 EDT) multi-call binary

Usage: cp [OPTION]... SOURCE DEST

Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY

Options:
        -a      Same as -dpR
        -d,-P   Preserve links
        -H,-L   Dereference all symlinks (default)
        -p      Preserve file attributes if possible
        -f      Force overwrite
        -i      Prompt before overwrite
        -R,-r   Recurse directories
        -l,-s   Create (sym)links

BusyBox v1.9.2 (2011-07-22 13:36:28 EDT) multi-call binary

Usage: cp [OPTION]... SOURCE DEST

Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY

Options:
        -a      Same as -dpR
        -d,-P   Preserve links
        -H,-L   Dereference all symlinks (default)
        -p      Preserve file attributes if possible
        -f      Force overwrite
        -i      Prompt before overwrite
        -R,-r   Recurse directories
        -l,-s   Create (sym)links

4275+1 records in
4275+1 records out
5444+1 records in
5444+1 records out
Remove the temp folder.
Imaging Successful. Please remove the USB drive before the next power on

Complete Recovery

If you've messed up the first 32MB of your drive, or if your drive died and you need to start with a fresh hard disk, you need to restore the first 32MB of the HDD. These instructions are also for Linux, if you don't have Linux, you can use a Live Linux-CD, see above.

  1. Download the recovery file from here: http://downloads.iomega.nas-central.org/Users/seidler2547/HMNHD-CE/Iomega-HMNHD-CE-1st-32M.img.gz
  2. Verify which drive (/dev/sdX) is the hard drive that you want to use in your Iomega HMNHD-CE for example by using
    dmesg|egrep 'sd |scsi'
    or
    lsscsi
  3. Then, restore the base loader
    zcat Iomega-HMNHD-CE-1st-32M.img.gz | dd of=/dev/sdX bs=1M
  4. Follow the normal recovery procedure from above


Solo 19:09, 15 January 2012 (UTC)