Can my GoFlex Home be resurrected?

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Can my GoFlex Home be resurrected?

Postby kaworu1986 » Fri May 08, 2020 11:46 pm

I dusted off my GoFlex Home yesterday after some 7 years in storage and messed up: after getting it to boot the first time (it acquired a DHCP lease) but unable to SSH into it I just switched it off and now it doesn't even get an IP address anymore.

Assuming I may have messed up the filesystem I shucked its HDD, hooked it up to my PC, formatted/partitioned/extracted the latest base image to the first ext3 partition following the spirit of the instructions here.

Still no boot.

Is there any way of unbricking the thing that doesn't require soldering at this point?

I remember following the instructions on the ArchLinux ARM website (likely the same page) back in the day to get it installed in the first place.
kaworu1986
 
Posts: 6
Joined: Fri May 08, 2020 11:33 pm

Re: Can my GoFlex Home be resurrected?

Postby moonman » Sat May 09, 2020 3:32 am

It should be working, theoretically. Unless you changed some U-Boot env variables before to suite your needs before, and now it's not standard.

Just for gigles you can try ext2 fs instead, although it probably won't make any different as ext3=ext2+journal

You can try and see if you have U-Boot with netconsole installed.
viewtopic.php?f=53&t=8857 - skip to the netconsole section - this was the same on older versions.

If all that fails, serial console is the only way to find out what's going wrong at boot and it doesn't require soldering, but does require an adapter.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Can my GoFlex Home be resurrected?

Postby kaworu1986 » Sat May 09, 2020 7:11 am

Turns out messing with home automation helps in unexpected ways: I have an USB to serial adapter and some jumper cables already...

I cracked the base open, hooked up a serial connection and this is what I get:
$this->bbcode_second_pass_code('', '
** Can't read from device 0 **

** Unable to use ide 0:1 for fatload **
No Powersaving mode 7F
Error (no IRQ) dev 0 blk 0: status 0x7f
** Can't read from device 0 **

** Unable to use ide 0:1 for fatload **
** Bad partition 1 **
** Bad partition 1 **
No Powersaving mode 7F
Error (no IRQ) dev 1 blk 0: status 0x7f
** Can't read from device 1 **

** Unable to use ide 1:1 for fatload **
No Powersaving mode 7F
Error (no IRQ) dev 1 blk 0: status 0x7f
** Can't read from device 1 **

** Unable to use ide 1:1 for fatload **
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:ramdisk", error -19
Error reading superblock on volume 'ubi:ramdisk'!
UBIFS not mounted, use ubifs mount to mount volume first!
Marvell>>


U-Boot 2010.09 (Feb 16 2011 - 18:44:23)
UBIT v0.6 by Jeff Doozan and Peter Carmichael

SoC: Kirkwood 88F6281_A0
DRAM: 128 MiB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Net: egiga0
88E1116 Initialized on egiga0
Creating 1 MTD partitions on "nand0":
0x000000700000-0x000010000000 : "mtd=2"
UBI: attaching mtd1 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 error: validate_ec_hdr: bad VID header offset 2048, expected 512
UBI error: validate_ec_hdr: bad EC header
UBI error: ubi_io_read_ec_hdr: validation failed for PEB 0
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
UBI init error -22
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:silent", error -19
Error reading superblock on volume 'ubi:silent'!
UBIFS not mounted, use ubifs mount to mount volume first!
Using egiga0 device
ping failed; host 10.10.10.5 is not alive
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 1 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:fast", error -19
Error reading superblock on volume 'ubi:fast'!
UBIFS not mounted, use ubifs mount to mount volume first!
** Block device usb 0 not supported
** Block device usb 0 not supported

** Invalid boot device **

** Invalid boot device **
** Block device usb 1 not supported
** Block device usb 1 not supported

** Invalid boot device **

** Invalid boot device **
** Block device usb 2 not supported
** Block device usb 2 not supported

** Invalid boot device **

** Invalid boot device **
** Block device usb 3 not supported
** Block device usb 3 not supported

** Invalid boot device **

** Invalid boot device **

Reset IDE: Bus 0: OK Bus 1: not available
Device 0: Model: ST2000DM001-9YN164 Firm: CC9F Ser#: W1E1BT2E
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
Loading file "/boot/uImage" from ide device 0:1 (hda1)
4622488 bytes read
Loading file "/uInitrd" from ide device 0:1 (hda1)
** File not found /uInitrd
Loading file "/boot/uInitrd" from ide device 0:1 (hda1)
** File not found /boot/uInitrd
## Booting kernel from Legacy Image at 00680000 ...
Image Name: Linux-4.4.213-1-ARCH
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4622424 Bytes = 4.4 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...
')
kaworu1986
 
Posts: 6
Joined: Fri May 08, 2020 11:33 pm

Re: Can my GoFlex Home be resurrected?

Postby kaworu1986 » Sat May 09, 2020 9:18 am

I managed to get my GoFlex to boot! And I didn't have to touch the HDD to do so.

What did the trick was updating U-boot to the one in the package. Getting there without a working Linux environment took a while to figure out, however the pieces of a solution were already out there

What I did in the end was:

1. Format a USB drive to a single FAT32 partition, MBR (GPT does not work)
2. Get the uboot payload from the package (boot/uboot-goflexhome.kwb), copy it to the drive (rename it to u-boot.kwb for convenience), put USB drive in the GoFlex
3. Boot with serial console attached, press key to stop autobooting and enter interactive mode
4. Load the payload from the package
$this->bbcode_second_pass_code('', '
usb start
fatload usb 0:1 0x0800000 u-boot.kwb
')
5. Flash it (YOLO)
$this->bbcode_second_pass_code('', '
nand erase 0x0 0x80000
nand write.e 0x800000 0x0 0x80000
reset
')
6. Set up the LAN interface MAC address again (look at label on bottom of device)
$this->bbcode_second_pass_code('', '
setenv ethaddr aa:bb:cc:dd:ee:ff
saveenv
reset
')
7. Reboot, see the kernel taking over, verify I could log in and that the ethernet interface is assigned the expected MAC address.
kaworu1986
 
Posts: 6
Joined: Fri May 08, 2020 11:33 pm

Re: Can my GoFlex Home be resurrected?

Postby moonman » Sun May 10, 2020 2:50 am

Glad you figured it out.
Now you can actually use ext4 (instead of ext2/3) with the current version of U-Boot you have. You can also go ahead and upgrade to linux-kirkwood-dt (latest mainline kernel).
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Can my GoFlex Home be resurrected?

Postby kaworu1986 » Sun May 10, 2020 6:49 am

Thank you for the heads up.

I have been thinking about what I could use this GoFlex for, since I already have a NAS (8x8TB FreeNAS build), and for me it comes down to a few key features:

- Would ZFS run acceptably well on this device? In the simplest case (no compression, encryption or deduplication), would the overhead of checksumming be noticeable over ext4?
- Is there any reason not to partition the whole disk as a single ext4 (or better yet ZFS) partition?
- Would it be possible to use a 4TB drive on the GoFlex? In particular, would this u-boot support GPT and does the controller itself support over 4TB disks (back in the day I had to replace an USB enclosure since the USB to SATA controller itself could not handle more than 2.8TB or something like that)
- Since I do not like having my data laying around unencrypted, would it be possible to use the Kirkwood hardware encryption capabilities for LUKS/dm-crypt, or even better ZFS encryption? I'm looking at this thread and there they are talking about a specific openssl-cryptodev package. Or does the hardware acceleration only apply to things using openssl?

I'm not really that knowledgeable about Linux so I'm scratching my head about the above, and I'd rather not spend days trying to get things working (especially setting up disk encryption seems hard) only to find out the performance is unusable.
kaworu1986
 
Posts: 6
Joined: Fri May 08, 2020 11:33 pm

Re: Can my GoFlex Home be resurrected?

Postby moonman » Sun May 10, 2020 7:53 pm

- Never tried ZFS on linux, if you are going to try it, I would recommened going with something like zfs-dkms and not fuse ZFS implementation. Fuse will always have more overhead and will be slower on these devices.
You will not be able to boot off of ZFS partition as U-Boot doe snot support it. You can separate /boot from rootfs though, given that zfs-dkms actually forks for you.
- I don't see any reason not to on these devices. In fact, this is how i've been partitioning my kirkwood devices
- GPT is fully supported so you can use any size HDD. I personally have tried Up to 4 TB, but larger HDDs should work as well.
-That's a really old thread. There is cryptodev-dkms and openssl-cryptodev packages that need to be installed. I'll try to get them updated, but in the past this combo would often brake with updates so I don't know if you want to use it. Also hardware accelerated crypto is actually slower than just straight CPU (with the benefit that it frees up the CPU from doing any crypto work).
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Can my GoFlex Home be resurrected?

Postby summers » Mon May 11, 2020 11:55 am

I use btrfs on my nsa325, a kirkwood device. I only use it for /home which is where I do my backups (it is a NAS after all).

btrfs has similar functionality to ZFS, cow, compression, snapshots, etc - so very similar.

Its worked fine for me for many years. Speed hasn't been an issue, but then again as its a backup device, speed is not the primary concern. I do have a 4TB disk in there, but its part of the btrfs file system, so not access by uboot etc. It actually has no partition type, I just made the full 4TB and addition onto an existing btrfs partition.

So anyway, these modern fs I think will be fine. But running them on root will be a hassle, as to how to boot, and the initramfs ...

[Oh yes - worth adding btrfs doesn't do encryption natively, so has to either be done above or below. I've done neither, so don't know the implications]
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: Can my GoFlex Home be resurrected?

Postby kaworu1986 » Thu May 14, 2020 4:07 am

So before attempting to go for an encrypted root (and to actually familiarize myself with LUKS and drive encryption on Linux in general), I did the following:

1. Made two partitions, a 30GB one for boot/root and the rest for encrypted data
2. Used dm-crypt to make an encrypted ext4 volume on the second partition

I managed to get it to work, but I'm unsure if I messed up somehow: testing write speeds via dd results in ~45MB/s on the unencrypted volume and ~30MB/s on the encrypted one.
Are these values within expectations? The same HDD when directly connected to my PC pushes well in excess if 100MB/s...
kaworu1986
 
Posts: 6
Joined: Fri May 08, 2020 11:33 pm

Re: Can my GoFlex Home be resurrected?

Postby summers » Sun May 17, 2020 11:13 am

On my NSA325, a kirkwood device, on an ext4 partition I get: 48.1 MB/s

On a btrfs partition with compression enabled I get: 31.1 MB/s

compression is probably similar in load to encryption, so your numbers look reasonable to me ...

[To a ramdisk, /tmp I get speeds of 142MB/s]
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 11 guests