AstLinux Users Guide Chapter 1


Viewed 48941 times since 27 Aug 07


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/

Chapter 1 - Installation



Choosing your platform

AstLinux can run on any standard PC. However it has a large following using small single board computers like the Soekris 4801, PCEngines Wrap as well as small footprint PCs like the VIA Epia boards. Accordingly, you'll find several images available at the AstLinux download site.

The following table shows which image suits which device for release 0.4.3:
Target PlatformImage Filename
old 586 based PCAstLinux-0.4.3-i586.img.gz
LiveCD (bootable CD-ROMAstLinux-0.4.3.iso
Soekris 4801AstLinux-0.4.3-net4801.img.gz
VIA CPU based (e.g. Epia)AstLinux-0.4.3-via.img.gz
VMWareAstLinux-0.4.3-VM.zip
PCEngines WrapAstLinux-0.4.3-wrap.img.gz



In the 0.4.3 release of AstLinux, the i586 and Via releases are identical. The 586 is good for use with older Pentium based machines. The Via release will grow to take advantage of some of the features of the VIA C3 and subsequent processors (which emulate Pentiums in a low power high speed chipset).


Compact Flash based systems


You will need a Compact Flash (CF) card that can hold at least 48MB. If you're purchasing a card as of August 06, you'll be lucky to find one less than 64MB, but larger is not a problem, so get any size more than 48MB that is convenient.

Much has been written about the pros and cons of various brand flash cards. As Sandisk was an early provider of CF cards, most devices have been tested with Sandisk CF cards and they are known to work well. The problems that arise tend to be around how the cards handle primary or secondary disk selection with symptoms shown as not being able to boot from a certain brand card, but working fine with other brands. The overall problem and its solution has as much to do with the provider of the Single Board Computer (SBC) that you are using, so if you have any doubts, contact the manufacturer for their recommendations.

Many people choose to use CF on a regular computer for reliability, convenience, low power or low noise. You can do this using a variety of IDE to CF adapters, either plugged directly into the IDE pins or accessible from a regular PC slot. One AstLinux user also suggests that if you need an IDE to CF adapter make sure it supports UDMA signalling. A lot of them don't. The standard consumer Sandisk (not industrial, not Ultra) CF I bought did not specify UDMA in the specs but in reality it actually supports the signalling, just not the mode. If your IDE to CF adapter does not support the signalling then it can cause complications. At least it did for me. Another user suggests using a "Disk on a Module" or DOM, but notes that these are generally much more expensive and perhaps not as convenient as switching CF cards.

Using Windows to Prepare the CF


If you are running Windows, you can use a utility from the m0n0wall project to read the compressed image and write it to a CF. You can do this as follows:

  1. Download the AstLinux image you need for your device
  2. Download the utility from http://m0n0.ch/wall/physdiskwrite.php
  3. Unzip physdiskwrite
  4. Go to a cmd prompt
  5. Enter the command (substitute the appropriate image filename):

physdiskwrite AstLinux-0.4.3-net4801.img.gz

Physdiskwrite will prompt you to choose the correct drive to write to. This is a good time to be paranoid. I first run the program with no CF installed, and then again with the CF. Then I can be sure I'm going to write to the correct card. For example, with no CF, my machine displays:

D:\bin>physdiskwrite AstLinux-0.4.3-net4801.img.gz

physdiskwrite v0.5.1 by Manuel Kasper <mk@neon1.net>

Searching for physical drives...

Information for \\.\PhysicalDrive0:
Windows: cyl: 19458
tpc: 255
spt: 63

Information for \\.\PhysicalDrive1:
DeviceIoControl() failed on \\.\PhysicalDrive1.

Information for \\.\PhysicalDrive2:
DeviceIoControl() failed on \\.\PhysicalDrive2.

Information for \\.\PhysicalDrive3:
DeviceIoControl() failed on \\.\PhysicalDrive3.

Information for \\.\PhysicalDrive4:
DeviceIoControl() failed on \\.\PhysicalDrive4.

Which disk do you want to write? (0..0) ^C

Use CTRL-C to exit physdiskwrite. Then insert the CF. My display changes to:

Information for \\.\PhysicalDrive0:
Windows: cyl: 19458
tpc: 255
spt: 63

Information for \\.\PhysicalDrive1:
DeviceIoControl() failed on \\.\PhysicalDrive1.

Information for \\.\PhysicalDrive2:
Windows: cyl: 7
tpc: 255
spt: 63

Information for \\.\PhysicalDrive3:
DeviceIoControl() failed on \\.\PhysicalDrive3.

Information for \\.\PhysicalDrive4:
DeviceIoControl() failed on \\.\PhysicalDrive4.

Drive 2 has changed now that it has a 64MB CF card inserted. Go ahead and enter the number for your drive (2 in this case), confirm the write with 'y' and you should see similar output to this:

Which disk do you want to write? (0..2) 2
About to overwrite the contents of disk 2 with new data. Proceed? (y/n) y
Found compressed image file
50061312/50061312 bytes written in total

Congratulations! Your CF is now ready to insall into your computer. You can skip ahead to Configuration

Using Linux to Prepare the CF


You'll need a computer that can write to the CF card. If you're using Linux, you're likely familiar with how to access your CF device. Also, don't worry about partitioning or formatting the CF card, the imaging process will take care of this.

Many newer linux distributions will automatically mount flash media once it's been inserted. You may have to unmount the media first before imaging. If you see the flash card mounted on the desktop GUI, try right clicking on the icon and selecting "umount". Alternately at the command prompt, try umount /dev/flashdevice

Unless you have SCSI drives in your system Linux will usually enumerate the CF card as /dev/sda or /dev/sdb. Assuming your CF device is at /dev/sda, you will issue the following command to write the downloaded image onto the CF: (su to root first, running this example with sudo will result in shell re-redirection problems)

  1. gunzip -c /path/to/astlinux.img.gz > /dev/sda

If you want to do the same thing from a non-root account using sudo, try this format

$ sudo sh -c "gunzip -c /path/to/astlinux.img.gz > /dev/sda"

Warning, if you are not sure where your CF device is, do not issue this command! It could overwrite all data on another disk drive in your system! Usually you can find the device name at the end of dmesg output

Congratulations! Your CF is now ready to install into your computer. You can skip ahead to Configuration



Using BSD to Prepare the CF


The device syntax is slightly different here, try writing to the raw device 'rwd1' or 'rsd1' , once again as root.
The system hard drive is usually found at /dev/wd0 or /dev/sd0 so take care not to accidentally destroy your hard disk's filesystem! Flash usually enumerates later as wd1-2, or sd1-2

  1. gunzip -c /path/to/astlinux.img.gz > /dev/rwd1

Congratulations! Your CF is now ready to insall into your computer. You can skip ahead to Configuration


Booting a Soekris 4801 from CF


After creating your CF, you'll need to get it installed and working in your Soekris box. If you haven't worked with an SBC before, this may be a little daunting, so we'll step through it here. You'll need to have:

  • a computer with a serial port
  • an appropriate serial cable
  • software to act as a terminal, e.g. HyperTerminal on Windows (Start->Programs->Accessories->Communications), or Tera Term

Rather than repeat it here, I recommend the great guide for m0n0wall at http://doc.m0n0.ch/quickstartsoekris/#Connecting.Serial.Console which has photos, screenshots and a step by step on how to get your Windows computer talking to the Soekris box. See sections 3.2.1 and 3.2.2 and then return here.

If you get the serial connection working correctly you should see the following boot sequence for AstLinux:

Image


This will only be visible for a couple of seconds before auto-selecting the first item. If you're quick you can use the up/down arrow keys on your keyboard to interrupt it.

Booting a PCEngines Wrap from CF


These instructions worked for a PC Engines WRAP 1E, with AMD Geode 233. Yes, the board is end-of-life, but that also meant it was mature. See http://www.pcengines.ch/wrap.htm.

Create a Compact Flash with ASTLinux by downloading the image called AstLinux-0.4.3-wrap.img.gz or similar from http://downloads.sourceforge.net/astlinux/AstLinux-0.4.5-wrap.img.gz?modtime=1177413741&big_mirror=0.

Follow the instructions above on creating AstLinux on CF.

I used:

  1. gunzip -c /path/to/AstLinux-0.4.5-wrap.img.gz > /dev/sda

on a Fedora machine successfully.

Open the chassis containing the WRAP Single Board Computer and insert the Compact Flash Card. You may have to remove the motherboard to swap Compact Flash Cards. I did. Re-assemble.

Connect a 2 X DB-9 female cable to the serial interface of the WRAP board and the serial port of a PC. My setup also required a null modem adapter. Apply power and watch AstLinux Boot.

LiveCD (bootable CD-ROM)


Create a bootable CD with AstLinux by downloading the image called AstLinux-0.4.3.iso or similar from SourceForge.

Most CD burning software can burn .ISO (In Side Out) images. Some free Windows ISO burning software is
ImgBurn, ]DeepBurner and ISORecorder.

On Mac OS X 10.3/4.x use the provided Disk Utilities to burn an ISO disk.

To test the burn, insert the newly created CD into the CD-ROM or DVD-ROM drive of the system on which you want to install AstLinux. Reboot the “soon to be� AstLinux system and make sure the bios of the system is set up to boot off the CD or DVD drive. You will see the CD-ROM's boot screen. At this point you can simply press Enter to begin the install

Congratulations! Your CD is now ready to configure for your computer. You can skip ahead to Configuration

Credit: Much of the material in this section was taken from the Asterisk@Home Handbook Wiki Chapter 2

Booting the LiveCD


AstLinux supports booting from cd-rom as both a Live CD and an install cd. When booting from cd-rom, you will be presented with a few options:

livecd - This option will boot an initial ramdisk and copy AstLinux to ram. AstLinux will then run entirely from memory. You can remove the CD during use.

usbkd - The same thing as above, although we will try to mount a keydisk (/dev/sda1) at /mnt/kd if it is an ext2 filesystem

The other options allow you to change the astkd (keydisk) parameter

If you would like to specify your own custom keydisk, simply type:

"livecd astkd=/dev/hda4"

Where "/dev/hda4" is the location of your keydisk.


VMWare


Download the VMware image from SourceForge. It will have a name something like AstLinux-0.4.3-VM.zip. Unzip the image and load it up in your VM Player.

The default user name and password is root/astlinux

There is no need to generate a keydisk as this has been done for you. It is located on /mnt/kd and contains the appropriate files.

To access the simple web interface, you will need to know the IP address of the virtual machine. Use the "ifconfig" command to see what IP your dhcp server assigened.


i586 and Via


How you load your image will depend very much on what hardware you are using. With an old Pentium (586) class machine, you will most likely use the LiveCD. For a VIA Epia board, you might use CD, or you might load the image directly onto a compact flash and boot from there.

AstLinux will by default not work with all of the hardware out there. I have created this image to enable you to use AstLinux on MOST pc hardware. I have included support for most IDE controllers and NICs. In order for AstLinux to work with your hardware, some tweaking may be involved. One thing that I know you will have to change is the module(s) that is/are loaded for your network card(s). The default from previous versions has changed. When the i586 image starts up, it will try to load all of the available network modules. This is to insure that at least one network card is detected. I have tried this method on several machines with no problem, but it is still a good idea to disable/reorder the modules. The file /etc/rc.modules is a list of modules that are loaded when the system boots. Modify this file to suit your needs:

mount -o rw,remount /
vi /etc/rc.modules
mount -o ro,remount /

Reboot.

Your hardware will have to be similar to the following:

i586-mmx + up (Asterisk will die without MMX!)
ATA Controller (Intel, AMD, VIA, Nvidia, and generics)
NIC (e100/eepro100, tulip, e1000, tigon 3, 3c59x, and many more)
usb-ohci, uhci, or ehci (pretty much all of them)

For an more accurate view, take a look at the modules in /lib/modules.

You can now pass the path of your keydisk on the GRUB command line. Similar to above, when the system boots you can modify the astkd= variable to change your keydisk device. The “genkd� script mentioned above now also uses this variable and also accepts the option to override the astkd= variable. If you want to use a device other than the one specified on the kernel command line for your “keydisk�, all you have to do is pass the device name on the command line like so:

genkd /dev/hdc1

This will use the third (Secondary Master) IDE hard disk on the machine for your “key disk�. Remember to select the right option when you boot your system!


Booting from USB


AstLinux 0.2.4 and later provide support for booting from USB (if the machine's BIOS supports it). The only change needed is very simple. After writing the i586 image to a USB flash drive, set the BIOS to boot from it (USB hard disk). When the system first boots, you have a few seconds to chose the AstLinux boot options. You will need to select the “Boot from USB� option. This will be saved as your default entry.

Continue: AstLinux Users Guide Chapter 2
Created by: mikemee, Last modification: Wed 20 of Jan, 2010 (17:33 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

 

Featured -

Search: