AstLinux Users Guide Chapter 2

Image


20 January 2010
Astlinux has now reached version 0.7. These voip-info.org pages are therefore extremely out-of-date. Please refer to the official Astlinux site:

http://www.astlinux.org/

Configuring AstLinux



Viewed 44086 times since 27 Aug 07


Logging In


Access your computer console via the appropriate mechanism (e.g. a screen and keyboard for a standard PC or via a serial terminal emulator for a single board computer (SBC). You will be prompted to login with username root and passowrd astlinux. You'll see something like:

<snip>
Starting sshd...
Starting inetd...
Starting Asterisk...
Starting mini_httpd...
Starting mini_httpd (HTTP only)...

This is pbx (Linux i586 2.6.16.12) 00:34:35
pbx login: root
Password: (default is "astlinux")
pbx ~ #

So far, so good. Let's continue on to configure the keydisk.


Configuring your Keydisk


AstLinux has a concept it calls keydisk. A keydisk is a place you store all configuration information and all temporary files like voicemails, emails etc. Using a keydisk has the following advantages:

  • the boot disk image is not written to. This prolongs the life of a CF card and allows a CD-ROM to be used
  • you can experiment with different configurations by having multiple keydisks
  • you can easily backup your conifguration onto a separate keydisk

By default, a keydisk is assumed to be a USB flash drive. However it could also be a hard disk (either external via USB or internal) or even an NFS share or similar. This section assumes a USB drive. See elsewhere in this guide for other alternatives - still to come

The optimal size of a keydisk varries depending on what you intend to do with your system. Contrary to popular belief, voicemail is not the biggest concern for storage on an AstLinux system. Phone firmware is!

If you plan on supporting SIP phones (and hosting firmware updates for them), plan on needing at least 128Mb for phone firmare, voicemail etc.

The minimum size required for a keydisk is only a few megabytes. Size depending on need.

note: if you are using the vmware/vmplayer version of astlinux, a 'keydisk" is included as part of the image and should be mounted as /mnt/keydisk and contain all of the approprate files.

Before you can store settings on your keydisk, it has to be formatted. The genkd script will take care of partioning, formatting, and copying the AstLinux config files onto your USB keydisk. Do this with the following steps:

  • Insert your USB keydisk into a USB connector. You should see some weird SCSI disk stuff scroll by on the console that looks something like this (on a Soekris 4801 anyway):

usb 1-1: new full speed USB device using ohci_hcd and address 2
usb 1-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: LEXAR Model: DIGITAL FILM Rev: /W1.
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
sda:<7>usb-storage: queuecommand called
sda1
sd 0:0:0:0: Attached scsi removable disk sda

  • press enter a few times to see your prompt again

THE NEXT STEP WILL DESTROY ANYTHING THAT IS ON YOUR USB FLASH DRIVE. YES I SAID DESTROY! BACK IT UP!

  • Type genkd again with no quotes. Follow along as shown below:

pbx ~ # genkd
Segmentation fault
This script will help to create a KeyDrive to store
your AstLinux configuration. MAKE SURE THAT YOUR DRIVE IS
CONNECTED.

I will use /dev/sda1
Please type yes to continue

Is this okay? yes
Creating partition...
Partitioning failed. You are on your own.
Filesystem created. Copying existing configuration...
cp: /stat/etc/wanpipe: No such file or directory
Done. I STRONGLY URGE YOU TO REBOOT NOW.
Type reboot to cleanly restart now.
pbx ~ #

  • Reboot. I SAID REBOOT!

0.4.3: although several error messages appear in the above (segfault, partitioning failed and cp), this keydrive was created succesfully.

  • Reboot. I SAID REBOOT!

When you reboot all of the init scripts will see what files are on the keydisk. If they are there, their respective software packages will use the keydisk. If not, they will use the AstLinux defaults. This applies to all of the software packages that I could see people wanting to configure often, as well as anything that needed to be written to non-volatile memory like voicemail, etc. This is all accomplished by using symlinks, and using them often. Please keep this in mind before you start manually moving files around and overwriting those symlinks. They are dearly important!


Starting the Web Interface


After your machine is connected to a network, you can access the HTTPS (web) interface for AstLinux. To do this, start a browser from another machine on the network and use an url that points at the AstLinux machine. For example, if your AstLinux machine is at location 10.12.42.218, you would use the url

https://10.12.42.218

You will need to provide the default login information with user admin and password astlinux. You should see some warning messages about the certificate not being trusted, not matching the site, having an IP address of 0.0.0.0, etc. That's okay. We know who the machine is. We just want to make sure that the session is encrypted. That's what this certificate accomplishes.

If everything worked right, you will see a screen similar to this:

Image


Note that if you forget to specify the trailing 's' on the 'http', you will get this screen which is not what you want:

Image


If you don't know the IP of your machine you can find out what it is by logging into the console (described in the section above) and entering the command

pbx ~ # ifconfig | grep "inet addr"

inet addr:10.0.0.100 Bcast:10.0.0.255 Mask:255.255.255.0
inet addr:127.0.0.1 Mask:255.0.0.0

The first IP address, "10.0.0.100", is what you're interested in. Ignore any address of "127.0.0.1". That is for the loopback interface.

Use this address in your browser and it should work. If you have more than one interface to choose from with an address, try them both. It can't hurt!

Continue: AstLinux Users Guide Chapter 3
Image


20 January 2010
Astlinux has now reached version 0.7. These voip-info.org pages are therefore extremely out-of-date. Please refer to the official Astlinux site:

http://www.astlinux.org/

Configuring AstLinux



Viewed 44086 times since 27 Aug 07


Logging In


Access your computer console via the appropriate mechanism (e.g. a screen and keyboard for a standard PC or via a serial terminal emulator for a single board computer (SBC). You will be prompted to login with username root and passowrd astlinux. You'll see something like:

<snip>
Starting sshd...
Starting inetd...
Starting Asterisk...
Starting mini_httpd...
Starting mini_httpd (HTTP only)...

This is pbx (Linux i586 2.6.16.12) 00:34:35
pbx login: root
Password: (default is "astlinux")
pbx ~ #

So far, so good. Let's continue on to configure the keydisk.


Configuring your Keydisk


AstLinux has a concept it calls keydisk. A keydisk is a place you store all configuration information and all temporary files like voicemails, emails etc. Using a keydisk has the following advantages:

  • the boot disk image is not written to. This prolongs the life of a CF card and allows a CD-ROM to be used
  • you can experiment with different configurations by having multiple keydisks
  • you can easily backup your conifguration onto a separate keydisk

By default, a keydisk is assumed to be a USB flash drive. However it could also be a hard disk (either external via USB or internal) or even an NFS share or similar. This section assumes a USB drive. See elsewhere in this guide for other alternatives - still to come

The optimal size of a keydisk varries depending on what you intend to do with your system. Contrary to popular belief, voicemail is not the biggest concern for storage on an AstLinux system. Phone firmware is!

If you plan on supporting SIP phones (and hosting firmware updates for them), plan on needing at least 128Mb for phone firmare, voicemail etc.

The minimum size required for a keydisk is only a few megabytes. Size depending on need.

note: if you are using the vmware/vmplayer version of astlinux, a 'keydisk" is included as part of the image and should be mounted as /mnt/keydisk and contain all of the approprate files.

Before you can store settings on your keydisk, it has to be formatted. The genkd script will take care of partioning, formatting, and copying the AstLinux config files onto your USB keydisk. Do this with the following steps:

  • Insert your USB keydisk into a USB connector. You should see some weird SCSI disk stuff scroll by on the console that looks something like this (on a Soekris 4801 anyway):

usb 1-1: new full speed USB device using ohci_hcd and address 2
usb 1-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: LEXAR Model: DIGITAL FILM Rev: /W1.
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
sda:<7>usb-storage: queuecommand called
sda1
sd 0:0:0:0: Attached scsi removable disk sda

  • press enter a few times to see your prompt again

THE NEXT STEP WILL DESTROY ANYTHING THAT IS ON YOUR USB FLASH DRIVE. YES I SAID DESTROY! BACK IT UP!

  • Type genkd again with no quotes. Follow along as shown below:

pbx ~ # genkd
Segmentation fault
This script will help to create a KeyDrive to store
your AstLinux configuration. MAKE SURE THAT YOUR DRIVE IS
CONNECTED.

I will use /dev/sda1
Please type yes to continue

Is this okay? yes
Creating partition...
Partitioning failed. You are on your own.
Filesystem created. Copying existing configuration...
cp: /stat/etc/wanpipe: No such file or directory
Done. I STRONGLY URGE YOU TO REBOOT NOW.
Type reboot to cleanly restart now.
pbx ~ #

  • Reboot. I SAID REBOOT!

0.4.3: although several error messages appear in the above (segfault, partitioning failed and cp), this keydrive was created succesfully.

  • Reboot. I SAID REBOOT!

When you reboot all of the init scripts will see what files are on the keydisk. If they are there, their respective software packages will use the keydisk. If not, they will use the AstLinux defaults. This applies to all of the software packages that I could see people wanting to configure often, as well as anything that needed to be written to non-volatile memory like voicemail, etc. This is all accomplished by using symlinks, and using them often. Please keep this in mind before you start manually moving files around and overwriting those symlinks. They are dearly important!


Starting the Web Interface


After your machine is connected to a network, you can access the HTTPS (web) interface for AstLinux. To do this, start a browser from another machine on the network and use an url that points at the AstLinux machine. For example, if your AstLinux machine is at location 10.12.42.218, you would use the url

https://10.12.42.218

You will need to provide the default login information with user admin and password astlinux. You should see some warning messages about the certificate not being trusted, not matching the site, having an IP address of 0.0.0.0, etc. That's okay. We know who the machine is. We just want to make sure that the session is encrypted. That's what this certificate accomplishes.

If everything worked right, you will see a screen similar to this:

Image


Note that if you forget to specify the trailing 's' on the 'http', you will get this screen which is not what you want:

Image


If you don't know the IP of your machine you can find out what it is by logging into the console (described in the section above) and entering the command

pbx ~ # ifconfig | grep "inet addr"

inet addr:10.0.0.100 Bcast:10.0.0.255 Mask:255.255.255.0
inet addr:127.0.0.1 Mask:255.0.0.0

The first IP address, "10.0.0.100", is what you're interested in. Ignore any address of "127.0.0.1". That is for the loopback interface.

Use this address in your browser and it should work. If you have more than one interface to choose from with an address, try them both. It can't hurt!

Continue: AstLinux Users Guide Chapter 3
Created by: mikemee, Last modification: Wed 20 of Jan, 2010 (17:34 UTC) by tomchadwin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+
Page Changes | Comments