Welcome! Log In Create A New Profile

Advanced

Debian on GoFlex Home

Posted by fly 
fly
Debian on GoFlex Home
June 03, 2012 06:25PM
Hi,

first let me say, I am really sorry, as this is for sure explained somewhere, but I really don't get it together, and am really confused.

I recently tried to get Debian installed on my new GFH, but I just don't get to a beginning, as there are many things different than listed in the tutorials I tried.
At the moment, I just got the ssh connection working via ssh USERNAME_hipserv2_seagateplug_XXXX-XXXX-XXXX-XXXX@IP_ADDRESS.
What to I do next? It was so easy when I did this with my Dockstar :(

As I don't have a serial connection (and am not very versed in electronics), I hope I won't need this?

And you will be able to boot from USB, and use the SATA port for files etc., right? (As I read there was a problem with the SATA port earlier)

Again, I'm not lazy, but there's so many (different) information spread everywhere, I totally lost the overview.

Thank you for your help!
Re: Debian on GoFlex Home
June 03, 2012 06:51PM
@fly,

Don't worry! the info is scattered in many places. So here below is the instruction for the GF Home installation:

-bodhi

- Connect the GFH to your router, power on, and then log in from your PC using the web interface 
with URL http://myIPaddress (where myIPaddress is the assigned IP address for the GF Home).

- Create a user and password (e.g. myname mypass)

- SSH in using myname, mypass, myIPaddress, and product key (e.g. XXXX-KRYT-MVUJ-KTTX):

# ssh myname_hipserv2_seagateplug_XXXX-KRYT-MVUJ-KTTX@myIPaddress

- After logged in, gain root access and verify root login:

bash-3.2$ sudo -E -s
bash-3.2# whoami  

- Kill all plug daemons
bash-3.2# killall -9 mynetworkd access-patrol seagate-lifecycle oe-spd xinetd udevd httpd avahi-daemon smbd nmbd vsftpd afpd minidlna mt-daapd check_igd.pl igd-daemon

- turn off swap
bash-3.2# /sbin/swapoff -a

- At this point the installation process is same as for Dockstar Jeff/Davy UBoot and Debian Squeeze

EDIT: correct spelling.



Edited 2 time(s). Last edit at 06/03/2012 07:02PM by bodhi.
Re: Debian on GoFlex Home
June 03, 2012 06:59PM
Post Debian installation on GF Home:

1. Esablish netconsole:

http://forum.doozan.com/read.php?3,14,14

2. Setup rootfs label to ensure booting from correct USB or HDD drive:

http://forum.doozan.com/read.php?3,8044,8152#msg-8152
fly
Re: Debian on GoFlex Home
June 04, 2012 04:31AM
Quote
bodhi
- At this point the installation process is same as for Dockstar Jeff/Davy UBoot and Debian Squeeze
Sadly, it's not: I have to say, I didn't really install any uBoot on my Dockstar. In the PlugOS, I just stopped the firmware-updates (# /init.d/hbmgr.sh start in /etc/init.d/rcS) and let the DS boot from USB:
# Check if a USB device with partition sda is connected
# If one is found, reboot to start debian              
                                                       
checkusb=`grep sda /proc/partitions`                   
if [ -n "$checkusb" ]; then                            
  /sbin/reboot                                         
fi
(in /etc/rcS)

As the GF has neither /etc/rcS nor /etc/init.d/rcS, I can't do that here.

So I seem to have to install uBoot! Did it like this: http://projects.doozan.com/uboot/
And working! Great so far. Boots from USB, even if SATA drive is plugged in. Seems I don't need to manually configure this, like in your 2nd link.

Problem now: How can I access the SATA HDD? (For using it as data-drive) Is there maybe a debian-squeeze-kernel which supports that?

And do I have to care for something else?

Thank you very much for your quick help! :)
fly
Re: Debian on GoFlex Home
June 04, 2012 05:07AM
edit: I noticed something weird: After every reboot, the GF gets another IP, and this seems to be because it has another MAC every time? What the hell ^^
Re: Debian on GoFlex Home
June 04, 2012 05:48AM
Same problem here with the IP address. To workaround that, I've installed avahi-daemon and connect to it with: hostname.local.

The default hostname is debian. (ssh root@debian.local work)

I think we can set a mac address on Uboot, Is this gonna solve this problem ?

To access the s-ata drive you should use a s-ata compatible kernel and set the arcNumber to 3089.

Go here for the kernel: http://forum.doozan.com/read.php?2,7676

When the kernel is installed, reboot then do a "uname -a" (uname -a should report linux 3.3.2) to check you are on the right kernel. Then do:

fw_setenv arcNumber 3089

then when you reboot your s-ata drive will work. But in fact you will not be able to boot with the s-ata inserted because he will take the place of your usb drive on /dev/sda. (you can boot if you remove the s-ata drive)

So here you have to:

1. Esablish netconsole: (In fact you should establish the netconsole as soon as you can I learned that the hard way)

http://forum.doozan.com/read.php?3,14,14

2. Setup rootfs label to ensure booting from correct USB or HDD drive:

http://forum.doozan.com/read.php?3,8044,8152#msg-8152

like bodhi said.

Good luck !



Edited 3 time(s). Last edit at 06/04/2012 08:59AM by ElectronikHeart.
fly
Re: Debian on GoFlex Home
June 04, 2012 08:55AM
Aww, things are getting worse and worse. After a 2nd or 3rd reboot (with SATA drive connected, which was working so far o_O) now it boots into nothing. Neither PlugOS nur Debian. There just blinks the green LED for a second or so, then the orange LED, which blinks on and on. My router shows no connection.

Factory reset via http://support.goflexhome.hipserv.com/en/reflash/index.html is not working.

The thing with the netconsole; If I get that right, you have to set s.th in the GF before that? As I have absolutely no access to the GF at this time, I think I won't get a console working with which I can not just read, but send commands to the GF, right?

This is really killing me...
Re: Debian on GoFlex Home
June 04, 2012 08:57AM
You tried to boot without the s-ata drive but the usb drive inserted ?
fly
Re: Debian on GoFlex Home
June 04, 2012 08:59AM
Yes I tried that. No sata drive connected, and it won't boot, neither PlugOS in nand nor Debian on usbstick.
Re: Debian on GoFlex Home
June 04, 2012 09:24AM
You can control the boot process with netconsole and tweaking Uboot. But you have to use "nc" inside Linux to do it properly.

I think you should read the instructions a second time to be sure you don't have missed one step.
fly
Re: Debian on GoFlex Home
June 04, 2012 10:03AM
That doesn't work; as I said I don't have set anything on the GF for the use of nc (on the link above, this should be:
Quote

fw_setenv serverip 192.168.1.2
fw_setenv ipaddr 192.168.1.100
fw_setenv if_netconsole 'ping $serverip'
fw_setenv start_netconsole 'setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;'
fw_setenv preboot 'run if_netconsole start_netconsole'
)

Without that, I can't netconsole with it, I think? (At least it didn't work when I just tried)
fly
Re: Debian on GoFlex Home
June 05, 2012 04:26PM
No ideas about that?

I just ordered a USB to TTL UART serial converter, and will try to use it for reviving my GF (...and my Dockstar >__>), but of course I would prefer to make it a faster/easier way... :(
Re: Debian on GoFlex Home
June 05, 2012 04:51PM
Yeah, you'll do best to get serial connector and carefully connect... once you have access you can turn on netconsole by making those changes above to env... but of course use values that fit your network/desktop computer.

In general, it is a good idea to always have netconsole turned on. If it isn't used/detected, U-Boot just channels the output to the serial connection.

=====================================================
Re: Debian on GoFlex Home
June 05, 2012 05:06PM
@fly,

Try the factory reset again with a different flash drive. It worked for me and others after a few tries, the paper clip works great!

If you read Jeff's netconsole instruction carefully, there are 2 IP adresses: serverip and ipaddr. The UBoot envs settings in your post right above need to be set on the GoFlex Home.

The ipaddr is the GoFlex Home IP, the serverip is the Window/Linux/Mac box ip address that you use to observe the boot activities and entering commands. You would run the 2 nc commands on this box first so that it waits and listens to the output.

When you boot up, these envs tell the GFHome to ping the serverip. If the server is running, then it will send outputs to netconsole, and accept inputs from netconsole.
fly
Re: Debian on GoFlex Home
June 05, 2012 05:32PM
bodhi: Ok, tomorrow I will try factory reset a few more times. If I then have writing access to the GF, I will set the UBoot envs settings on it for being able to use nc.

If then it is still not working, I will try it with the serial cable, when it's here in 1-2 weeks :-x Thanks davygravy

Good night so far
fly
Re: Debian on GoFlex Home
June 08, 2012 10:52AM
Hey folks,

even after several tries, each with three different USB flash-drives, I still couldn't make a factory reflash.

Guess it's now to the serial connection; I will report to you as soon as the china-adapter arrives.

Thank you so far!
Re: Debian on GoFlex Home
June 08, 2012 03:22PM
@fly : I'm not 100% sure, but I think the factory-reset-flash-button only functions w/ the original U-Boot... if your install made it part of the way through, replacing the U-Boot but not installing an image, then the reset button would most likely not work.

=====================================================
fly
Re: Debian on GoFlex Home
June 10, 2012 02:16PM
Yeah, I replaced uBoot, with these four lines: http://projects.doozan.com/uboot/
So I would agree, that this is the reason that the reset-button is not working (I read the same somewhere in this forum)

Why isn't the reset-button implemented in the custom uBoot? Would make all that much easier : /
Re: Debian on GoFlex Home
June 10, 2012 03:22PM
fly Wrote:
-------------------------------------------------------
> Yeah, I replaced uBoot, with these four lines:
> http://projects.doozan.com/uboot/
> So I would agree, that this is the reason that the
> reset-button is not working (I read the same
> somewhere in this forum)
>
> Why isn't the reset-button implemented in the
> custom uBoot? Would make all that much easier : /

Well, if you write the code for it, I'll patch it in to the existing mainline code, build it and test it... more than happy to do that.
I agree it would make it easier.

=====================================================
fly
Re: Debian on GoFlex Home
June 10, 2012 04:05PM
Hehe, I would love to do so, but as I am only an inexperienced student, I'm afraid I am not able to make this. I am very bad in implementing near-hardware code.

Please keep in mind that I'm just a little bit angry (mainly about myself), that I just f*cked the two of my cheap servers. Didn't want to piss at someones leg ;-]
Re: Debian on GoFlex Home
June 10, 2012 04:53PM
np, no worries.

So you think it is not booting?

Or do you think it is booting but there is a network problem (you mention no DHCP lease)?

I'm wondering if the issue is that the image on the USB disk is simply bad. {There _are_ ready-to-boot images here that you can simply untar and boot up - the assumption is that your U-Boot environment variable are "normal" - and no adjustments to them are needed to boot into it... and it has support for nearly any kirkwood device. If you have a spare USB flash drive it might be a cheap last-ditch effort/method before you go to the serial cable method...}

https://www.dropbox.com/sh/nwt2kbvetvgvroo/ySbSkso_Xo/Kirkwood/rescue/USB-Rescue-tarballs

=====================================================
fly
Re: Debian on GoFlex Home
June 12, 2012 12:12PM
Well well, what do we have here? Your tarball-image indeed bootet perfectly. Thanks a lot for that!

Ok, so what now? How can I fix the (supposedly) broken uBoot, and make the GFH boot from USB flash drive?
I presume the following things have to be done:
- Establish netconsole connectivitiy http://forum.doozan.com/read.php?3,14,14:
fw_setenv serverip 192.168.1.2
fw_setenv ipaddr 192.168.1.100
fw_setenv if_netconsole 'ping $serverip'
fw_setenv start_netconsole 'setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;'
fw_setenv preboot 'run if_netconsole start_netconsole'
- Make GF find kernel on "rootfs"-labelled drive http://forum.doozan.com/read.php?3,8044,8152#msg-8152

Is that ok?

Or maybe it'd be better to do a fresh install of uBoot first?

Btw the fw_printenv says arcNumber=3089. That should be correct?


I ask that much to make everything as clear as possible, because I want the chance to brick my GF on 0%.


By the way, let me tell you, that again on the first time I bootet your image, it had the IP *.36, and on the second time *.37. Just like I mentioned a few posts earlier (with debian).
Re: Debian on GoFlex Home
June 12, 2012 02:01PM
fly Wrote:
-------------------------------------------------------
> Well well, what do we have here? Your
> tarball-image indeed bootet perfectly. Thanks a
> lot for that!
>
> Ok, so what now? How can I fix the (supposedly)
> broken uBoot, and make the GFH boot from USB flash
> drive?

You'll need to make sure (A) your U-Boot is the correct (updated version) and (B) its env variables are set correctly.

But first... netconsole needs to be turned on... and make sure it works correctly...

> I presume the following things have to be done:
> - Establish netconsole connectivitiy
> http://forum.doozan.com/read.php?3,14,14:
>
> fw_setenv serverip 192.168.1.2
> fw_setenv ipaddr 192.168.1.100
> fw_setenv if_netconsole 'ping $serverip'
> fw_setenv start_netconsole 'setenv ncip $serverip;
> setenv bootdelay 10; setenv stdin nc; setenv
> stdout nc; setenv stderr nc; version;'
> fw_setenv preboot 'run if_netconsole
> start_netconsole'
>

The the first two commands (serverip and ipaddr) must be set to something that is correct for your network. Do you have your netcat/nc installed on your local Linux box? (If you are using Windows, I can't say I'm familiar w/ the nc client for it, but there must be one)

The last three commands don't have to be changed...


Best not to do anything further until you have netconsole connectivity set up and are familiar w/ it... ping back once that is set up and I can help a bit further.


> - Make GF find kernel on "rootfs"-labelled drive
> http://forum.doozan.com/read.php?3,8044,8152#msg-8
> 152
>
> Is that ok?
>
> Or maybe it'd be better to do a fresh install of
> uBoot first?
>
> Btw the fw_printenv says arcNumber=3089. That
> should be correct?
>
>
>
> By the way, let me tell you, that again on the
> first time I bootet your image, it had the IP
> *.36, and on the second time *.37. Just like I
> mentioned a few posts earlier (with debian).

This is probably normal-ish - your router is issue a dhcp lease to the box, and for some reason not releasing it later. For my network, I know it is working normally.

=====================================================



Edited 1 time(s). Last edit at 06/12/2012 02:19PM by davygravy.
Re: Debian on GoFlex Home
June 12, 2012 07:30PM
fly Wrote:
-------------------------------------------------------
> By the way, let me tell you, that again on the
> first time I bootet your image, it had the IP
> *.36, and on the second time *.37. Just like I
> mentioned a few posts earlier (with debian).

I'm guessing you need to set the mac address in the environment, otherwise each time it boots, it picks a random mac address, so your router assigns a new IP.

Get the address from the label on the underside of your GoFlex. Do this carefully, because once set, fw_setenv won't let you change it. (You'll have to interrupt boot and use u-boot setenv/saveenv commands instead.)

fw_setenv ethaddr XX:XX:XX:XX:XX:XX



Edited 1 time(s). Last edit at 06/12/2012 07:34PM by PhantomsDad.
fly
Re: Debian on GoFlex Home
June 12, 2012 07:43PM
Hehe, that's funny, I found exactly this solution just a minute ago.

But here http://forum.doozan.com/read.php?2,2429,3248#msg-3248, someone did just that, and after that he couldn't boot his DS any more. Are you sure it is safe, and won't lock me out of the rescue-system?
Re: Debian on GoFlex Home
June 12, 2012 07:43PM
Yes, the ethaddr/MAC address could very well be an issue, although, TTBOMK, the randomizing function for ethaddr has not yet been merged into U-Boot mainline, so this action would probably be coming from a router.

On my router (running TomatoUSB), I simply get no connectivity/ability to tftp/netconsole if there is no ethaddr defined in env.

=====================================================



Edited 1 time(s). Last edit at 06/12/2012 07:46PM by davygravy.
fly
Re: Debian on GoFlex Home
June 12, 2012 08:25PM
Ok, the ethaddr setting fixed the IP address. Good :)

I now set the five setenvs for nc, according to my current network status. But I'm still not able to get an output of nc from the GF.

I use a Linux machine (Ubuntu 11.04), and when I do nc -l -u -p 6666, i get:
This is nc from the netcat-openbsd package. An alternative nc is available
in the netcat-traditional package.
usage: nc [-46DdhklnrStUuvzC] [-i interval] [-P proxy_username] [-p source_port]
	  [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_protocol]
	  [-x proxy_address[:port]] [hostname] [port[s]]
Maybe this is a hint? (Don't know how it should look if it works...)
Re: Debian on GoFlex Home
June 12, 2012 10:33PM
You can try the other nc package... maybe it will yield better results...

I use socat while in Linux, and nc while in OS X:
socat STDIO UDP-LISTEN:6666

nc -up 6666 192.168.xxx.yyy 6666

nc -klu 6666

=====================================================
fly
Re: Debian on GoFlex Home
June 13, 2012 08:03AM
I tried these, and every other command from the netconsole-thread, and none of them showed me anything of the GF : /
Re: Debian on GoFlex Home
June 13, 2012 08:56AM
Best bet is to post your env values. Output of fw_printenv

=====================================================
Author:

Your Email:


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: