Page 1 of 2 12 LastLast
Results 1 to 15 of 188

Thread: [HowTo] Get a HeadStart on a WL-500gP

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Lightbulb [HowTo] Get a HeadStart on a WL-500gP

    Hi, I've released a new version of this system image: HeadStart II
    this one runs under oleg's latest firmware:v1.9.2.7-10
    read on here: http://www.wl500g.info/showthread.ph...117#post112117 how to install it.


    As of now, the old images of the system are not available anymore.


    Since I've became an owner of this device (june/july 2007) I've always been browsing this board on how to get the most out of this machine. Now it's my time to do something back for the board, specifically new users, to give them a headstart.

    That's why I created something like a 'system-image' of a setup with 'basic-needs' running on a asus wl500gp with oleg's (1.9.2.7-8, 1.9.2.7-7g should also work) firmware installed.



    In short: How to get it running?
    1) meet the prerequisites before actually continueing this setup
    2) download the opt.tar.gz package which is needed to setup/replace the '/opt' part on your asus
    3) download the mnt.tar.gz package which is needed to setup/replace the '/mnt' part on your asus
    4) configure to your needs (like other passwords, download/web folders)
    5) read about what you you have installed and how to use it.
    6) enjoy !

    What is in the package?

    central network attached storage device where files are hosted which are used by a wide variety of devices in my home.
    automatic newsgroup and bittorrent downloader
    website to host a website and share (secure) files stored on as if on home network

    Software/tools

    • samba2 with swat (to work with windows filesharing, vista included.)
    • lighttpd webserver with php and mysql support running a version of simpleCMS (with a password protected directory, and choice of running http or https protocol)
    • hellanzb with zussaweb webinterface (to download,verify,unpack binaries from newsservers)
    • Transmission (BitTorrent Downloader)
    • mysql database with myphpadmin (included in AIOCP)
    • Wake On lan application (password protected) with which you can remotely turn-on your pc's at home (if pc-hardware supports)
    • tuned system to get a good and acceptible response on any service regardless of heavy load. (with the use of nice)
    • cron
    • etc. etc. for a complete list of installed packages see the attached file.


    Prerequisites:
    oleg's firmware installed. (at the moment I have running: WL500gp-1.9.2.7-8 version and can confirm it also runs on WL500gp-1.9.2.7-7g))
    a hard drive (with 3 partitions: /opt (system), /mnt (data), and a swap, the tutorial uses these mounting points. if you want to leave your own mounting points intact in the post-boot file, you have to change the configuration files for the various services which are included in this setup and the extraction of the mnt.tar.gz package might fail.)
    post-boot file in which mounting of partitions is done. (mine is attached, use it for reference, but tune to your own needs).


    Need to knows:
    I have never changed my ip of the asus (192.168.1.1) so this setup assumes that address.
    I am running in Access Point only mode, I have no experience with the other settings so I can't answer questions about that. (configure this in the basic asus setup http://192.168.1.1)
    The name of my device is: NAS (Not that I know of it has be configured in this setup, but should you run into something, which I doubt, then this of NAS as the name of the device in the system setup of the basic asus setup http://192.168.1.1)


    Backup your current system:
    If you have nothing setup op on your asus already or do no wish to keep what's installed, skip this step and continue to the next step System/Harddisk preparation without a backup of your current /opt

    2 different ways to try this asus headstart

    • just use an old harddisk, even an old 10gb will do to test this image
      (You will have to backup your post-boot file though !!!)
    • backup your current /opt according to the following steps.
      edit post-boot file to NOT start services on startup (a lot of services don't like being archived when they are running.)
      use your favorite text editor (nano/vi) and edit the following file according to the steps below.
      Code:
      /usr/local/sbin/post-boot
      do as below and comment-out the line to start the services in the post-boot file
      Code:
      # Run all active services - active means starts with S
      #/opt/etc/init.d/rc.unslung
      write file and flash/reboot
      Code:
      flashfs save && flashfs commit && flashfs enable && reboot
      login to console again and create a backup of /opt to /mnt/opt.tar.gz with the following command:
      Code:
      tar -cvzf /mnt/opt.tar.gz /opt
      (or other location if you have your datafile not mounted to /mnt)
      (this process takes quite some time if you have a lot installed. if you have also data (audio/video, I would not recomend it. 370mb of /opt takes 70+ minutes.))

      now, enable the services in the post-boot file like you disabled them above by uncommenting the line you commented before.
      enable the services on bootup in:
      Code:
      /usr/local/sbin/post-boot
      do as below and uncomment the line to start the services in the post-boot file
      Code:
      # Run all active services - active means starts with S
      /opt/etc/init.d/rc.unslung
      write file and flash/reboot
      Code:
      flashfs save && flashfs commit && flashfs enable && reboot
      now you have access to your share again save this opt.tar.gz on /mnt file to another computer/network share. not on the asus.
      THIS IS YOUR BACKUP OF YOUR CURRENT SYSTEM !!!


    System/Harddisk preparation:
    next step is only to be taken for new users or if you don't have created the 3 partitions already. If you already have the 3 partitions continue to the next step.

    For this step I must redirect you to the first steps ( 1,2,3,4a,4b) of the excellent tutorial written by wengi on how to setup and install oleg's firmware: http://www.wl500g.info/showthread.php?t=10307
    (i can copy all those steps here, but I couldn't have done a better job on it than wengi, thanks wengi/oleg, you guys figure it all out, 'i just put stuff toghether')

    Now that you've completed the first steps of wengi's setup, we're going to make a small change in post-boot file you've created in his setup: The data directory in wengi's setup mounts to /tmp/harddisk. this has to be changed to /mnt.

    open the post boot script at
    Code:
    /usr/local/sbin/post-boot
    and change the line: (where part3 is your data partition, if it's not, change it)
    Code:
    mount /dev/discs/disc0/part3 /tmp/harddisk

    to (where part3 is your data partition, if it's not, change it)
    Code:
    mount /dev/discs/disc0/part3 /mnt

    write file and flash/reboot
    Code:
    flashfs save && flashfs commit && flashfs enable && reboot
    I decided to mount to /mnt because it was easier for the system image and /tmp sound to 'temporary' to me that's why /mnt (mounted).

    Now that you've learned how to access the router and issue the commands, it's time to move on to the next step.



    System/Harddisk preparation (continued):
    edit post-boot file to NOT start services on startup (a lot of services don't like being archived when they are running.)
    use your favorite text editor (nano/vi) and edit the following file according to the steps below in:
    Code:
    /usr/local/sbin/post-boot
    do as below and comment-out the line to start the services in the post-boot file
    Code:
    # Run all active services - active means starts with S
    #/opt/etc/init.d/rc.unslung
    write file and flash/reboot
    Code:
    flashfs save && flashfs commit && flashfs enable && reboot
    Now, skip below and continue to "Install the HeadStart 'system-image'" If you are continueing after just making a backup of your current system you have to take the next step.
    because we're installing a new system, it wouldn't hurt to 'flush' the old one, so nothing gets mixed up. (that's why we've created the backup in the step before.)
    unmount all current mounted partitions with umount
    Code:
    umount /opt
    (to view how partitions are mounted, use the df command.)

    open fdisk
    Code:
    fdisk /dev/discs/disc0/disc
    delete your current /opt partition.
    recreate the partition again with the same parameters.
    (exit with w)

    create the filesystem for /opt
    Code:
    mke2fs -j /dev/discs/disc0/part1
    (where /dev/discs/disc0/part1 is your /opt partition, if you have your /opt partition on another partion, change the command to the partition you are using!)
    reboot


    Install the HeadStart 'system-image':

    The parts below are no longer valid ! read on in this reply on this topic

    http://www.wl500g.info/showthread.ph...117#post112117


    log on to your router and download system file to /mnt (77,5MB)
    extract the file to /opt
    Code:
    cd /
    tar -xvzf /mnt/opt.tar.gz
    - sit back and wait (get a beer, takes 4 minutes or so)



    Install the webapplications and directory structure:
    download dir structure and web file to /opt (10,5MB)
    extract the file to /mnt
    Code:
    cd /
    tar -xvzf /opt/mnt.tar.gz
    - sit back and wait (get another beer :-), takes 3 minutes or so)

    enable the services on bootup in:
    Code:
    /usr/local/sbin/post-boot
    do as below and uncomment the line to start the services in the post-boot file
    Code:
    # Run all active services - active means starts with S
    /opt/etc/init.d/rc.unslung
    write file and flash/reboot
    Code:
    flashfs save && flashfs commit && flashfs enable && reboot

    Read on in the next reply how to configure things.
    Attached Files Attached Files
    Last edited by raas; 10-10-2008 at 13:33. Reason: new version, old version unsupported.

  2. #2
    Configure to your needs:
    login and change the passwords as in the following.
    (actually, the login and password I used in the system image is admin/asus,
    except for the swat login, which uses the password you've entered in your device through the standard web interface.)

    for mysql use console, login into mysql using:
    Code:
    mysql -u root -p mysql
    -password is asked: asus

    then at mysql prompt, issue following command:
    Code:
    update user set password=PASSWORD("asus") where User='root';
    (Where you replace "asus" with your new password)

    exit mysql console by entering
    Code:
    exit
    reboot your system
    Code:
    reboot
    login and in the following file, change the password so that your mysql login for phpmyadmin works.
    Code:
    /mnt/AIOCP/admin/phpMyAdmin/config.inc.php
    (line 73)

    And for AIOCP
    Code:
    /mnt/AIOCP/shared/config/cp_db_config.php
    (line 47)


    The user for AIOCP can be changed in the web-gui
    http://192.168.1.1:8082/AIOCP and click the administration panel link (login:admin, pass:asus)

    You have to change the password for the protected web directory (/mnt/protected) in
    Code:
    /opt/etc/lighttpd/.lighttpdpassword
    (if you change anything in this file, you have to run the following command:
    Code:
    /opt/etc/init.d/S80lighttpd restart
    )


    You have to setup your newsserver for HellaNZB in the following file:
    Code:
    /opt/etc/hellanzb.conf
    Transmission is running, but can be configured by:
    Code:
    /opt/etc/transmission.conf
    (if you change anything in this file, you have to reboot)

    Samba is running and can be configured by:
    Code:
    /opt/etc/samba/smb.conf
    and: http://192.168.1.1:901 (this UI uses the password you have entered in your device, instead of the 'asus' password which is used in the config-files above.)

    Webserver (root dir and protected folders, as well as cgi/php implementation can be changed here:
    Code:
    /opt/etc/lighttpd/lighttpd.conf

    Well, congratulations, if you're at this point and all went well you're actually ready with the HeadStart installation! Read the next part on how to use it.




    What did I get and how do I use it:
    I recommend a reboot when you're reading this, this way you make sure all the services are correctly started after you have configured them. In the meantime, you can read along what this system install has installed and how to use it.


    • Samba2, The network share service (connect with your (window$) PC)
      Samba is pretty standard configured.
      On the disk, you have 2 partitions to store programs (/opt) and data (/mnt) these are also writable shares in Samba. In a windows environment (I used WORKGROUP, can be configured with swat http://192.168.1.1:901, name of device is NAS) it would show up as:

      -Microsoft Windows Network
      ___Workgroup
      ______Nas
      _________mnt
      _________opt

      Both shares are writeable, I reccommend writing your data to /mnt (look at the expanded directorystructure by using your pc.) The access to /opt is just there to give you a quick-ref to your program directory without login into your console.

    • lighttpd webserver
      This webserver is configured to run on port 8082 so you can access it here: http://192.168.1.1:8082
      Right now, there are 2 content management systems installed. CMSSimple (standard) and AIOCP
      The webserver has php and mysql support. AIOCP uses the mysql database, CMSSimple does not, it's a straight-forward content management system which only uses 'flat-files'. I decided to do so because it's very light. And if you do a lot of downloading with this machine, mysql response can be slower. And I still wanted to have a 'fast' website in this setup. But you can change to your own needs.
      Also, I know this is going to be a point of discussion: the root of the webserver is /mnt (!)
      I did this because in this setup I wanted a 'open-mind' towards accesibility of your files.
      however. the files in /mnt/protected are password protected from the web, so there is security. If you don't like it, simply change the root dir of the webserver to /mnt/cms or /mnt/AIOCP in /opt/etc/lightpd/lighttpd.conf

      Standard the webserver runs on the http protocol, but https is also supported. A certificate is installed on the system, and this should work.
      In order to run the https protocol instead of the http protocol go to /opt/etc/lighttpd and create a backup of lighttpd.conf and rename lighttpd.conf.ssl to lighttpd.conf
      Then restart your webserver with:
      /opt/etc/init.d/S80lighttpd restart

      You already know how to change the password/users and password protected directories, so configure to your needs.

    • phpMyAdmin
      commenly known web application to control your mysql database. found here http://192.168.1.1:8082/AIOCP/admin/...dmin/index.php
      (user:admin pass:asus, or the other password your set in /opt/etc/lighttpd/.lighttpdpassword)

    • Transmission (BitTorrent Downloader)
      runs in the background.
      Simply put your torrent files in /mnt/protected/Transmission/source and download should start in the background.
      downloads can be configured with WebUI, found here http://192.168.1.1:8082/cgi-bin/transmission.cgi

    • HellaNZB
      Well, there are 2 small issues with this one.
      1) it doesn't start on itself after the router reboots. (start with: /opt/bin/startHellaNZB)
      2) it doesn't download anymore after more than 24h of inactivity.
      However, I've downloaded TB's with this application and i'm very please how well it downloads, verifies and extracts my downloads. That's why I've included this one in the package.
      In my opinion it's workable, because when your are collecting your nzb files, your at your machine. A simple reboot/restart of HellaNZB to get it to download again can be executed then.
      Once you've started HellaNZB with /opt/bin/startHellaNZB, you can access zussaweb WebUI in order to control HellaNZB at http://192.168.1.1:8082/protected/zussaweb/
      After starting HellaNZB, simply put your nzb's in /mnt/protected/HellaNZB/nzb/daemon.queue and download will start.

    • Wake-On-Lan Application.
      If the website running on the asus is accessible from the internet, and if your pc supports WOL and is enabled, and if you've entered the correct MAC-address in /mnt/cgi-bin/wol.cgi then you're able to wake up your machine from anywhere on the internet.
      Point your browser to http://192.168.1.1:8082/cgi-bin/wol.cgi and your machine should boot up.

    • There are other (console) utilities installed and also AIOCP http://192.168.1.1:8082/AIOCP has a lot of tools inside.



    Well, that's about it.

    Because this is my first how-to on this asus, there's still a change there might be a flaw. don't hesitate to mention/ask.

    Good luck, and I hope you enjoy it.

    Raas.
    Last edited by raas; 04-02-2008 at 13:50. Reason: layout

  3. #3
    Join Date
    Sep 2007
    Location
    Canada
    Posts
    15

    Problem

    Hi there,

    I was following your guide but when I tried downloading your image I ran in an error... Any idea what I should do to continue?
    [admin@(none) /mnt]$ wget http://dhost.info/raas/opt.tar.gz
    wget: opt.tar.gz: Read-only file system


    Thanks in advance!

  4. #4
    Join Date
    Sep 2007
    Location
    Canada
    Posts
    15

    Talking It's me again

    Sorry, somehow I managed to solve the problem but now I'm stuck again
    I'm trying to change the mysql password (as far as I can tell you) but after I enter [B]asus/B] as my password I get an error...
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

    Any idea what this means?

    Thanks in advance...

  5. #5
    Hi,

    I think your services are not running.
    Have you checked your post-boot script?

    following lines should be uncommented.
    Code:
    # Run all active services - active means starts with S
    /opt/etc/init.d/rc.unslung
    Edit:
    Yes, I just was able to replicate your error.
    If your don't start the services like above, after entering your password, you will get this error message.
    Don't forget to flash post-boot to the memory after editing.
    Last edited by raas; 02-02-2008 at 19:38.

  6. #6
    Join Date
    Sep 2007
    Location
    Canada
    Posts
    15

    No luck

    actually the line is uncommented, and I still get the same error... any other ideas?

  7. #7
    I just flash my 500gP with oleg firmware. I'd like to setup a blog/CMS, I read the tutorial in this web site but require 3 ext3 partitions, but my 2.5" hard drive is VFAT32, can I simply use VFAT32 instead?

  8. #8
    Another noobe question.

    I run free to check memory:

    total used free
    30084 15112 14972

    Is that 32MB is enable already?

    Thank you.

  9. #9
    Quote Originally Posted by flim View Post
    I just flash my 500gP with oleg firmware. I'd like to setup a blog/CMS, I read the tutorial in this web site but require 3 ext3 partitions, but my 2.5" hard drive is VFAT32, can I simply use VFAT32 instead?
    It should also work with FAT32 partitions for /opt and /mnt.
    However, for the swap partition you need the 'swap' filesystem, and FAT32 does not support files greather then 2gb.

    Quote Originally Posted by flim View Post
    Another noobe question.
    I run free to check memory:
    total used free
    30084 15112 14972
    Is that 32MB is enable already?
    Thank you.
    30084, this is it.. yep.. your 32mb is enabled.
    (If you have a wl500g Premium, it's enabled by 'default')

    HTH

  10. #10
    Thanks for reply, is there any email server in HeadStart?

  11. #11
    Quote Originally Posted by flim View Post
    Thanks for reply, is there any email server in HeadStart?
    Hi,

    no, there's none.
    See the list of installed packages included in the attachement in the first post of this thread.

    There might be packages which can do this. It's possible to install them yourself after you've installed HeadStart or have followed another tutorial to get your asus up and running the ipkg package system.

    HTH

  12. #12
    Join Date
    Sep 2007
    Location
    Canada
    Posts
    15

    Hi back and sorry...

    ...for not visiting this forum more often... It's still The forum that got me into buying this router and attempting to modify it...

    Actually I thought about trying OpenWrt when I realized that Oleg's firmware is not working for me and to my surprise I've had more luck with OpenWrt.

    I am running WhiteRussian v0.9 with X-Wrt extensions.
    I managed to successfully set up Samba
    The interface looks nice and it has lots of settings (some of which I don't even touch)
    Anyways, I'll post some screenshots, just in case you don't know what it looks like...
    But thanks for the effort...
    Attached Images Attached Images    

  13. #13
    I'm trying to install HeadStart, but the download links aren't working. It seems that the files were deleted or something. Can someone help me?

    Thanks in advance

  14. #14

  15. #15
    Hi Raas,

    The links are working now. Must have been some temporary problem with the servers. Downloading them now.

    Thank you

Page 1 of 2 12 LastLast

Similar Threads

  1. Alle Howto's, all howto's
    By newbiefan in forum German Discussion - Deutsch (DE)
    Replies: 17
    Last Post: 29-03-2013, 14:57
  2. [Howto] Install hddtemp
    By Denmike in forum WL-500gP Tutorials
    Replies: 11
    Last Post: 26-02-2012, 07:46
  3. Compiling [need HowTo]
    By FilimoniC in forum WL-500g Q&A
    Replies: 20
    Last Post: 16-05-2011, 22:40
  4. HowTo: Use Palm as 500gP LCD
    By Tamadite in forum WL-500gP Tutorials
    Replies: 1
    Last Post: 08-02-2009, 22:18
  5. [HOWTO] WL-HDD + Dbox2
    By akbor in forum German Discussion - Deutsch (DE)
    Replies: 14
    Last Post: 07-02-2008, 21:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •