Installing WANEm to harddrive

Anonymous
2009-12-03
2013-02-03

  • Anonymous
    2009-12-03

    I am running WANEm on XenServer and needed a way to preserve settings through a reboot. I decided that running it off the virtual hard drive might be the best option. I used the knx2hd script and it worked out quite well. I can't remember exactly what I did but here is a synopsis:

    run the script
    partion the drive (needed to use large-ish 5GB virtual drive)
    selected "knoppix style system"
    the script takes a little while.
    once it boots from the drive there is a script that is auto run at /KNOPPIX/.bash_profile but it has to be created. I put all my ifconfig and route statements there. I also put in all the stuff from the "reset_wanem.sh" script there that is below the putty.sh line.

    So far it seems to be working as expected.

     
  • More details for Version 2.2:

    1. Boot wanem iso, skip network setup, type exit2shell
    2. Install knopix to hdd with “knoppix-installer” - follow the wizard
    3. Fix installed linux
    3a. Fix some bugs in the knoppix image if you like
    http://www.knoppixforum.de/knoppix-forum-deutsch/festplatteninstallation/thread3956/modprobe-fehlermeldung-fatal-could-not-load-lib-modules-kernelnr-modules-dep-no-such-file-or-directory.html
    3b. Change keyboard layout:
    # dpkg-reconfigure console-common
    # dpkg-reconfigure locales
    and /etc/environment LC_CTYPE=de_DE.
    3c. Add apache to sudo
    visudo
    add “www-data ALL=NOPASSWD: ALL” with visudo
    3d. Start ssh and apache automatically
    update-rc.d ssh defaults
    update-rc.d apache2 defaults
    3e. Remove X
    update-rc.d –f xdm remove
    3f. Fix some paths
    export PATH=$PATH:/root//root/nambiar/disc_new_port_int
    4. configure all require network interfaces in
    vi /etc/network/interfaces
    5. Add wanem init script
    vi  /etc/init.d/wanem.sh

    #!/bin/bash

    # Default Wanem initialization
    echo -n "Network settings …… "
    echo 1 > /proc/sys/net/ipv4/ip_forward
    echo 0 > /proc/sys/net/ipv4/conf/default/send_redirects
    echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects
    echo 1 > /proc/sys/net/ipv4/ip_no_pmtu_disc
    echo "ok"
    echo -n " MTU=1500 settings …… "

    echo 0 > /proc/sys/net/ipv4/conf/eth0/send_redirects
    echo 0 > /proc/sys/net/ipv4/conf/eth1/send_redirects
    ifconfig eth0 mtu 1500
    ifconfig et10 mtu 1500
    echo "ok"

    # Wanem customization
    echo "Adding NAT on interface eth0"
    /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE  (see in /root/wanem.sh)

    And do
    Chmod +x /etc/init.d/wanem.sh
    update-rc.d wanem.sh defaults

     
  • Mike S
    Mike S
    2011-06-28

    Eddie, I don't see a /KNOPPIX directory.  Did you create the /KNOPPIX directory as well as the .bash_profile file?

    Can you post the contents of your .bash_profile?