Click here to go to the forum index Click here for the home page
 
Author Message

<  Computer connections  ~  Slug died, here's a guide for a new setup

Page 1 of 5
Goto page 1, 2, 3, 4, 5  Next
Pottsy
Posted: Sat Jan 12, 2008 2:54 pm Reply with quote
Regular contributor Joined: 27 Mar 2005 Posts: 31
After 2.5 years (I think) of working perfectly, my NSLU2 started to not play. It would see the Toppy just after a reboot, maybe, and then nothing. Puppy reported "No TF8500 found" and rt2mei reported "Toppy is not ON". After a day of messing around, I bought a new one (which works perfectly).

Having set it up, I thought I'd make a few notes on how to setup a fresh slug for use with rt2mei, using new firmware and a 1Gb memory stick:



1. Buy a slug, and a 1Gb flash drive (FD).

2. Attach the FD to a PC, and then press Start, and right click on My Computer and choose properties. Choose Hardware, Device Manager, Disk drives, right click on your FD and press properties, policies, optimize for performance.

3. Now format the FD using the NTFS file structure. Having the FD as NTFS is sometimes needed to force the slug to do a full format to it's own structure.

4. Switch on the slug and go to the web interface and set the network properties and the time. Note that if ever the web interface asks you for a password, its username admin, password admin. Be sure to put your router ip address into the gateway and DNS places.

Now do either 5a or 5b. For a brand new slug it will be 5a.

5a. If your slug currently has original Linksys firmware on it. Do not plug the FD in, and using the web interface upgrade to the unslung firmware 6.8 downloaded from here: http://www.slug-firmware.net/

5b. If your slug currently has uNSLUng firmware on it. Do not plug the FD in, and with the slug off press and hold the reset button with a paperclip. Turn the slug on and as soon as the LED goes red, release the paperclip. The top LED will now flash red and you can use the sercomm utility to scan for the slug and then flash the unslung firmware 6.8 downloaded from here: http://www.slug-firmware.net/


6. Reboot, plug in the FD to slot 2 and format it using the web interface. When done the format page must show it as formatted(ext3).

7. Remove FD and reboot.

8. Go to http://192.168.1.77/Management/telnet.cgi to enable telnet.

9. In windows, press start, Run, and enter telnet 192.168.1.77



10. Login using username root and password uNSLUng.

11. Plug in the FD to slot 2.

12. Check on the web interface that the FD is visible, and formatted to ext3.

13. At the telnet prompt type /sbin/unsling disk2. When prompted, enter a new password (eg newpass). When done, reboot the slug leaving the FD in.

14. Go to the home page on the web interface, and at the bottom it must say something like "uNSLUng status: Unslung to disk2, /dev/sda1", as opposed to "internal flash".



15. Go to http://192.168.1.77/Management/telnet.cgi again to enable telnet.

16. In windows, press start, Run, and enter telnet 192.168.1.77

17. Login using root and newpass.

18. Issue the following commands:
ipkg update
ipkg install puppy
ipkg install busybox
vi /.profile


19. Now you are in a primative text editor. To edit text you press "i" and to exit editing mode you press ESC. To save, press :wq and then enter. Make the contents of the file read:
PATH=/opt/sbin:/opt/bin:$PATH
export PATH
umask 0

Make sure you have exited vi with the file saved.



20. Then enter the following commands:
chmod 755 /.profile
ipkg install openssl
ipkg install openssh
ipkg install php
ipkg install ntpclient
ipkg install ftpd-topfield


21. Test the installation with the Toppy plugged in to slot1, by typing puppy -c size and you should get 2 lines telling you about the disk state on the toppy.



22. In windows explorer, look in My Network Places, Microsoft Windows Network, Workgroup, Llg3b4..., DISK 2. Here you can create a folder caller rt2mei and paste in the rt2mei files from wooders site: http://www.wooders.co.uk/rt2mei/nslu2.php



23. Back in the telnet window enter:
chmod -R 755 /public/rt2mei/rt2mei

24. Now, I seem to get away with modifying the rt2mei.cfg by browsing in windows explorer and using wordpad. When you have entered your channels as per wooders instructions, test the script by entering (in telnet):
/public/rt2mei/rt2mei

25. To make the script run every day, use your old friend vi again:
vi /etc/crontab
Add the following line to the end of the file (i to edit ESC to not edit, :wq to write and quit):
5 7 * * * root /public/rt2mei/rt2mei -new >/public/rt2mei/rt2mei.log
You can also optionally add this line to help the slug keep time:
1,21,41 * * * * root /opt/bin/ntpclient -s -l -h uk.pool.ntp.org >>/var/log/ntp.log && /usr/sbin/hwclock --systohc --utc &>/dev/null
Tip: you can copy and paste into both windows telnet and putty.

26. From now on you can use putty to telnet in without ever having to go to the "enable telnet" page, and use filezilla to shift files around. In filezilla, when you save the connection settings for the slug, go to Transfer Settings and limit the number of connections to 1.



27. In Mystuff set the following options:
N1 Always
N2 11 days (to warn you if something has gone wrong)


Hope this helps someone.


Puppy http://www.nslu2-linux.org/wiki/Puppy/HomePage
rt2mei http://www.wooders.co.uk/rt2mei/nslu2.php
Vi http://www.nslu2-linux.org/wiki/Puppy/ViCrashCourse
PuTTY http://www.chiark.greenend.org.uk/~sgtatham/putty/
FileZilla http://filezilla-project.org/download.php[/img]


Last edited by Pottsy on Sat Jan 12, 2008 11:18 pm; edited 1 time in total
View user's profile Send private message Visit poster's website
Pottsy
Posted: Sat Jan 12, 2008 3:02 pm Reply with quote
Regular contributor Joined: 27 Mar 2005 Posts: 31
PS - sorry Nigel for this guide being a little late. Embarassed
View user's profile Send private message Visit poster's website
alan_m
Posted: Sat Jan 12, 2008 3:06 pm Reply with quote
Frequent contributor Joined: 17 Oct 2006 Posts: 3190 Location: Southchurch Village, Southend-on-Sea
Pottsy wrote:

18. Issue the following commands:
ipkg update
ipkg install puppy
ipkg install busybox
vi /.profile




Shouldn't that be 'ipkg-cl' if you are using unslung V5.5 or above?


Last edited by alan_m on Sat Jan 12, 2008 3:12 pm; edited 1 time in total

_________________
www.tap-room.com for TaP news, September/October 2014 edition now out
5800 - 1Tbyte HD and fan F/W: MS6, 5.13.65T 18 Nov 2010 -Te+B2D plus aXeL
Auto Start:MyStuff 6.5|EPG2MEI v0.96|Extend v1.7|SecCache (UK) v0.4|TF5000 Display v1.53|MHEG On/Off A3
View user's profile Send private message Visit poster's website
billmars
Posted: Sat Jan 12, 2008 3:11 pm Reply with quote
Frequent contributor Joined: 17 Sep 2005 Posts: 748 Location: Hull
Good guide!

I have added a crontab job for ntpclient to keep the slug on time:-

1,21,41 * * * * root /opt/bin/ntpclient -s -l -h uk.pool.ntp.org >>/var/log/ntp.log && /usr/sbin/hwclock --systohc --utc &>/dev/null

[all on one line]

I've only ever had to reinstall once, and it took ages to gather all the information again - this will be useful. Thanks.

_________________
BM
Firmware
5800 Samsung 1Tb Autostart TAPs: Extend 1.7;TSRCommander 1.5;TF5000 Display 1.53;EPG2MEI 0.95;MyStuff 6.5;QuickJump 1.72;Power Down 0.75;SecCache 0.4;TSSaver 0.4;MHEG Control B2;eit_sub_sng 0.6 Transmitter: Belmont Extras: as2mei (via NSLU2)
View user's profile Send private message
billmars
Posted: Sat Jan 12, 2008 3:15 pm Reply with quote
Frequent contributor Joined: 17 Sep 2005 Posts: 748 Location: Hull
alan_m wrote:
Shouldn't that be 'ipkg-cl' if you are using unslung V5.5 or above?


I've never used 'ipkg-cl' with 6.8, just 'ipkg [whatever] and it works.

_________________
BM
Firmware
5800 Samsung 1Tb Autostart TAPs: Extend 1.7;TSRCommander 1.5;TF5000 Display 1.53;EPG2MEI 0.95;MyStuff 6.5;QuickJump 1.72;Power Down 0.75;SecCache 0.4;TSSaver 0.4;MHEG Control B2;eit_sub_sng 0.6 Transmitter: Belmont Extras: as2mei (via NSLU2)
View user's profile Send private message
Pottsy
Posted: Sat Jan 12, 2008 3:15 pm Reply with quote
Regular contributor Joined: 27 Mar 2005 Posts: 31
alan_m wrote:


Shouldn't that be 'ipkg-cl' if you are using unslung V5.5 or above?


Yes - but there's a symbolic link in place and it saves me some key strokes... Smile
View user's profile Send private message Visit poster's website
micken
Posted: Mon Jan 14, 2008 5:18 pm Reply with quote
Regular contributor Joined: 26 May 2006 Posts: 80
Thanks for this pottsy, I was playing around with the slug over the new year and need to finish setting it up in the near future. This guide will be really helpful.
View user's profile Send private message
ttquattroman
Posted: Sun Jan 27, 2008 10:28 pm Reply with quote
Joined: 26 Nov 2007 Posts: 15
Hi,

I have been trying to upgrade my slug to unslung firmware, and following the instrctions in this thread - but to no avail.

I have set the slug to automatically optain an IP via dhcp, and I can talk to it OK.

Have downloaded version 6.8 of slug os but when I command the slug to upgrade the firmware I get an error message from Windows IE "Upgrade: no enough free space".

Any help would be appreciated.

Thanks

Peter
View user's profile Send private message
billmars
Posted: Mon May 19, 2008 8:45 pm Reply with quote
Frequent contributor Joined: 17 Sep 2005 Posts: 748 Location: Hull
Pottsy wrote:
PS - sorry Nigel for this guide being a little late. Embarassed


I don't think this guide has been added to the 'FAQs and Guides' section. I knew it existed and tried to find it there after my second USB flash drive failed.
This time everything seemed to be working OK, all the correct NSLU2 lights showing, but there was no network connection. It seemed to be booting up OK but from the internal 'unslung' firmware, not from the flash drive's 'unslinged' firmware. I was able to re unsling to a new flash drive (this guide helped a lot, even though I've done it a few times before).
It has occurred to me before that it would be useful if the flash drive could be cloned and saved to disk, then used to copy the system onto a new flash drive, saving a lot of time and energy!
I've used:-
http://www.diskinternals.com/download/Linux_Reader.exe
which can copy the drive, but can't write the data anywhere.
Does anyone know of a method?

_________________
BM
Firmware
5800 Samsung 1Tb Autostart TAPs: Extend 1.7;TSRCommander 1.5;TF5000 Display 1.53;EPG2MEI 0.95;MyStuff 6.5;QuickJump 1.72;Power Down 0.75;SecCache 0.4;TSSaver 0.4;MHEG Control B2;eit_sub_sng 0.6 Transmitter: Belmont Extras: as2mei (via NSLU2)
View user's profile Send private message
HarryLime
Posted: Thu May 22, 2008 5:27 pm Reply with quote
Joined: 27 Apr 2008 Posts: 22 Location: Ashurst, Hampshire
Thanks for this guide. It was quite timely for me as I just got Toppy. I've had fun getting my slug to work (it was fine with only ftpdTopfield and unslung 5.5 but I found it impossible to unsling, now on 6.8 after some more drama, but working).

Nothing against those who've taken the time to develop and document their individual applications, but it sometimes seems that they've just left the toys in the sandbox for us all to get on with. I know that not everyone wants the same installation or combination of widgets, one of the great upsides of this set of hardware and open development is this flexibility and freedom.

But it is nice to have a reasonably comprehensive guide to a particular installation, with all the bits you need to do described succinctly and well. For many of the noob techs, or those who don't want to get their hands too dirty with line editors and terminal emulators, it's good to have something like this as a starting point.

Well done.
View user's profile Send private message
HarryLime
Posted: Sun Jun 01, 2008 5:17 pm Reply with quote
Joined: 27 Apr 2008 Posts: 22 Location: Ashurst, Hampshire
billmars wrote:
I have added a crontab job for ntpclient to keep the slug on time:-

1,21,41 * * * * root /opt/bin/ntpclient -s -l -h uk.pool.ntp.org >>/var/log/ntp.log && /usr/sbin/hwclock --systohc --utc &>/dev/null

[all on one line]


This is a useful idea, I have a slight concern in that when I look at the processes running, using the ps command, there seems to be listed a pair of processes for every instance of the crontab call (i.e. every twenty minutes since last reboot-ish). Example:

Quote:
494 root 1916 S sh -c /opt/bin/ntpclient -s -l -h uk.pool.ntp.org >>/var/log/nt
495 root 1648 S /opt/bin/ntpclient -s -l -h uk.pool.ntp.org


Shouldn't each instance terminate after it runs? I'm sure it's not taking loads of memory, but is it a problem if all these processes are running redundantly. Any ideas why there are two "processes" for each instance? Does the "sh -c" line indicate that each call is running in it's own shell?

My admittedly sketchy, and possibly erroneous understanding of the parameters suggests that the -l parameter asks ntpclient to continue setting the system time to the given server (in which case it, I presume keeps running). If I'm right about this you should either:

a. call ntpclient with the -l parameter once when the system boots, then only run the hwclock adjust (setting the hardware clock to the system time) in the crontab as often as you like (20 minute interval as you've done)

or

b. call ntpclient without the -l parameter but otherwise as you've done in the crontab. The -s parameter sets it every time, then exits.

The http://doolittle.icarus.com/ntpclient/HOWTO and http://doolittle.icarus.com/ntpclient/README suggest ways to use the lock and count parameters etc. to fine tune the process to reduce the microseconds difference between your system and the server. As I'm not trying to control the Hubble Telescope or the Mars lander with my slug, I'm not too worried. Your method ably keeps the slug on the right second which is as large a time interval as I could care about. I'm going to try option b. for the time being. Thanks.
View user's profile Send private message
AllanG
Posted: Sun Jun 01, 2008 5:46 pm Reply with quote
Frequent contributor Joined: 15 May 2005 Posts: 459 Location: Glasgow, Scotland
HarryLime wrote:
This is a useful idea, I have a slight concern in that when I look at the processes running, using the ps command, there seems to be listed a pair of processes for every instance of the crontab call (i.e. every twenty minutes since last reboot-ish). Example:
Quote:
494 root 1916 S sh -c /opt/bin/ntpclient -s -l -h uk.pool.ntp.org >>/var/log/nt
495 root 1648 S /opt/bin/ntpclient -s -l -h uk.pool.ntp.org
Snap!

In the last couple of days that's started happening on my Slug as well.

It was fine until very recently but something seems to have changed. I've tried using other time servers in case there was a problem communicating with them but it makes no difference.

At the moment I've accumulated around 20 pairs of entries since I rebooted the Slug this morning.

(I'm beginning to suspect a problem out on the BT network since nothing's been changed on any of my home network settings.)

_________________
Allan Girvan
TF5800, IA On, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy
TAPs: mei2archive BETA 3.8l3; Extend v1.7; FastSkip 1.1; Font Manager 1.0d; MyStuff 6.3; EPG2MEI v0.96; SecCache (UK) v0.4; EIT Sub v0.6; MyInfo B5.5;
Sig generated by MyInfo on 24/12/10
View user's profile Send private message
HarryLime
Posted: Sun Jun 01, 2008 11:39 pm Reply with quote
Joined: 27 Apr 2008 Posts: 22 Location: Ashurst, Hampshire
But if I've surmised correctly, this should have been happening the whole time you've been using ntpclient with the -l parameter, and shouldn't have anything to do with your network connection.

To be sure, ping uk.pool.ntp.org. Also you can run ntpclient without the -l manually from the prompt. This should show if you've a network problem.

Or don't use crontab to invoke ntpclient, issue it once (with the -l parameter) at start up, the process will stay active. you may then use the hwclock command part in crontab to regularly sync the slug's dodgy hardware clock to the system clock.

I'm hoping someone can still confirm or refute my wild guess here.
View user's profile Send private message
AllanG
Posted: Mon Jun 02, 2008 5:11 pm Reply with quote
Frequent contributor Joined: 15 May 2005 Posts: 459 Location: Glasgow, Scotland
HarryLime wrote:
But if I've surmised correctly, this should have been happening the whole time you've been using ntpclient with the -l parameter, and shouldn't have anything to do with your network connection.

But that's the odd thing - it only started going awry last week. The crontab line (as well as the line in /opt/etc/init.d/s10ntpclient - not sure why I have both!) has always had the "-l" switch.
HarryLime wrote:
To be sure, ping uk.pool.ntp.org. Also you can run ntpclient without the -l manually from the prompt. This should show if you've a network problem.

I can ping the timeservers without any problem but here's a strange thing...

Here we go without the "-l" switch...
Code:
# /opt/bin/ntpclient -s -h uk.pool.ntp.org
39599 60586.083   33296.0     42.0  281315.7  50552.4         0
#

And here's the same thing with the "-l" switch
Code:
# /opt/bin/ntpclient -s -l -h uk.pool.ntp.org
39599 60988.914   38227.0     16.0  2928614.5  40054.3         0


That last blank line is important:- the command doesn't return to a command prompt and needs a ctrl+c to kill it.

Presumably that's the cause of all of the hanging processes in a "ps" list?

Does that help or just muddy the waters even further?

_________________
Allan Girvan
TF5800, IA On, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy
TAPs: mei2archive BETA 3.8l3; Extend v1.7; FastSkip 1.1; Font Manager 1.0d; MyStuff 6.3; EPG2MEI v0.96; SecCache (UK) v0.4; EIT Sub v0.6; MyInfo B5.5;
Sig generated by MyInfo on 24/12/10
View user's profile Send private message
HarryLime
Posted: Tue Jun 03, 2008 6:12 pm Reply with quote
Joined: 27 Apr 2008 Posts: 22 Location: Ashurst, Hampshire
AllanG wrote:

That last blank line is important:- the command doesn't return to a command prompt and needs a ctrl+c to kill it.

Presumably that's the cause of all of the hanging processes in a "ps" list?

Does that help or just muddy the waters even further?


It doesn't muddy the waters. I think that using the -l parameter should ask it to continually check the server at an interval (I'm guessing once a minute, but right now, to busy/lazy/impatient to put to the test, oops, just looked at the readme, the default interval is 600 seconds!). This is why I believe that if you issue the command once with the -l parameter (I assume there's a way to do a startup script for when the system boots), it will just sit there and keep setting the system clock to the server time. If this is true you would only need the hwclock command in crontab to periodically sync the hardware clock to the system time. The process isn't hanging, it's just doing what you ask, like when you ping without specifying a count, it just keeps pinging until you ctrl-c. Try the same thing with the -i parameter with an interval of 10 (seconds), this will show you it's actually doing something, not hanging.

OR of course, I am completely wrong about the -l parameter's behaviour. The fact that you think this has just started happening on your system may be good proof for this (unless it's something that you might not have noticed, or if you reboot your slug often enough for it not to be noticeable). If that's the case, then it might be worth checking the usage with a different ntp server.

The only other factor may be that I'm using the latest version (as I've just installed it), if you've updated yours recently perhaps there's a change in the behaviour between versions.

The simplest solution is to drop the -l parameter from the crontab call.
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 5
Goto page 1, 2, 3, 4, 5  Next

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum