This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ASG 7.502 on Toshiba Magnia SG30

I know, I know, this little box hasn't seen any love here in quite a few years, 3 since the last post about a SG20 as far as I saw in my searches.

That being said, it's still a perfect box for running ASG and replacing a standard router for a little more speed and control.  I actually have a couple of these servers and wanted to re-purpose them from their original Red-Hat installs.  For those not familiar with the box, it's a small headless server that was made for SOHO environments as a "all in one" box.  The headless part makes installing an OS on it challenging, and more so because I do not have the 8 pin serial cable for it's console access.

I took a look at shorewall on an Ubuntu 9.10 install and IPCop that was tailored for the SG series and wasn't super impressed with either.  Came across ASG and decided to take a deeper look into what was needed to get it working on my SG30.  Turns out, not much at all needs to be done...

The original install was done on a netbook using a USB to IDE adapter and a USB cd-rom, tried to keep it generic and simple so I wouldn't have any problems.  After I installed it, it took a little tweak in one file to make it boot & become accessible from the WebGUI:

/etc/modules.conf (Modified):

alias eth0 8139too
alias eth1 e100


This was added so that the shutdown command actually powers the box off completely;

/etc/rc.d/rc0.d/S10halt (Modified): (Lines besides those between double remarks are for finding location of addition)
fi


##Added for Toshiba SG LCD panel shutdown
echo -e "\033X"  > /dev/ttyS0
echo -ne "\033"  > /dev/ttyS0
echo -ne "8q"  > /dev/ttyS0
##End of add for Toshiba SG LCD
exec /sbin/halt -i -d -p -f >/dev/null 2>&1 &

# for more safety:
exit 1


Then to keep the LCD clean, I created the following files;

/etc/rc.d/sglcd_startup (Added): (Symbolic link from /etc/rc.d/rc3.d/S00sglcd_startup)
echo -ne "\033X" > /dev/ttyS0

echo -n "   Booting...   " > /dev/ttyS0


/etc/rc.d/sglcd_booted (Added): (Symbolic link from /etc/rc.d/rc3.d/S99sglcd_booted)
sleep 20

echo -ne "\033X" > /dev/ttyS0
echo -n "Astaro  Home Use" > /dev/ttyS0
echo -ne "\nSecurity Gateway" > /dev/ttyS0
sleep 5
echo -ne "\033X" > /dev/ttyS0
echo -n "Astaro  Home Use" > /dev/ttyS0
echo -ne "\nSecurity Gateway" > /dev/ttyS0
sleep 5
echo -ne "\033X" > /dev/ttyS0
echo -n "Astaro  Home Use" > /dev/ttyS0
echo -ne "\nSecurity Gateway" > /dev/ttyS0
sleep 5
echo -ne "\033X" > /dev/ttyS0
echo -n "Astaro  Home Use" > /dev/ttyS0
echo -ne "\nSecurity Gateway" > /dev/ttyS0
sleep 5
echo -ne "\033X" > /dev/ttyS0
echo -n "Astaro  Home Use" > /dev/ttyS0
echo -ne "\nSecurity Gateway" > /dev/ttyS0
sleep 20
echo -ne "\033X" > /dev/ttyS0
echo -n "Astaro  Home Use" > /dev/ttyS0
echo -ne "\nSecurity Gateway" > /dev/ttyS0


/etc/rc.d/sglcd_shutdown (Added): (Symbolic link from /etc/rc.d/rc0.d/S00sglcd_shutdown)
echo -ne "\033X" > /dev/ttyS0

echo -ne "Shutting Down...\n" > /dev/ttyS0


/etc/rc.d/sglcd_restart (Added): (Symbolic link from /etc/rc.d/rc6.d/S00sglcd_restart)
echo -ne "\033X" > /dev/ttyS0

echo -n "  Restarting... " > /dev/ttyS0


The "booted" script has a few sleep commands and then sends the same info to the LCD panel a few times.  Reason for this in the booting process it looks like a program is probing the serial ports and it causes strings of junk to appear.  With the sleep commands, you will get some junk, but it will be gone in a few seconds.  Otherwise these are just for aesthetics only, this way I can at least visibly see when it's booting, restarting, or powering off.

One other thing I did do was modify the menu.lst file for startup so that the console will be redirected to the back serial port. (Just in case I do ever order up the cable or if others need it) Here's the changes I made to it:
# To enable serial console please uncomment the following two lines.

# You may also want to add a line like 'console=ttyS0,38400' to the
# 'kernel' lines below
serial --unit=1 --speed=115200
terminal --timeout=0 serial

title  Astaro Security Gateway V7
root (hd0,0)
kernel /boot/vmlinuz root=/dev/disk/by-label/root vga=normal video=ofonly nosmp noapic acpi=off splash=silent console=ttyS1,115200
initrd /boot/initrd

title  Astaro Security Gateway V7 (previous)
root (hd0,0)
kernel /boot/vmlinuz.previous root=/dev/disk/by-label/root vga=normal video=ofonly nosmp noapic acpi=off splash=silent console=ttyS1,115200
initrd /boot/initrd.previous

title  Astaro Security Gateway V7 (rescue)
root (hd0,0)
kernel /boot/vmlinuz root=/dev/disk/by-label/root vga=normal video=ofonly nosmp nolapic noapic acpi=off splash=silent console=ttyS1,115200
initrd /boot/initrd


To make sure I have an easy way to recover this system I made a disk image of it using dd.  The image is only 1.4GB and restores to the HDD quickly, also if others would like to load it on their SG30, it has minimal modifications to the original install and shouldn't cause a problem with updates and such. Also, the  In the future I'll probably be tweaking the LCD files and possibly adding some backup routines for mirroring the HDD.

I would be willing to share my HDD image with anyone here that would like it, but I won't post any links in here unless the moderators and such around here give me the green flag to do so.  The image itself is of the system IMMEDIATELY after the initial install and before the system has rebooted after that.  I basically found the files I needed to change, did another fresh install and modified the files I listed above to have a good baseline to work from. Basically as it would have been installed locally on the machine instead of a netbook, with as little modifications as possible to have a clean appearing machine.

So mods, is it a violation of any rules to share such an image?  Just want to make sure...

Also of note, the system is nice and responsive, and although I haven't loaded it yet and am still getting familiar with everything, I think it will be just fine for my 30MB cable connection.  Idle CPU is around 2-4% and uses 50-60% of memory after bootup, not too bad.  I did install the 7.503 and the 7.504 updates with no troubles, took less then 5 minutes to install and start the reboot for 7.504.  

Anyone else still using these things? [:$]

Ohhh, and this is my first post.. Be gentle... [:D]


This thread was automatically locked due to age.
  • send me a pm with the link please.  I have one of these in my closet begging for a use..[:)]

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • Hi,
    I'm not a lawyer, but reading the license, it looks like posting a link to download a 'derived work' probably isn't a good idea, unless someone from Astaro grants permission.

    Barry
  • Hi,
    I'm not a lawyer, but reading the license, it looks like posting a link to download a 'derived work' probably isn't a good idea, unless someone from Astaro grants permission.

    Barry


    Correct!  That's why I was asking the mods permission before I just post it up here.  My reasoning on it being "ok" to do so is that the install that I have, isn't past the point where you've agreed to the end user license agreement.  Actually, when you first start up the image I have, it asks you to input your name, location, password, and agree to the end user agreement to proceed. 

    One little glitch seems that it asks for the license file right after that, then you need to restart the web session and input the same license file a second time during the setup wizard portion.  Not really a big deal, but something I noticed.
  • i'll give it a whirl..[[:)]]  Just have to dig it out of my closet tomorrow..[[:)]]

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • Curious if it worked out okay for you!  I got a chance to put it through the paces and compare it to my D-Link DGL-4100 this weekend.

    Granted I am not using many of the advanced features, but wanted to see if the horsepower of the box was enough to keep up with my old 4100 with the speed connection I've got.  Looks like it did just fine as I could see no real difference between the two as far as bandwidth goes, and pings were respectable as well.  Took a small hit in pings with one server, but it could have been the other network segment I was put on with the MAC address change.

    I'll get a chance to test it out more as I turn on and start using more of the features, but for now it's looking good!  Pulling 2500K/s through it creates about a 20-30% CPU load, compared to 15-20% for an idle connection.

    If anyone cares, here's the results from my tests:
    DGL-4100: 25.788 Down Avg. - 5.876 Up Avg.
    
    ---------------------------------------------
    www.speedtest.net/.../748971201.png
    20.56 Down - 4.02 Up

    www.speedtest.net/.../748971474.png
    27.16 Down - 6.00 Up

    www.speedtest.net/.../748971709.png
    21.87 Down - 6.85 Up

    www.speedtest.net/.../748971963.png
    31.56 Down - 5.42 Up

    www.speedtest.net/.../748972228.png
    27.79 Down - 7.09 Up

    SG30: 24.124 Down Avg. - 6.646 Up Avg.
    ---------------------------------------------
    www.speedtest.net/.../748991413.png
    28.11 Down - 6.17 Up

    www.speedtest.net/.../748991623.png
    18.70 Down - 7.54 Up

    www.speedtest.net/.../748991849.png
    26.84 Down - 5.58 Up

    www.speedtest.net/.../748992046.png
    27.11 Down - 7.28 Up

    www.speedtest.net/.../748992251.png
    19.86 Down - 6.66 Up


    And one server my connection really liked: (Different server used then above, and was done on the SG30)
    http://www.speedtest.net/result/749114906.png
    33.56 Down - 8.35 Up


    I know the 4100 is nowhere near being a current device, but in it's day it was a great router and one of the fastest consumer level routers available.  I figured it was a fair test to pit it against the SG30 seeing as they're from the same "era" of machines.  I didn't want to lose speed when moving to this solution, so I'm glad that doesn't seem to be a trade off.
  • I haven't had the time yet but i'm going to..[:)]

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • Good deal!  I'm just hoping some others out there can get some use out of these boxes that have probably been retired due to outdated software.  From what I've seen in this experience, they still have more then enough power for home use and probably even small businesses use provided the wan connection isn't much over T3 speeds. Granted, I haven't enabled all the features yet, but using it for incoming L2TP connections and some caching doesn't seem to create much load on the system at all.  I am using a 5400 RPM HDD, so if you're still using a 4200 it may not be as fast with the cache.  Over the last few days of heavy testing I haven't seen more then 30% cpu usage and normally around 40% memory usage, pretty respectable for a box that's 7 years old.

    I really didn't need the fancy display on the SG, but I did want the ability to shut it down from the front control panel so I decided to try the same trick I did in Ubuntu and install the LCD files from the original SG30 3.0.1 software. There's really only two RPMs that need to be installed to get the LCD app up and working. They are:

    compat-libstdc++-7.3-2.96.110.i386.rpm
    lcdkbdMW-2.4.2-1.i386.rpm

    Libstdc installs with no problems, but lcdkbdMW kind of bungles on the install and looks like it failed. It does install and work fine, but the messages from RPM are because this is a SuSE based distro, not Debian like RedHat. (Mainly it's the absence of chkconfig that makes the scripts in the RPM fail)

    Anyway, after getting the app installed, it starts right up and displays the time and date on the display with no problem. I can also initiate the shutdown script from the front panel. The shutdown script can/needs be modified to shutdown the system properly, located at: "/sa2/bin/shutdown".

    So I'm still tweaking on it and currently have it doing some nice things like showing more of the boot process and not starting the LCD app until it can ping my gateway.  This way I start the app after the junk has appeared on screen, that junk also seems to kill one of the lcdkbd threads so it needs to be started after that happens.  Shutdown works perfectly now and calls the /etc/init.d/halt script as that looks to be the proper way to do it from cli.  I'm also looking at other uses for the power button such as displaying load and bandwidth for a few seconds or adding this into the message queue by some means.  Ohh yeah, and message queuing using setlcdq works great, so I can have other items display something from other scripts and either have them queued for viewing or just displayed as a pop up of sorts.

    I'll post what scripts I've modified and such when I've got it finalized and working as I would like.
  • I know, I know, this little box hasn't seen any love here in quite a few years, 3 since the last post about a SG20 as far as I saw in my searches.

    That being said, it's still a perfect box for running ASG and replacing a standard router for a little more speed and control.  I actually have a couple of these servers and wanted to re-purpose them from their original Red-Hat installs.  For those not familiar with the box, it's a small headless server that was made for SOHO environments as a "all in one" box.  The headless part makes installing an OS on it challenging, and more so because I do not have the 8 pin serial cable for it's console access.

    I took a look at shorewall on an Ubuntu 9.10 install and IPCop that was tailored for the SG series and wasn't super impressed with either.  Came across ASG and decided to take a deeper look into what was needed to get it working on my SG30.  Turns out, not much at all needs to be done...

    The original install was done on a netbook using a USB to IDE adapter and a USB cd-rom, tried to keep it generic and simple so I wouldn't have any problems.  After I installed it, it took a little tweak in one file to make it boot & become accessible from the WebGUI:

    /etc/modules.conf (Modified):

    alias eth0 8139too
    alias eth1 e100
    This was added so that the shutdown command actually powers the box off completely;

    /etc/rc.d/rc0.d/S10halt (Modified): (Lines besides those between double remarks are for finding location of addition)
    fi

    ##Added for Toshiba SG LCD panel shutdown
    echo -e "\033X"  > /dev/ttyS0
    echo -ne "\033"  > /dev/ttyS0
    echo -ne "8q"  > /dev/ttyS0
    ##End of add for Toshiba SG LCD
    exec /sbin/halt -i -d -p -f >/dev/null 2>&1 &

    # for more safety:
    exit 1
    Then to keep the LCD clean, I created the following files;

    /etc/rc.d/sglcd_startup (Added): (Symbolic link from /etc/rc.d/rc3.d/S00sglcd_startup)
    echo -ne "\033X" > /dev/ttyS0
    echo -n "   Booting...   " > /dev/ttyS0
    /etc/rc.d/sglcd_booted (Added): (Symbolic link from /etc/rc.d/rc3.d/S99sglcd_booted)
    sleep 20
    echo -ne "\033X" > /dev/ttyS0
    echo -n "Astaro  Home Use" > /dev/ttyS0
    echo -ne "\nSecurity Gateway" > /dev/ttyS0
    sleep 5
    echo -ne "\033X" > /dev/ttyS0
    echo -n "Astaro  Home Use" > /dev/ttyS0
    echo -ne "\nSecurity Gateway" > /dev/ttyS0
    sleep 5
    echo -ne "\033X" > /dev/ttyS0
    echo -n "Astaro  Home Use" > /dev/ttyS0
    echo -ne "\nSecurity Gateway" > /dev/ttyS0
    sleep 5
    echo -ne "\033X" > /dev/ttyS0
    echo -n "Astaro  Home Use" > /dev/ttyS0
    echo -ne "\nSecurity Gateway" > /dev/ttyS0
    sleep 5
    echo -ne "\033X" > /dev/ttyS0
    echo -n "Astaro  Home Use" > /dev/ttyS0
    echo -ne "\nSecurity Gateway" > /dev/ttyS0
    sleep 20
    echo -ne "\033X" > /dev/ttyS0
    echo -n "Astaro  Home Use" > /dev/ttyS0
    echo -ne "\nSecurity Gateway" > /dev/ttyS0
    /etc/rc.d/sglcd_shutdown (Added): (Symbolic link from /etc/rc.d/rc0.d/S00sglcd_shutdown)
    echo -ne "\033X" > /dev/ttyS0
    echo -ne "Shutting Down...\n" > /dev/ttyS0
    /etc/rc.d/sglcd_restart (Added): (Symbolic link from /etc/rc.d/rc6.d/S00sglcd_restart)
    echo -ne "\033X" > /dev/ttyS0
    echo -n "  Restarting... " > /dev/ttyS0
    The "booted" script has a few sleep commands and then sends the same info to the LCD panel a few times.  Reason for this in the booting process it looks like a program is probing the serial ports and it causes strings of junk to appear.  With the sleep commands, you will get some junk, but it will be gone in a few seconds.  Otherwise these are just for aesthetics only, this way I can at least visibly see when it's booting, restarting, or powering off.

    One other thing I did do was modify the menu.lst file for startup so that the console will be redirected to the back serial port. (Just in case I do ever order up the cable or if others need it) Here's the changes I made to it:
    # To enable serial console please uncomment the following two lines.
    # You may also want to add a line like 'console=ttyS0,38400' to the
    # 'kernel' lines below
    serial --unit=1 --speed=115200
    terminal --timeout=0 serial

    title  Astaro Security Gateway V7
    root (hd0,0)
    kernel /boot/vmlinuz root=/dev/disk/by-label/root vga=normal video=ofonly nosmp noapic acpi=off splash=silent console=ttyS1,115200
    initrd /boot/initrd

    title  Astaro Security Gateway V7 (previous)
    root (hd0,0)
    kernel /boot/vmlinuz.previous root=/dev/disk/by-label/root vga=normal video=ofonly nosmp noapic acpi=off splash=silent console=ttyS1,115200
    initrd /boot/initrd.previous

    title  Astaro Security Gateway V7 (rescue)
    root (hd0,0)
    kernel /boot/vmlinuz root=/dev/disk/by-label/root vga=normal video=ofonly nosmp nolapic noapic acpi=off splash=silent console=ttyS1,115200
    initrd /boot/initrd
    To make sure I have an easy way to recover this system I made a disk image of it using dd.  The image is only 1.4GB and restores to the HDD quickly, also if others would like to load it on their SG30, it has minimal modifications to the original install and shouldn't cause a problem with updates and such. Also, the  In the future I'll probably be tweaking the LCD files and possibly adding some backup routines for mirroring the HDD.

    I would be willing to share my HDD image with anyone here that would like it, but I won't post any links in here unless the moderators and such around here give me the green flag to do so.  The image itself is of the system IMMEDIATELY after the initial install and before the system has rebooted after that.  I basically found the files I needed to change, did another fresh install and modified the files I listed above to have a good baseline to work from. Basically as it would have been installed locally on the machine instead of a netbook, with as little modifications as possible to have a clean appearing machine.

    So mods, is it a violation of any rules to share such an image?  Just want to make sure...

    Also of note, the system is nice and responsive, and although I haven't loaded it yet and am still getting familiar with everything, I think it will be just fine for my 30MB cable connection.  Idle CPU is around 2-4% and uses 50-60% of memory after bootup, not too bad.  I did install the 7.503 and the 7.504 updates with no troubles, took less then 5 minutes to install and start the reboot for 7.504.  

    Anyone else still using these things? [:$]

    Ohhh, and this is my first post.. Be gentle... [:D]


    HOw exactly do you get this installed onto the magnia without being able to see what is going on?

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • I built the install on my netbook, after I had a base system installed that I could access via the network, I made a disk image of it using dd.  Basically just booted up Ubuntu on the netbook and made an exact image of the HDD that had the Astaro image that brought up the network interfaces.  Using that disk image as a fall back, I can restore it to the HDD and just place it in the SG30 and finish the rest via the WebGUI, turn on SSH, and it's set to go.

    Moral of the story for you, you need to take a disk image and restore it onto the HDD for the SG30 on a different linux box. [:)]
  • I wonder if clonezilla can handle this..[:)]

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

    PfSense w/Suricata, ntopng, 

    Other addons to follow