Welcome! Log In Create A New Profile

Advanced

Need help rescue my Goflex home

Posted by foursdude 
Need help rescue my Goflex home
July 02, 2015 01:02AM
I installed Arch Linux on my GFH years ago, and it worked fine until a few weeks ago when I did a pacman update. Now I can't ssh into it, but could still ping it.
I tried creating an USB from this thread: http://archlinuxarm.org/forum/viewtopic.php?f=18&t=3312&p=19207#p19207. But it didn't work - the light doesn't light up after boot and I don't see it on the network.
What's the best way to rescue it?
Thanks!
Re: Need help rescue my Goflex home
July 02, 2015 02:50AM
foursdude,

Depend on the state of your GFhome. Let see if I understand what happen:

> I installed Arch Linux on my GFH years ago,

This mean you have U-Bit running as boot loader.

> worked fine until a few weeks ago when I did a
> pacman update.

But when was the last time you did pacman update before this update? Do you keep any log of dmesg output?

> I tried creating an USB from this thread:
> http://archlinuxarm.org/forum/viewtopic.php?f=18&t
> =3312&p=19207#p19207.

Do you have another Linux box, or only Windows /Mac box that you have to run Live CD?

> But it didn't work - the
> light doesn't light up after boot and I don't see
> it on the network.

Are you comfortable with hardware? i.e. willing to open up the GFHome and connect serial console?

Did you keep the log when you did this pacman update? that would hopefully give some hints about the problem.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Need help rescue my Goflex home
July 03, 2015 12:15PM
Hi bodhi,

No I didn't keep the dmsg logs. Other answers below.
What options do you think I have?
Thanks.

>
> This mean you have U-Bit running as boot loader.
>
> > worked fine until a few weeks ago when I did a
> > pacman update.

I don't remember if it was u-bit. But I had the box boot with hard disk without USB.

> But when was the last time you did pacman update
> before this update? Do you keep any log of dmesg
> output?
>

Last time maybe 2 years ago. No I didn't keep the logs.

>
> Do you have another Linux box, or only Windows
> /Mac box that you have to run Live CD?
>

Yes I have another Linux machine.

>
> Are you comfortable with hardware? i.e. willing to
> open up the GFHome and connect serial console?

I guess I could try...

>
> Did you keep the log when you did this pacman
> update? that would hopefully give some hints about
> the problem.
Re: Need help rescue my Goflex home
July 03, 2015 01:47PM
foursdude,

>
> Yes I have another Linux machine.
>

OK. Then you could try booting with Debian rootfs. Given you've installed Arch 2 years ago, try the Debian-3.16.0-kirkwood-tld-2 rootfs:
http://forum.doozan.com/read.php?2,12096

Scroll down to the section:

Quote

Updated 02 Sept 2014:

Rootfs Debian-3.16.0-kirkwood-tld-2 was uploaded. This rootfs is to keep in sync with kernel Linux-3.16.0-kirkwood-tld-2 (and its new features).

Follow the instruction closely and create a rootfs on a USB stick.

Basically, on another Linux box, as root user (sudo won't work), create a single Ext3 partition on the USB stick. Untar the Debian 3.16 rootfs to it. And boot the GoFlex Home with it. Once you can boot with Debian, it is quite easy to reinstall Arch and Arch u-boot or my u-boot.

The serial console solution is the next step if you can't boot with Debian rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Need help rescue my Goflex home
July 04, 2015 03:14AM
Thanks bodhi.
Good news is that I can boot with the USB drive made with the link you provided - the green light is on which I believe is a good sign. However I don't see it on the network (with DHCP) and don't know what its IP address is.
Also I didn't follow how/where to set this:
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_rootfstype=ext2
I do want to keep the Debian on the device, even if I can only boot with USB that's fine.
Re: Need help rescue my Goflex home
July 04, 2015 07:39AM
foursdude,

> Good news is that I can boot with the USB drive
> made with the link you provided - the green light
> is on which I believe is a good sign.

Indeed, it is a good sign. Especially if the plug was flashing green after power up, and then became solid green. It means the kernel has been loaded and started successfully.

> However I
> don't see it on the network (with DHCP) and don't
> know what its IP address is.

This is most likely because the kernel could not mount the rootfs, there are a couple of possible reasons.

1. The rootfs was not created by root user. Or after the extraction, not enough sync commands were executed (to make sure everything was flushed out to disk). Retrace your steps to make sure the rootfs was created correctly.

2. Due to the mistmached file system type. Now I recall about U-Bit installation, it was probably expecting the rootfs to be type Ext2, instead of Ext3. So you could try to recreate the rootfs again. And this time use a single Ext2 partition, and extract the rootfs to it. See if it will boot successfully.

The u-boot envs settings for usb_rootfstype above was for when you have Linux running and creating the rootfs while insde Debian or Arch. So it does not apply to your case. That's related to reason number 2 above.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Need help rescue my Goflex home
July 04, 2015 11:35AM
Hi bodhi,
You are the man! Changing file system to ext2 did help and I can ssh into the debian OS now. I can even attach the hard disk and see the files there again!
Now what are the steps to move the Debian rootfs to the hard disk so I can boot from there?
Thanks.
Re: Need help rescue my Goflex home
July 04, 2015 02:24PM
foursdude Wrote:
-------------------------------------------------------
> Hi bodhi,
> You are the man! Changing file system to ext2 did
> help and I can ssh into the debian OS now. I can
> even attach the hard disk and see the files there
> again!
> Now what are the steps to move the Debian rootfs
> to the hard disk so I can boot from there?
> Thanks.

Cool!

But before moving the rootfs to a hard disk, you should consider doing these:

1. Formatting it to Ext3. This will make it more resilient to power outage, and minimize chance of corruption. But by doing this you will also needs to change the rootfs type in u-boot/u-bit environment, to be able to boot consistently. So first step is getting the listing of the envs:
fw_printenv

2. You don't have serial console, so you should try to activate netconsole first before doing anything that is related to u-boot. After listing the u-boot envs and save it to a text file, set up netconsole as instructed here.. This also involves changing u-boot envs, so if you'd like to confirm your setup, list the fw_setenvs commands that you're about to execute here. I'll take a look.

3. After you're all done, and bootd with HDD rootfs. Consider updating u-boot. Your u-bit installation is quite old, its capability is limited. There are quite few modern features that you will enventually need that the new u-boot provides. But this is something not for the faint of heart (if anything goes wrong you will need serial console to recover). Pls ask questions if you're not sure about something in that u-boot thread instruction.

4. To move the rootfs to HDD:

- Format the HDD to a single partition of type Ext3 (or Ext2 if you don't want to change u-boot envs and want to do this before all the 3 steps above).
- Shutdown the GoFlexHome.
- Mount both the USB rootfs and the HDD on another Linux box.
- As root user, execute the following command (assumming the USB stick is mounted as /media/sda1, and the HDD is mounted as /media/sdb1):
cd /media/sdb1
cp -aR /media/sda1/* .
sync
sync
sync
and take the HDD to the GoFlexHome and boot with it.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Need help rescue my Goflex home
July 06, 2015 12:00PM
Hi bodhi,
In the step 4 above, I was trying to figure out how to connect the Goflex Home hard disk to another Linux computer. First my SATA cable doesn't go all the way in because of the enclosure. Second, my Linux OS is on a laptop. Is it possible to do the copy on the booted system?
Thanks.
Re: Need help rescue my Goflex home
July 06, 2015 05:12PM
foursdude,

> Is it possible to do the copy on the booted system?

No, it is not recommended. You could back up the system while it's running. But for the purpose of cloning the system to a different disk, the only way to really cloning it is off-line.

The issue with the enclosure is easy: you can buy a GoFlex Desk USB base (these tend to be expensive). Or just get any USB to SATA cable (less expensive).

-bodhi
===========================
Forum Wiki
bodhi's corner
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: