Welcome! Log In Create A New Profile

Advanced

GoFlexHome

Posted by Shogun 
Shogun
GoFlexHome
November 12, 2017 06:54PM
So I feel not smart, and specifically, that special kind that comes from trying to be smart. Like when you try to outsmart your car to get it to let you lock it with it running only to later find the keyless doesn't work with it running.

I have a GoFlexHome that I recall installing ArchLinuxARM onto years ago. Afterwards I secured it by changing the ssh port and setting publickey only for ssh. Because of lack of use and the changes that happen over time I don't have the ssh key.

Is it possible to get this to boot a flash drive instead of its internal OS?

Any other ideas for accessing it would be awesome as well.
Re: GoFlexHome
November 13, 2017 02:37AM
Shogun,

> I have a GoFlexHome that I recall installing
> ArchLinuxARM onto years ago.

> Is it possible to get this to boot a flash drive
> instead of its internal OS?

It is definitely possible.

1. "years ago", do you remember which year? it is important to know the time period. Because ALARM has 2 different u-boot version over the years. We do too. At the earlier year (circa 2012), we all run Jeff's u-boot image.

2. If you don't know for sure, take the Arch rootfs, and mount it on another Linux box and list (assuming it is mounted at /media/sdb1)

ls -lart /media/sdb1/boot
cat /media/sdb1/etc/fw_env.config

This would give me some idea which u-boot version that you've installed in this box.

3. In any case, the first thing you'd need to do:

- Download the tarball Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 from the kernel/rootfs thread:

Scroll down to:

Quote

Updated 24 Jul 2017:

Basic Debian stretch Kirkwood rootfs for most Kirwood plugs:

- tarball size: 188M
- install size: 488M
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, and sysvinit-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:

Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2

4. Follow the instruction and create this Debian rootfs on USB thumb drive. Make sure you follow the instruction very closely (if you can't copy and paste the commands then chance is that it will not work). Post questions if not sure about something.

Depending on the information you can tell me above about number 1 and 2, it will determine the next step you should do to boot this USB Debian rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: GoFlexHome
November 13, 2017 03:09AM
Hi Shogun,

I had a problem with my GoFlexHome after installing ArchLinux on it...

bodhi helped me getting it going again. If it helps, you can check the steps I took to get it going here:-

https://forum.doozan.com/read.php?3,34013
Shogun
Re: GoFlexHome
November 14, 2017 10:45PM
I appreciate your response so much bodhi. After a few days off and some fresh thinking thanks to your inspiration I got back in!


Things I learned:

I had the public key stored safely in backup after all (compared public key in authorized_keys with keys I had backed up)
I renamed the default user to something crazy prior.
I disabled root login and root ssh prior.
The port on the goflexhome has to be carved to accept normal connectors.
I now know how to use linux to get into a mounted linux operating system.

I didn't have fw_env.config in etc. But I was able to run "grep -a --null-data U-Boot /dev/mtd0ro" and got back "U-Boot 2014.04.R2-1 (May 15 2014 - 14:36:05) Arch Linux ARM"


Thank you so much!
Re: GoFlexHome
November 14, 2017 11:47PM
Shogun Wrote:
-------------------------------------------------------
> I appreciate your response so much bodhi. After a
> few days off and some fresh thinking thanks to
> your inspiration I got back in!
>
>
> Things I learned:
>
> I had the public key stored safely in backup after
> all (compared public key in authorized_keys with
> keys I had backed up)
> I renamed the default user to something crazy
> prior.
> I disabled root login and root ssh prior.
> The port on the goflexhome has to be carved to
> accept normal connectors.
> I now know how to use linux to get into a mounted
> linux operating system.
>
> I didn't have fw_env.config in etc. But I was able
> to run "grep -a --null-data U-Boot /dev/mtd0ro"
> and got back "U-Boot 2014.04.R2-1 (May 15 2014 -
> 14:36:05) Arch Linux ARM"
>
>
> Thank you so much!

Cool! if you can boot Arch rootfs, or log into stock OS, then everything is easy.

To boot with Debian rootfs Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2, then you need to adjust the envs using uEnv.txt:

https://forum.doozan.com/read.php?3,23727

I do recall that U-Boot 2014.04.R2-1 supports uEnv.txt.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Shogun
Re: GoFlexHome
November 15, 2017 05:27AM
Went through the instructions on "https://forum.doozan.com/read.php?3,12381";

Booting to an amber light.

nc output looks like this.... not sure what are normal errors and abnormal errors.



U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:21:31 -0700)
Seagate GoFlex Home
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
Hit any key to stop autoboot: 0
starting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available
Device 0: Model: ST31000528AS Firm: CC3E Ser#: 9VP7KSZH
Type: Hard Disk
Supports 48-bit addressing
Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)
Unknown command 'mmc' - try 'help'
## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **

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

Part Start Sector Num Sectors UUID Type
1 63 39086082 00000000-01 83
2 39088128 1914437040 00000000-02 83
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available
Device 0: Model: ST31000528AS Firm: CC3E Ser#: 9VP7KSZH
Type: Hard Disk
Supports 48-bit addressing
Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)
device ide 0:1
1 bytes read in 55 ms (0 Bytes/s)
Found bootable drive on ide 0
loading uImage ...
4588824 bytes read in 829 ms (5.3 MiB/s)
loading uInitrd ...
** File not found /boot/uInitrd **
loading DTB /boot/dts/kirkwood-goflexhome.dtb ...
10603 bytes read in 337 ms (30.3 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
Image Name: Linux-4.4.10-1-ARCH
Created: 2016-05-13 3:31:10 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4588760 Bytes = 4.4 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
Booting using the fdt blob at 0x1c00000


Starting kernel ...
Re: GoFlexHome
November 15, 2017 06:51AM
Shogun,

I'll be back and explain why and what need to be done when you boot Arch rootfs (it is different from booting Debian rootfs). The link I posted is part 1. In your case it needs a part 2.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: GoFlexHome
November 15, 2017 04:28PM
Shogun,

These errors are OK:
Unknown command 'mmc' - try 'help' 
## Unknown partition table type 0 

## Unknown partition table type 0 

## Unknown partition table type 0 

## Unknown partition table type 0 

## Unknown partition table type 0 

## Unknown partition table type 0 

## Unknown partition table type 0 
loading envs from usb 0 ... 
** Bad device usb 0 **

This error is not:

> loading uInitrd ...
> ** File not found /boot/uInitrd **

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: GoFlexHome
November 15, 2017 04:56PM
Shogun,

I've updated the instruction to include this 2nd part.


Quote

Part 2
====

After following the instruction in Part 1, and you still found that you cannot boot into Arch. Follow these steps:

1. Mount the Arch rootfs on another Linux box, and verify whether you have a uInitrd in /boot. Normally Arch does not ship with initrd.

2. If there is no uInitrd in Arch rootfs /boot, you can do either a or b. Approach a is recommended since it is the best booting configuration. Approach b is a bad choice for a permanent configuration, but will allow you to boot right away, and worry about getting the uInitrd later.

a. Follow Arch instruction (find this at ALARM site) to create this uInitrd in /boot.

And then take the rootfs to the box and boot with it.

b. Add the following env setting to your uEnv.txt (which you have created in Part 1):

set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts $custom_params

And then take the rootfs to the box and boot with it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Shogun
Re: GoFlexHome
November 18, 2017 09:09PM
I never really got to note 2. I got distracted making the rootfs flash drive that is mentioned before note 1 because I couldn't find mine.

The goflex booted to a steady green light with the flash drive. So next I tried to boot without the usb drive. No dice. Amber light and now no netconsole.

So I mounted the disk and backed up the goflex boot folder and replaced it with the debian flash drive boot folder. A few reboots later and its working again.


Now to regenerate keys and such.
Re: GoFlexHome
November 18, 2017 09:42PM
Shogun,

> So I mounted the disk and backed up the goflex
> boot folder and replaced it with the debian flash
> drive boot folder. A few reboots later and its
> working again.

If the rootfs was Arch rootfs, then you are booting a hybrid system :)

So that's not what you want. You need to boot Arch rootfs with Arch kernel, or Debian rootfs with Debian kernel.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Shogun
Re: GoFlexHome
November 18, 2017 09:56PM
I might be having too much fun... Didn't even know you could do this. Thankfully I backup because I roll my eyes at people all day for not having done so at work.

Debian with pacman... yea, I'm not going to try to see what happens if I attempt to update lol.


Are there any problems with mounting the disk and replacing the whole filesystem with what is on the flash drive?
Shogun
Re: GoFlexHome
November 18, 2017 10:14PM
Thanks for your time so far.

Looks like I have some serious googling to do to learn whats really going on underneath the instructions.
Re: GoFlexHome
November 18, 2017 10:16PM
Shogun Wrote:
-------------------------------------------------------
> I might be having too much fun... Didn't even know
> you could do this. Thankfully I backup because I
> roll my eyes at people all day for not having done
> so at work.
>
> Debian with pacman... yea, I'm not going to try to
> see what happens if I attempt to update lol.
>

Yeah :) it is entire possible to run a hybrid system. But when time comes to update using pacman, you will need to be watchful of what pacman will do.

>
> Are there any problems with mounting the disk and
> replacing the whole filesystem with what is on the
> flash drive?

No problem. But I'd recommend you just keep this backup somewhere, in case. And do either 1 or 2:

1. You'd just create the Debian rootfs using Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2, if you want to boot Debian.

2. You'd just create the Arch rootfs using Arch tarball. But make sure you download the rootfs that is FDT-enable. Meaning there is a /boot/dtbs folder on it.

And then do part 1 and part 2:
https://forum.doozan.com/read.php?3,23727

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: GoFlexHome
November 18, 2017 10:16PM
Shogun Wrote:
-------------------------------------------------------
> Thanks for your time so far.
>
> Looks like I have some serious googling to do to
> learn whats really going on underneath the
> instructions.

No need to, just follow what I posted above for options 1 and 2.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Shogun
Re: GoFlexHome
November 19, 2017 12:48AM
GoFlexHome is now running Debian, not some mutated freak hybrid.

Never was a fan of Arch... much prefer to be running CentOS or Debian.
Thanks for all your amazing help.
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: