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.
Parents
  • And the last of it:

    [   10.071745] 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)
    [   11.690161] ppdev: user-space parallel port driver
                                                                         done
    Activating swap-devices in /etc/fstab...
    [   11.926217] Adding 1052248k swap on /dev/sda2.  Priority:-1 extents:1 across:1052248k                                                             done
    Setting kernel variables ( sysctl.conf kernel.conf network.conf )    done
    Checking file systems...
    fsck from util-linux-ng 2.16
    Checking all file systems.
    [/sbin/fsck.ext3 (1) -- /boot] fsck.ext3 -a /dev/sda1
    boot: clean, 38/90360 files, 29338/361428 blocks
    [/sbin/fsck.ext3 (1) -- /opt/inst] fsck.ext3 -a /dev/sda3
    inst: clean, 500/65808 files, 117305/263064 blocks
    [/sbin/fsck.ext3 (1) -- /var/storage] fsck.ext3 -a /dev/sda5
    storage: clean, 1811/3197152 files, 297202/3196927 blocks
    [/sbin/fsck.ext3 (1) -- /var/log] fsck.ext3 -a /dev/sda7
    log: clean, 23/4198176 files, 306771/4196973 blocks
    [/sbin/fsck.ext3 (1) -- /tmp] fsck.ext3 -a /dev/sda8
    [   14.999397] scsi 2:0:0:0: CD-ROM            IOMEGA   CDRW38402EXT2-B  UOS1 PQ: 0 ANSI: 0
    [   15.008982] scsi 2:0:0:0: Attached scsi generic sg1 type 5
    [   15.128866] sr0: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda pop-up
    [   15.136395] Uniform CD-ROM driver Revision: 3.20
    tmp: clean, 17/68832 files, 12877/275105 blocks                      done
    Mounting local file systems...
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    debugfs on /sys/kernel/debug type debugfs (rw)
    [   15.209685] loop: module loaded
    tmpfs on /dev type tmpfs (rw,mode=0755)
    tmpfs on /dev/shm type tmpfs (rw,mode=1777)
    devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
    [   15.589001] sr0: CDROM not ready yet.
    [   15.657754] kjournald starting.  Commit interval 5 seconds
    [   15.663557] EXT3-fs: mounted filesystem with ordered data mode.
    /dev/sda1 on /boot type ext3 (ro,noatime,data=ordered)
    [   15.710256] kjournald starting.  Commit interval 5 seconds
    [   15.716342] EXT3 FS on sda5, internal journal
    [   15.720990] EXT3-fs: mounted filesystem with ordered data mode.
    /dev/sda5 on /var/storage type ext3 (rw,noatime,data=ordered)
    [   15.793969] kjournald starting.  Commit interval 5 seconds
    [   15.800048] EXT3 FS on sda7, internal journal
    [   15.804681] EXT3-fs: mounted filesystem with ordered data mode.
    /dev/sda7 on /var/log type ext3 (rw,noatime,data=ordered)
    [   15.927045] kjournald starting.  Commit interval 5 seconds
    [   15.942473] EXT3 FS on sda8, internal journal
    [   15.947113] EXT3-fs: mounted filesystem with ordered data mode.
    /dev/sda8 on /tmp type ext3 (rw,noatime,data=ordered)                done
    System Boot Control: The system has been                             set up
    System Boot Control: Running /etc/init.d/boot.local
    :: Activating Swap Space                                             done
    :: rebuild ld.so.cache                                               done
    :: Clean up temporary files and directories                          done
    INIT: Entering runlevel: 3
    Master Resource Control: previous runlevel: N, switching to runlevel:3
    :: Starting Initial Configuration                                    done
    :: Starting Logging                                                  done
    :: Loading ACPI modules ( button )                                   done
    :: Starting acpid                                                    done
    :: Starting D-Bus daemon                                             done
    :: Starting IP packet filter                                         done
    :: setting up chroots
       chroot: afc                                                       done
       chroot: bind                                                      done
       chroot: dhcpc                                                     done
       chroot: dhcps                                                     done
       chroot: ftp                                                       done
       chroot: ha_proxy                                                  done
       chroot: http                                                      done
       chroot: httpd                                                     done
       chroot: ident                                                     done
       chroot: ipsec                                                     done
       chroot: ntp                                                       done
       chroot: openvpn                                                   done
       chroot: pop3                                                      done
       chroot: ppp                                                       done
       chroot: pppoe                                                     done
       chroot: pptp                                                      done
       chroot: pptpc                                                     done
       chroot: quagga                                                    done
       chroot: reverseproxy                                              done
       chroot: smtp                                                      done
       chroot: snmp                                                      done
       chroot: snort                                                     done
       chroot: socks                                                     done
       chroot: xorp                                                      done
    :: Loading CPUFreq modules (CPUFreq not supported)
    :: Starting HAL daemon                                               done
    :: Starting NIC Initialization                                       done
    :: Starting Configuration daemon                                     done
    :: Starting Sysmon daemon                                            done
    :: Starting Console Support                                          done
    :: Starting Astaro User Authentication                               done
    :: Backup restore                                                    skipped
    :: Starting Notification daemon                                      done
    :: Starting WebAdmin                                                 done
    :: Starting Cron                                                     done
    :: Starting service at daemon                                        done
    :: Initializing the PostgreSQL database                              done
    :: Starting PostgreSQL                                               done
    no schema upgrades found
    :: Starting SSH   generate SSH (version 2) RSA host key              done
       generate SSH (version 2) DSA host key                             done
       generate SSH (version 2) DSA remote logfile key                   done
       starting SSH daemon                                               done
    :: Starting ulogd                                                    done
    :: Starting MiddleWare                                               done
    :: Starting Self Monitor NG                                          done
    :: Loading Toshiba Magnia SG processes...
    :: Starting Toshiba Magnia SG LCD application...
    :: All Toshiba Magnia SG processes loaded...
    Master Resource Control: runlevel 3 has been                         reached
    Skipped services in runlevel 3:                                  restore

                                                                                                                                                                                                                                                    
    X.X.X.X
    host.domain.example login:



    Not sure anyone wanted to see that, but it shows what the setup process goes through when installing. If anyone is curious how the hardware is detected and such, it's all in there...

    I'll be getting the ISO up on a site where people can grab it from, I'll post it up tomorrow with a new thread!
Reply
  • And the last of it:

    [   10.071745] 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)
    [   11.690161] ppdev: user-space parallel port driver
                                                                         done
    Activating swap-devices in /etc/fstab...
    [   11.926217] Adding 1052248k swap on /dev/sda2.  Priority:-1 extents:1 across:1052248k                                                             done
    Setting kernel variables ( sysctl.conf kernel.conf network.conf )    done
    Checking file systems...
    fsck from util-linux-ng 2.16
    Checking all file systems.
    [/sbin/fsck.ext3 (1) -- /boot] fsck.ext3 -a /dev/sda1
    boot: clean, 38/90360 files, 29338/361428 blocks
    [/sbin/fsck.ext3 (1) -- /opt/inst] fsck.ext3 -a /dev/sda3
    inst: clean, 500/65808 files, 117305/263064 blocks
    [/sbin/fsck.ext3 (1) -- /var/storage] fsck.ext3 -a /dev/sda5
    storage: clean, 1811/3197152 files, 297202/3196927 blocks
    [/sbin/fsck.ext3 (1) -- /var/log] fsck.ext3 -a /dev/sda7
    log: clean, 23/4198176 files, 306771/4196973 blocks
    [/sbin/fsck.ext3 (1) -- /tmp] fsck.ext3 -a /dev/sda8
    [   14.999397] scsi 2:0:0:0: CD-ROM            IOMEGA   CDRW38402EXT2-B  UOS1 PQ: 0 ANSI: 0
    [   15.008982] scsi 2:0:0:0: Attached scsi generic sg1 type 5
    [   15.128866] sr0: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda pop-up
    [   15.136395] Uniform CD-ROM driver Revision: 3.20
    tmp: clean, 17/68832 files, 12877/275105 blocks                      done
    Mounting local file systems...
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    debugfs on /sys/kernel/debug type debugfs (rw)
    [   15.209685] loop: module loaded
    tmpfs on /dev type tmpfs (rw,mode=0755)
    tmpfs on /dev/shm type tmpfs (rw,mode=1777)
    devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
    [   15.589001] sr0: CDROM not ready yet.
    [   15.657754] kjournald starting.  Commit interval 5 seconds
    [   15.663557] EXT3-fs: mounted filesystem with ordered data mode.
    /dev/sda1 on /boot type ext3 (ro,noatime,data=ordered)
    [   15.710256] kjournald starting.  Commit interval 5 seconds
    [   15.716342] EXT3 FS on sda5, internal journal
    [   15.720990] EXT3-fs: mounted filesystem with ordered data mode.
    /dev/sda5 on /var/storage type ext3 (rw,noatime,data=ordered)
    [   15.793969] kjournald starting.  Commit interval 5 seconds
    [   15.800048] EXT3 FS on sda7, internal journal
    [   15.804681] EXT3-fs: mounted filesystem with ordered data mode.
    /dev/sda7 on /var/log type ext3 (rw,noatime,data=ordered)
    [   15.927045] kjournald starting.  Commit interval 5 seconds
    [   15.942473] EXT3 FS on sda8, internal journal
    [   15.947113] EXT3-fs: mounted filesystem with ordered data mode.
    /dev/sda8 on /tmp type ext3 (rw,noatime,data=ordered)                done
    System Boot Control: The system has been                             set up
    System Boot Control: Running /etc/init.d/boot.local
    :: Activating Swap Space                                             done
    :: rebuild ld.so.cache                                               done
    :: Clean up temporary files and directories                          done
    INIT: Entering runlevel: 3
    Master Resource Control: previous runlevel: N, switching to runlevel:3
    :: Starting Initial Configuration                                    done
    :: Starting Logging                                                  done
    :: Loading ACPI modules ( button )                                   done
    :: Starting acpid                                                    done
    :: Starting D-Bus daemon                                             done
    :: Starting IP packet filter                                         done
    :: setting up chroots
       chroot: afc                                                       done
       chroot: bind                                                      done
       chroot: dhcpc                                                     done
       chroot: dhcps                                                     done
       chroot: ftp                                                       done
       chroot: ha_proxy                                                  done
       chroot: http                                                      done
       chroot: httpd                                                     done
       chroot: ident                                                     done
       chroot: ipsec                                                     done
       chroot: ntp                                                       done
       chroot: openvpn                                                   done
       chroot: pop3                                                      done
       chroot: ppp                                                       done
       chroot: pppoe                                                     done
       chroot: pptp                                                      done
       chroot: pptpc                                                     done
       chroot: quagga                                                    done
       chroot: reverseproxy                                              done
       chroot: smtp                                                      done
       chroot: snmp                                                      done
       chroot: snort                                                     done
       chroot: socks                                                     done
       chroot: xorp                                                      done
    :: Loading CPUFreq modules (CPUFreq not supported)
    :: Starting HAL daemon                                               done
    :: Starting NIC Initialization                                       done
    :: Starting Configuration daemon                                     done
    :: Starting Sysmon daemon                                            done
    :: Starting Console Support                                          done
    :: Starting Astaro User Authentication                               done
    :: Backup restore                                                    skipped
    :: Starting Notification daemon                                      done
    :: Starting WebAdmin                                                 done
    :: Starting Cron                                                     done
    :: Starting service at daemon                                        done
    :: Initializing the PostgreSQL database                              done
    :: Starting PostgreSQL                                               done
    no schema upgrades found
    :: Starting SSH   generate SSH (version 2) RSA host key              done
       generate SSH (version 2) DSA host key                             done
       generate SSH (version 2) DSA remote logfile key                   done
       starting SSH daemon                                               done
    :: Starting ulogd                                                    done
    :: Starting MiddleWare                                               done
    :: Starting Self Monitor NG                                          done
    :: Loading Toshiba Magnia SG processes...
    :: Starting Toshiba Magnia SG LCD application...
    :: All Toshiba Magnia SG processes loaded...
    Master Resource Control: runlevel 3 has been                         reached
    Skipped services in runlevel 3:                                  restore

                                                                                                                                                                                                                                                    
    X.X.X.X
    host.domain.example login:



    Not sure anyone wanted to see that, but it shows what the setup process goes through when installing. If anyone is curious how the hardware is detected and such, it's all in there...

    I'll be getting the ISO up on a site where people can grab it from, I'll post it up tomorrow with a new thread!
Children
No Data