PDA

View Full Version : Beginners mistakes


Freelancer
29-07-2007, 16:54
Hi, There

After fighting two days to set up my router to work decided to write about the mistakes that I made during installation.

The Hard Disk partition.

I hade a big hard disk. I partitioned the first time as r0kanon said.
http://wl500g.info/showthread.php?t=6222

2 partitions:
1st small boot.
2nd the rest.

But I just could not get transmission work.
I suspected the that I could not configure transmission so I thought of making a three partition system so that I can mount the 3rd partition to /tmp/harddisk/

Than I went for Moody Blue guide:
http://wl500g.info/showthread.php?t=5909&page=3

This also did not worked out because my the router kept on out mounting the first boot partition to the /tmp/harddisk/
In the /tmp/harddisk/ I used to have two mounted partitions. System mounted the boot partition and I mounted the 3rd. Could not unmount the boot. This did not worked out.

So I thought maybe I’ll go for marcnesium way because if the system auto mounts the first drive than it will mount my big storage partition.
http://wl500g.info/showthread.php?t=5909

So I put the small boot partition in the back. But now I do not know why but the system did not did the auto mount.
But that was not a problem, because I mounted twice and that worked fine. :)


nano /usr/local/sbin/post-boot




#!/bin/sh

# test if USB disc has been attached
# if not - then insert needed modules
if [ ! -d /dev/discs ]
then
insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
fi

# Wait for /opt to mount
mount /dev/discs/disc0/part1 /opt
mount /dev/discs/disc0/part1 /tmp/harddisk
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done

# Activate swap
swapon /dev/discs/disc0/part2

# Set hostname
hostname my.router

# Synchoronize time
# For GMT time zone you would want to:
echo "GMT+0BST-1,M3.5.0/01:00:00,M10.5.0/02:00:00" > /etc/TZ && sleep 2s
# Then ntpclient can update the time correctly
ntpclient -l -h 0.uk.pool.ntp.org -c 1 -s

# Run all active services - active means starts with S
# SAMBA will be started from there if you have follow marcnesium's instructions
/opt/etc/init.d/rc.unslung

Freelancer
29-07-2007, 17:06
My second big mistake was the /opt/etc/init.d/rc.unslung
Oh, boy, I kept on doing every configuration Till I realized that rc.unslung needs to be created and written right after mounting the data drive.
rc.unslung is the file that executes the startup configs from the
/opt/etc/init.d/ directory. (S05syslogd, S10cron, S80busybox_httpd, S97Samba)
Kept on writing those files and did not realize that they are not working.
Man, and marcnesium, r0kanon, Moody Blue they never speek about this in their tutorial. If they read this than they shoud update.

wengi wrote how the file should look:
http://wl500g.info/showthread.php?t=9477&highlight=rc.unslung

So in marcnesium tutorial before
Initiate ipkg and install nano, screen, midnight commander (or in between)
make sure that you create rc.unslung.
See wengi's post

Freelancer
02-03-2008, 14:54
An other mistake that I made was when I copy pasted the various config files.
I did not noticed that one of the comment lines ended in the new row.
like this:


#This is very long comment line and here is carried return
and this is a new line and it interprets it like a code line.


I kept on getting the:
"Unable to find recent transfer stats in syslog"
error line on my transmission and simply could not figure what is wrong.

I found the error accidentally.
As I was browsing trough my config files with the Midnight Commander F3 editor which gave highlight I noticed, hey that is not good.
So my advice is as you configured all look, with the colorful Midnight Commander at your config files and review them if they are okey. Do not use the black and white Midnight commander or other editor because that is not good.