HowTo Guides‎ > ‎

Lemonade : All-In-One


For the record, I paid $7.49 for a Verizon 7501 and $1.99 for a USB2.0 hub.  Both deals had free shipping.  ;)

This writeup shows how to install Lemonade on your Verizon 7501.  Lemonade enables a USB print server, basic USB disk sharing (via FTP), a UPnP media server, Zeroconf/Bonjour autodiscovery and a basic additional webif for checking the status and rescanning media.  It also adds quite a few more Linux commands.  

Lemonade is neither a Linux distro (like Tomato or OpenWRT), nor does really change the rootfs, which is read-only.  Instead, it extends the rootfs by adding in directories at the USB mount point (/var/usb_mount).  Included in the directories are binaries for:
  • ftpd server
  • minidlna server
  • p910nd USB print server
  • httpd server 
  • cron
  • mDNSresponder
  • mkfs.vfat
  • fsck.vfat
and quite a few others.  As such, it leaves some room for further customization and addition of functions.

Installation instructions: (for upgrading instead go here)

0.  Read this disclaimer and understandThe binaries, scripts, software, directions and information on this site are all provided as-is, without any guarantee, warranty, or anything like that, whatsoever.  We will not be responsible for any damage or problems incurred.   Installation and use is at your own risk.  You brick it, you bought it.  Also, keep your network and router secure.  Read and follow the SECURITY directions, and read and understand the GPL & Legal page.

1.  Requirements:
  • 7501 Router, already configured for your network
  • lemonade 1.2.2 tarball  (make sure you have the 1.2 tarball - not the old one in the old/morgue section)
  • lemonade 1.2.2 script  (make sure you have the 1.2 script - not the old one in the old/morgue section)
  • USB2.0 drive (flash or hdd; small or larger - 8GB or bigger is better for music & video, make sure it is a High Speed 480Mbps device, not a Full Speed 12Mbps device; some older, slower USB2.0  flash drives seem too take too long to respond are are assigned to sdb instead of sda)
  • USB2.0 hub (optional, but required if you want to connect a USB printer; make sure it is a High Speed 480Mbps hub, not a Full Speed 12Mbps device)
  • USB printer (optional)
  • as is, only 1 drive and 1 printer are supported - it is certainly possible to hack this to get more than one of each device recognized and used, but the webif won't show it and it probably won't work out of the box

2.  Format your USB drive as a single partition with vfat (or fat16 - see note below) as the filesystem, master boot partition.  Test to see that your router automounts it.  You can do this by simply plugging it in the USB port of your router.  If the USB LED light goes on and stays on, then it has automounted.  If it doesn't automount, then you will have to fix this before going on to step #3.  Power down your router & remove the USB drive.  Then turn it back on.

(Formatting Hint from John/SimpK5 : Try using the program PEtoUSB to format your drive to fat16.  He used this successfully and got it to automount nicely.)



3.  Download the tarball lemonade_1.2.2.tar.gz, and untar it, placing the two directories (opt/ and share/) at the first level on your USB drive.  Do not leave opt/ and /share in the dir  lemonade.  Make sure they are at the root level of the USB drive's partition.

4.  Download the lemonade-script_1.2.2, and copy&paste the entire contents of it in the Custom Firewall text window.  Save your changes.

5.  Turn your router off, and then connect the USB hub to your router, and then your USB drive to the router's USB port.  Optionally, you can connect your USB printer to the USB hub, as well.

6.  Turn on your router, allow it to boot up and settle.  You should see the USB light eventually come back on, meaning the USB drive is mounted.

7.  Log in via telnet.  Supposing your 7501's ip  number is 192.168.11.150, you will see something like this.
davygravy@bitbaker64:~$ telnet 192.168.11.150
Trying 192.168.11.150...
Connected to 192.168.11.150.
Escape character is '^]'.



BusyBox v1.1.3 (2008.05.13-21:27+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

#



8.  The three servers should now be running.  Check it by running ps.  The three servers are represented by the three bold-listed processes below.  Actually, tcpsvd is not the FTP server, but it will spawn an FTP thread when it hears traffic on the FTP port.

# ps
  PID  PRI  Uid     VmSize Stat Command
    1    0 root        480 S   /sbin/init
    2    0 root            SW< [ksoftirqd/0]
  ...
 1287    0 root        308 S   /sbin/telnetd
 1292    0 root        296 S   p9100d -b -f /var/dev/lp0 0
 1293    0 root       1040 S   minidlna -d -f /var/usb_mount/opt/etc/minidlna.c
 1295    0 root        368 S   tcpsvd -E 0.0.0.0 21 ftpd -t 300 -w /var/usb_mou
 1316    0 root        852 S   wsccmd
...
#

You can test them by FTP client, UPnP client and testing your USB printer out with it.


9.  Secure your router:  Once you are done with your installation, you should make sure that you disable the telnet daemon.  If you don't do this, then it will be easy for anyone to log into your router via telnet, gain access to root and perhaps do nasty things.

Disable telnetd by going to the web interface> Firewall Settings>Custom Firewall> Edit:  Find the line that reads  '/&/& /sbin/telnetd' and change it.  The change you need to make is shown in context below:

telnetd enabled at boot:
 
PATH=/sbin:/bin:/var/usb_mount/opt/bin:/var/usb_mount/opt/sbin:/var/usb_mount/opt/etc/init.d
mkdir -p /var/lock/subsys
sleep 2
hostname V7501
/&/& /sbin/telnetd mknod -m 660 /var/dev/lp0 c 180 0



telnetd disabled at boot (just put a # symbol at the beginning of the line):

PATH=/sbin:/bin:/var/usb_mount/opt/bin:/var/usb_mount/opt/sbin:/var/usb_mount/opt/etc/init.d
mkdir -p /var/lock/subsys
sleep 2
hostname V7501
# /&/& /sbin/telnetd
mknod -m 660 /var/dev/lp0 c 180 0
After you make this edit to the firewall script, Save and reboot your router.

10.   The Lemonade webif page is browsable by any Bonjour/Zeroconf-enabled browser, or at  
         http://<ip-of-your-router>:81/cgi-bin/lemonade.cgi
or at
             http://v7501.local:81/cgi-bin/lemonade.cgi
Its username is "lemon" and its password is "ade".   You probably don't need to change these since they are only for checking status and rescanning the media dirs.  If you want to change them, it can be done by editting the file at
/var/usb_mount/opt/etc/httpd.conf .

11.  Troubleshooting:
A.   Lemonade webif not available: If you can log into the stock webif, but can't get to the Lemonade Webif, then it is possible that the USB2.0 drive did not mount properly.  This is an occasional problem with older, slower dirves.
To see if this is the case, log in via telnet and execute the command 
df -h| grep sda1
If you get no output from this, then your drive is not mounting.  There could be problems with the format, or it could be too slow.  If the drive is slow and you have a USB printer connected, then the printer gets recognized before the drive, and this causes problems.

If you do get output similar to this
df -h| grep sda1
/var/dev/sda1           981.3M    233.7M    747.6M  24% /var/usb_mount

then your drive is mounting.  In this case, check to see if the drive has the correct contents:
ls /var/usb_mount/*
/var/usb_mount/disabled:
opt    share

/var/usb_mount/opt:
bin   etc   lib   sbin  var   www

/var/usb_mount/share:
media
if you see this, then your contents should be intact.  If not, then your files could be corrupted- in this case, try recopying them to your drive.

B.  Printer not recognized:  This is a tricky thing and depends a bit on your USB hub, your disk, and your printer.  If lemonade boots for you, but you don't see the printer  the webif then in telnet execute the following command:

dmesg | grep SCSI -A 3 -B 3
It won't solve the problem, but it will give some useful diagnostic information.  In particular, the lines  (see below) that say scsi0, scsi1 and scsi2 tell where the devices are "landing" as the kernel recognizes them.  You want your USB drive to land at scsi0 and the printer to land at scsi1.  Remember, only two devices are supported in the webif and by the script.   

If you have only 2 devices attached, and you have problems getting the printer to be recognized, you can try changing which physical ports on your USB hub that you use.  This can be done by trial and error, but remember to power down before you disconnect the drive.  Ideally though, once it boots, it is better to not move the drive, and instead try plugging in the printer at different ports.

# dmesg | grep SCSI -A 3 -B 3
netconsole: not configured, aborting
shaper: falsely claims to have parameter shapers
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
SCSI subsystem initialized
usbcore: registered new driver usbserial
/home/mlync/projects/modem_sw2_6359_4port/Software/SW/linux/linux-2.6.8.1/drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0
Initializing USB Mass Storage driver...
usbcore: registered new driver usbserial
/home/mlync/projects/modem_sw2_6359_4port/Software/SW/linux/linux-2.6.8.1/drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
  Vendor: ????  Model: ????????  Rev: 2.02
  Vendor: ????  Model: ????????  Rev: 2.02
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sda: 253949 512-byte hdwr sectors (130 MB)
sda: assuming Write Enabled
sda: assuming drive cache: write through
 sda: sda1
--
eth1.2: add 01:00:5e:00:00:01 mcast address to master interface
usb 2-1.1: new full speed USB device using address 4
usb 2-1.1: not running at top speed; connect to a high speed hub
scsi1 : SCSI emulation for USB Mass Storage devices
  Vendor: Memorex   Model: TD CLASSIC 003B   Rev: PMAP
  Vendor: Memorex   Model: TD CLASSIC 003B   Rev: PMAP
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sdb: 2015232 512-byte hdwr sectors (1032 MB)
sdb: assuming Write Enabled
sdb: assuming drive cache: write through
 sdb: sdb1
--
usb 2-1.4: new full speed USB device using address 5
usb 2-1.4: not running at top speed; connect to a high speed hub
/home/davygravy/WD/SW-kernelwnfssublpBBwidest-p910nd093/linux/linux-2.6.8.1/drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 5 if 1 alt 0 proto 2 vid 0x03F0 pid 0x6C11
scsi2 : SCSI emulation for USB Mass Storage devices
  Vendor: HP        Model: Photosmart C4400  Rev: 1.00
  Vendor: HP        Model: Photosmart C4400  Rev: 1.00
  Type:   Direct-Access                      ANSI SCSI revision: 02
Attached scsi removable disk sdc at scsi2, channel 0, id 0, lun 0
USB Mass Storage device found at 5