Friday, October 19, 2012

Debian Squeeze on NSLU2

After a very long time, I am updating the system and installing everything all over again. Here is the list of commands from ground up for those interested and for me to reference in the future. Installation of Debian is unpack "style" from now on. You can read the steps here. IN fact it is much faster this way. Follow the easy steps in here
http://www.cyrius.com/debian/nslu2/unpack.html
write the firmware to the NSLU2, and unpack the new Debian to the usb drive. One change on the new untarred Debian before you boot though, instead of DHCP use a static ip so you know where to ssh.
nano /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.77
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
change the root password:
passwd root
regenerate the SSH key (since the private key is included in the base system on my web page) by running:
rm /etc/ssh/ssh_host*
dpkg-reconfigure openssh-server
Change your timezone and make it permanent
dpkg-reconfigure tzdata
or you can do this for different users
tzdata
then accordingly, for example
echo "TZ='America/New_York'; export TZ" >> /root/.profile
then keep on updating the clock and upgrade the system.
ntpdate pool.ntp.org
apt-get update
apt-get dist-upgrade
Upgrade your locales
dpkg-reconfigure locales
change the hostname.
/etc/hostname
change the hostname and domain in the second line.
/etc/hosts
And some stuff from oldies, I just give the changes in here, if there is any. I guess I became lazy...

Reduce hammering on flash drive and install web server
http://nslu2guide.blogspot.com/2008/12/webserver-installation.html


Install cache for php. Give some breath space to slug
http://nslu2guide.blogspot.com/2008/12/lighttpd-eaccelerator-support.html
Project hosted on a new address:
http://eaccelerator.net/

and configure like
./configure --with-eaccelerator-shared-memory --with-php-config=/usr/bin/php-config --with-eaccelerator-userid=www-data --with-eaccelerator-content-caching



You may want to read-write ntfs drives
http://nslu2guide.blogspot.com/2009/01/using-ntfs-formatted-drives-in-debian.html


Free some memory, reduce startup time etc.
http://nslu2guide.blogspot.com/2009/01/free-more-memory.html


Fine tune slug
http://nslu2guide.blogspot.com/2009/01/fine-tuning-for-your-slug.html


Make slug communicate
http://nslu2guide.blogspot.com/2009/01/if-you-want-to-be-able-to-send-e-mails.html
instead of nail:
apt-get install heirloom-mailx



Protect your privacy
http://nslu2guide.blogspot.com/2009/04/lighttpd-password-protected-folders.html


Take slug to another room
http://nslu2guide.blogspot.com/2010/05/usb-wireless-adapter.html changes:
deb http://ftp.de.debian.org/debian squeeze main non-free

Friday, May 21, 2010

Adding USB wireless adapter

If you have a Belkin USB wireless adapter you can follow this to make it work.

lsusb listed my adapter as

USB: 050D:705A Belkin Components F5D7050A Wireless Adapter


Then add a "non-free" component to /etc/apt/sources.list for your Debian version.

deb http://ftp.us.debian.org/debian lenny main contrib non-free


Update the list of available packages, then install the firmware-ralink and wireless-tools packages:

aptitude update
aptitude install firmware-ralink wireless-tools


Necessary module is rt73usb, check if it is loaded with lsmod. If it is not loaded you can load it by writing modprobe rt73usb.

Verify your device has an available interface:

iwconfig


Raise the interface to activate the radio, for example:

ifconfig wlan0 up


You can check the nearby wireless routers by writing

iwlist wlan0 scan


Good Luck

Tuesday, April 27, 2010

Selling my NSLU2...

Hi all,

I decided to sell my NSLU2 for a more powerful new gadget. Asking for $50.
It is underclocked and has 5 usb ports (3 more added by me)
Everything works great, and comes with adapter and ethernet cable.
If interested, leave a comment :)
Thanks

(Only USA shipping)