EA6700 adjustments

published 1/10/2018

trying to recover a non-functional LINKSYS EA6700:

  • 32k nvram bug and
  • default linksys firmware
  • overheating

this mean CFE replacement and USB bug fix

relevant links which i used:

http://www.linksysinfo.org/index.php?threads/xvortex-or-advancedtomato-on-ea6900-v1-v1-1-without-32k-bug-renew.74084/

http://www.linksysinfo.org/index.php?threads/asuswrt-merlin-build-384-5-or-later-on-linksys-ea6900-or-ea6700.74209/

my web server notes

published 3/08/2018

some notes :

  • setup web server
    • opkg install lighttpd lighttpd-mod-cgi

    • opkg install php7 php7-cgi php7-mod-ctype php7-mod-gd php7-mod-mbstring php7-mod-hash php7-mod-json php7-mod-zip

    • in (/etc/lighttpd/conf.d/30-cgi.conf) cgi.assign add line : ".php"  => "/usr/bin/php-cgi"

 

  • setup USB
    • opkg install e2fsprogs kmod-usb-storage kmod-fs-ext4  kmod-usb-uhci kmod-usb-ohci kmod-usb2 usbutils block-mount

    • block detect > /etc/config/fstab

HP-UX system wide uid change

published 31/10/2007

following is a procedure to make 2 SAP SIDadm users who share
the same UNIX UID, live together on the same app server,
by changing one of the user’s UID (including the files)

 

# first change in /etc/passwd
usermod -u newUID loginname

# now go recursively and change the files accordingly
find / -user oldUID -exec chown newUID {} \;

FLUKA live

published 8/04/2007

Fluka LIVE was my Software engineering graduate project,
it is a complete linux distribution, built from scratch,
intended to run from a CD.
it consists isolinux, the kernel, busybox, bash & a
fortran toolchain.

publication website : https://www.researchgate.net/publication/229398257_FLUKA-LIVE-an_embedded_framework_for_enabling_a_computer_to_execute_FLUKA_under_the_control_of_a_Linux_OS

 

PERL search & replace

published 3/03/2007

a simple script i made to replace multiple appearance of a word in a raw or multiple raws, output to file.new

#!/usr/bin/perl


if ($#ARGV != 2) {
  print "this programs output is FILENAME.new\n";
  print "usage: search_Replace.pl
     BEFORE AFTER FILENAME\n";
  exit;
}
$newfile_name = "$ARGV[2].new";

print "Before : ",$ARGV[0],"\n";
print "After  : ",$ARGV[1],"\n";
print "Opening ... ";
open (OLDF, $ARGV[2]) ||
   die ("Could not open file. $!");
open (NEWF, ">$newfile_name") ||
   die ("Could not create output file. $!");
print "IN/OUT pipes are open.\n";
while ($text = ){
    $text =~ s/$ARGV[0]/$ARGV[1]/g;
    print NEWF "$text";
    }
close (OLDF);
close (NEWF);

vm ESX image copy

published 8/11/2006

as ESX v3 don’t support copy of vmware machines by web interface
(no VC) i have written a script for migrating a vmdk disk from existing Machine to a new one.

#!/bin/sh

SRC=$1
TRG=$2
/usr/bin/clear

if [ $# -ne 2 ]
then
echo "COPY Virtual Machine Utility"
echo "USAGE : cp_IMAGE SourceDIR DestinationDIR"
echo "-----------------------------------------"
exit
fi

echo "COPY Virtual Machine Utility"
echo "-----------------------------------------"
sleep 1

echo "Source Directory : " = $SRC
echo "Target Directory : " = $TRG
echo "-----------------------------------------"
sleep 1
if [ -e $SRC/$SRC.vmdk ]
then
echo "Source Virtual Machine exists !"
sleep 1
else
echo "Source Virtual Machine - not Exists !"
echo "fix source Virtual Machine name"
exit
fi
sleep 1
if [ -e $TRG/$TRG.vmdk ]
then
echo "Target Virtual Machine exists !"
sleep 1
else
   echo "Target Virtual Machine - not Exists !"
   echo "Create Destination Virtual Machine"
   exit
fi
if [ $SRC = $TRG ]
then
   echo "Cannot copy VM to itself !"
   echo "bye"
   exit
fi
echo "Going to remove {" $TRG "} Disks"
echo "Are you Sure ? (yes/no)"
read ANswer
case "$ANswer" in
        "yes" ) /bin/rm $TRG/*.vmdk;
                echo "Target Disk Removed";
                sleep 2;
        ;;
        "no" ) echo "bye";
               exit;
        ;;
        * ) echo "not a valid option";
            echo "bye";
            exit;
esac


/usr/sbin/vmkfstools -i $SRC/$SRC.vmdk $TRG/$TRG.vmdk
echo "-----------------------------------------"
echo "Done."

Automated Login Example

published 3/10/2006

this is a small script for automated login,
can be used for regular maintenance or something…

#!/bin/sh
#
#
server=x.x.x.x

(
   sleep 2;
   echo "username";
   sleep 2;
   echo "password";
   sleep 2;
   echo "do some manipulations in the session";
   sleep 3;
   echo "exit";
) | telnet $server
 

busybox notes

published 12/04/2006

Some notes from my busybox implementation:

  • for fortran support –enable-languages=f77 in gcc.
  • after compilation make the soft link : ln -s /path-to-g77 /bin/g77
  • inittab :: wait:-/bin/sh for automated login
  • no Correct Hostname value in this file, so manualy do /bin/hostname ‘the_name’
  • no Snapshot use in buildroot compilation – uclibc,busybox.
  • bash :: echo -e ‘\E[num1;num2m{text}’ – for:back :: 31 red – 32 green – 36 cyan – 37 white – 40 black
  • changes in packages settings for buildroot are done in package/…
  • busybox :: enable_renice

KERNEL :

  • Firestarter :: USB::Usb Mass storage ;
  • SCSI::Scsi Disk support,num of disks 40 ;
  • File Systems::dos fat fs,ms dos fs,vfat,romfs ;
  • Partition types::Advanced Partition, PC Bios ;
  • Block Devices::RAM Disk Support,initrd

ENV :

  • alias ls=’ls -l –color’

Log Rotate Example

published 11/12/2005

a simple script for log rotation,
used in systems without logrotate.

#!/bin/sh

# Assignments
script=$1
num_of_rotates=$2

# Rotation
i=$num_of_rotates
while [ $i -gt 1 ]
do
   minus=`expr $i - 1`
   if [ ! -f $script.$minus ]
   then
touch $script.$minus
   fi
   mv $script.$minus $script.$i
   if [ "$minus" -eq 1 ]
   then
cp -fp $script $script.1
cp /dev/null $script
   fi
        let "i -= 1"
done

 

Welcome

published 3/08/2005
Welcome to my website
it runs from my home server – a real beast
450mhz pentium with Debian linux.
site content will relate to my hobbies, family,
& some stuff for system/database admins.