Difference between revisions of "Limey Linux"

From "PTTLink Wiki"
Jump to navigation Jump to search
Tag: visualeditor-switched
 
(2 intermediate revisions by the same user not shown)
Line 79: Line 79:
 
= Limey Linux Instllation on a Large Compact Flash Card =
 
= Limey Linux Instllation on a Large Compact Flash Card =
  
=== Written by Randy Hammock - KC6HUR ===
+
=== This section was Written by Randy Hammock - KC6HUR ===
 +
 
 
The following is the procedure I use to load Limey Linux onto a CF card. Since the CF card I was configuring in this example is significantly larger than Limey boot image, I also configured the remaining space on the CF card to be a Linux partition that can be used for additional storage (can you say audio files?). This procedure has been used to configure CF cards up to 4GB without any problems.
 
The following is the procedure I use to load Limey Linux onto a CF card. Since the CF card I was configuring in this example is significantly larger than Limey boot image, I also configured the remaining space on the CF card to be a Linux partition that can be used for additional storage (can you say audio files?). This procedure has been used to configure CF cards up to 4GB without any problems.
  
Line 88: Line 89:
 
Once you have down loaded the image from the Limey Linux web site and  un-tarred it, you need to copy the image to the CF card using the Linux '''dd''' command. '''Note: You must be root or use the sudo command for the following procedures to work:'''
 
Once you have down loaded the image from the Limey Linux web site and  un-tarred it, you need to copy the image to the CF card using the Linux '''dd''' command. '''Note: You must be root or use the sudo command for the following procedures to work:'''
  
<code>root@sierra:/home/rhammock# dd if=cfimg-d201gly2-1.0.6 of=/dev/sdc</code>
+
    root@sierra:/home/rhammock# dd if=cfimg-d201gly2-1.0.6 of=/dev/sdc
 
+
    250880+0 records in
<code>250880+0 records in</code>
+
    250880+0 records out
 
+
    128450560 bytes (128 MB) copied, 233.421 s, 550 kB/s
<code>250880+0 records out</code>
 
 
 
<code>128450560 bytes (128 MB) copied, 233.421 s, 550 kB/s</code>
 
  
 
The Limey Linux image has now been copied onto the CF card. We will now create a Linux partition so that remainder of the card can be used for additional storage.
 
The Limey Linux image has now been copied onto the CF card. We will now create a Linux partition so that remainder of the card can be used for additional storage.
  
<code>root@sierra:/home/rhammock# fdisk /dev/sdc</code>
+
    root@sierra:/home/rhammock# fdisk /dev/sdc
 
 
<code>The number of cylinders for this disk is set to 4036.</code>
 
 
 
<code>There is nothing wrong with that, but this is larger than 1024,</code>
 
 
 
<code>and could in certain setups cause problems with:</code>
 
  
<code>1) software that runs at boot time (e.g., old versions of LILO)</code>
+
The number of cylinders for this disk is set to 4036.
 
+
There is nothing wrong with that, but this is larger than 1024,
<code>2) booting and partitioning software from other OSs</code>
+
and could in certain setups cause problems with:
 
+
1) software that runs at boot time (e.g., old versions of LILO)
<code>(e.g., DOS FDISK, OS/2 FDISK)</code>
+
2) booting and partitioning software from other OSs
 +
(e.g., DOS FDISK, OS/2 FDISK)
  
 
Using the '''p''' command we can see that about 25% of the CF card is being used by the Limey Linux boot partition:
 
Using the '''p''' command we can see that about 25% of the CF card is being used by the Limey Linux boot partition:
 
+
Command (m for help): p
<code>Command (m for help): p</code>
+
 
+
Disk /dev/sdc: 512 MB, 512483328 bytes
<code>Disk /dev/sdc: 512 MB, 512483328 bytes</code>
+
4 heads, 62 sectors/track, 4036 cylinders
 
+
Units = cylinders of 248 * 512 = 126976 bytes
<code>4 heads, 62 sectors/track, 4036 cylinders</code>
+
Disk identifier: 0x00000000
 
+
<code>Units = cylinders of 248 * 512 = 126976 bytes</code>
+
Device Boot Start End Blocks Id System
 
+
/dev/sdc1 * 1 1011 125333 6 FAT16
<code>Disk identifier: 0x00000000</code>
 
 
 
<code>Device Boot     Start         End     Blocks   Id System</code>
 
 
 
<code>/dev/sdc1   *           1       1011     125333   6 FAT16</code>
 
 
 
 
The '''n''' command is used to create a new partition. This will be a primary partition and use number 2 since 1 is the boot partition. Just press Enter for the First cylinder and Last cylinder questions to accept the default conditions which be to use the remainder of the CF card.
 
The '''n''' command is used to create a new partition. This will be a primary partition and use number 2 since 1 is the boot partition. Just press Enter for the First cylinder and Last cylinder questions to accept the default conditions which be to use the remainder of the CF card.
  
<code>Command (m for help): n</code>
+
Command (m for help): n
 
+
Command action
<code>Command action</code>
+
e extended
 
+
p primary partition (1-4)
<code>e   extended</code>
+
p
 
+
Partition number (1-4): 2
<code>p   primary partition (1-4)</code>
+
First cylinder (1012-4036, default 1012):
 
+
Using default value 1012
<code>p</code>
+
Last cylinder or +size or +sizeM or +sizeK (1012-4036, default 4036):
 
+
Using default value 4036  
<code>Partition number (1-4): 2</code>
+
 
 
<code>First cylinder (1012-4036, default 1012):</code>
 
 
 
<code>Using default value 1012</code>
 
 
 
<code>Last cylinder or +size or +sizeM or +sizeK (1012-4036, default 4036):</code>
 
 
 
<code>Using default value 4036</code>
 
 
 
 
Use the '''p''' command to examine our current configuration.
 
Use the '''p''' command to examine our current configuration.
 
+
<code>Command (m for help): p</code>
+
Command (m for help): p
 
+
<code>Disk /dev/sdc: 512 MB, 512483328 bytes</code>
+
Disk /dev/sdc: 512 MB, 512483328 bytes
 
+
4 heads, 62 sectors/track, 4036 cylinders
<code>4 heads, 62 sectors/track, 4036 cylinders</code>
+
Units = cylinders of 248 * 512 = 126976 bytes
 
+
Disk identifier: 0x00000000
<code>Units = cylinders of 248 * 512 = 126976 bytes</code>
+
 
+
Device Boot Start End Blocks Id System
<code>Disk identifier: 0x00000000</code>
+
/dev/sdc1 * 1 1011 125333 6 FAT16
 
+
/dev/sdc2 1012 4036 375100 83 Linux
<code>Device     Boot     Start       End       Blocks   Id System</code>
+
 
 
<code>/dev/sdc1   *           1       1011     125333   6 FAT16</code>
 
 
 
<code>/dev/sdc2           1012       4036     375100   83 Linux</code>
 
 
 
 
We must now write this configuration out to the CF card using the '''w''' command.
 
We must now write this configuration out to the CF card using the '''w''' command.
 
+
<code>Command (m for help): w</code>
+
Command (m for help): w
 
+
The partition table has been altered!
<code>The partition table has been altered!</code>
+
 
+
Calling ioctl() to re-read partition table.
<code>Calling ioctl() to re-read partition table.</code>
+
 
+
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
<code>WARNING: Re-reading the partition table failed with error 16: Device or resource busy.</code>
+
The kernel still uses the old table.
 
+
The new table will be used at the next reboot.
<code>The kernel still uses the old table.</code>
+
Syncing disks.
 
+
<code>The new table will be used at the next reboot.</code>
 
 
 
<code>Syncing disks.</code>
 
  
 
We must now format the newly created partition. To do this we will use the '''mkfs''' (Make Filesystem) command. From above, we see that the Linux partition is located on /dev/sdc2 (the second partition on /dev/sdc). Remember, your system might have the CF card configured as a different device.
 
We must now format the newly created partition. To do this we will use the '''mkfs''' (Make Filesystem) command. From above, we see that the Linux partition is located on /dev/sdc2 (the second partition on /dev/sdc). Remember, your system might have the CF card configured as a different device.
  
<code>root@sierra:/home/rhammock# mkfs -t ext2 /dev/sdc2</code>
+
root@sierra:/home/rhammock# mkfs -t ext2 /dev/sdc2
 
+
mke2fs 1.40.8 (13-Mar-2008)
<code>mke2fs 1.40.8 (13-Mar-2008)</code>
+
Filesystem label=
 
+
OS type: Linux
<code>Filesystem label=</code>
+
Block size=1024 (log=0)
 
+
Fragment size=1024 (log=0)
<code>OS type: Linux</code>
+
93840 inodes, 375100 blocks
 
+
18755 blocks (5.00%) reserved for the super user
<code>Block size=1024 (log=0)</code>
+
First data block=1
 
+
Maximum filesystem blocks=67633152
<code>Fragment size=1024 (log=0)</code>
+
46 block groups
 
+
8192 blocks per group, 8192 fragments per group
<code>93840 inodes, 375100 blocks</code>
+
2040 inodes per group
 
+
Superblock backups stored on blocks:
<code>18755 blocks (5.00%) reserved for the super user</code>
+
8193, 24577, 40961, 57345, 73729, 204801, 221185  
 
+
<code>First data block=1</code>
+
Writing inode tables: done
 
+
Writing superblocks and filesystem accounting information: done
<code>Maximum filesystem blocks=67633152</code>
+
 
+
This filesystem will be automatically checked every 31 mounts or
<code>46 block groups</code>
+
180 days, whichever comes first. Use tune2fs -c or -i to override.
 
 
<code>8192 blocks per group, 8192 fragments per group</code>
 
 
 
<code>2040 inodes per group</code>
 
 
 
<code>Superblock backups stored on blocks:</code>
 
 
 
<code>8193, 24577, 40961, 57345, 73729, 204801, 221185</code>
 
 
 
<code>Writing inode tables: done</code>
 
 
 
<code>Writing superblocks and filesystem accounting information: done</code>
 
  
<code>This filesystem will be automatically checked every 31 mounts or</code>
 
  
<code>180 days, whichever comes first.  Use tune2fs -c or -i to override.</code>
 
  
 
Because Ubuntu remounted the boot partition and opened a File Browser window for that partition when we finished creating the Linux partition, close the File Browser window then unmount the device as was done before.
 
Because Ubuntu remounted the boot partition and opened a File Browser window for that partition when we finished creating the Linux partition, close the File Browser window then unmount the device as was done before.

Latest revision as of 05:14, 25 January 2019

This section contains all of the HowTos' for Limey Linux. Limey Linux is a Compact Flash based Linux distribution optimized for Asterisk/app_rpt. Limey Linux is a slimmed down embedded Linux Distribution which supports a limited number of Mini-ITX motherboards. To run Asterisk/app_rpt on a standard PC with a hard drive, please use the ACID distribution instead.

PLEASE NOTE!! - This section was copied from the old docs.allstarlink.org site to preserve it.

Nothing here is relevant to current versions of AllStar.

Booting Limey Linux for the First Time

With the compact flash (CF) prepared, follow the procedure below to complete the installation.

  1. Make sure the PC to be used with Limey Linux is turned off
  2. Insert the CF into the reader on the PC,
  3. Connect the URI to a USB port on the PC
  4. Turn the PC on
  5. After the power on self test, the CF should be seen by the BIOS and the the system should start to boot.
  6. After booting completes, you should see a prompt on the monitor similar to: It appears that this is the first time this system has been booted. It would be prudent to change a few key settings now for the sake of security and convenience. Once this information is entered, the system will reboot and the next time the system boots, this message will not re-appear. Would you like to do this now (Y/N)? Say yes by typing the 'Y' key.
  7. You will be prompted to change the root password. Enter the password you would like to use twice.
  8. After the password is set, you will be prompted to set the time zone. The default is PST8PDT. This is what you will get if you just hit return. US timezones are EST5EDT,CST6CDT,MST7MDT,MST7MST,PST8PDT.
  9. You will be asked if you want to change the host name. To change the host name, type Y. and then enter the host name when prompted.
  10. You will be asked how to set up the network. Choose D for a DHCP network configuration (common) or choose S for a static IP (uncommon) and enter the network information requested.
  11. The system will now reboot.
  12. Log back in, and you are now ready to run nodesetup to configure your system for the Allstar Link.

Install

This article explains how to do an installation of Limey Linux on a Compact Flash card, and go through the initial configuration after the first boot. This installation article is for those users who have a compatible motherboard, and a URI radio interface. Using Limey Linux with the Quad Radio PCI card is feasible, but is beyond the scope of this article.

Warning! Read these instructions carefully as it is possible to overwrite your hard drive on your PC if you mis-type something. The auther will not be responsible for any error in this document, or error on the reader's part.

Requirements

  1. A linux-based PC connected to the Internet with a USB Compact Flash writer attached. Your user account will need to be configured to enable the use of sudo.
  2. A 128MB, 256MB, or 512MB Compact Flash device

Determine the Device Name

  1. Remove all USB flash drives, USB hard drives, and other removable disks attached to the system. Invoke a terminal window if running under X-windows.
  2. Run sudo fdisk -lu. The output should look similar to this:
Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xb51ef163

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63    23085404    11542671   83  Linux
/dev/sdb2        23085405    33591914     5253255   83  Linux
/dev/sdb3   *    33591915   138464234    52436160   83  Linux
/dev/sdb4       138464235   243336554    52436160   83  Linux
  1. Insert the compact flash disk into the compact flash writer
  2. Run sudo fdisk -lu. The output should look similar to this:
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63    23085404    11542671   83  Linux
/dev/sdb2        23085405    33591914     5253255   83  Linux
/dev/sdb3   *    33591915   138464234    52436160   83  Linux
/dev/sdb4       138464235   243336554    52436160   83  Linux

Disk /dev/sdc: 1024 MB, 1024966656 bytes
32 heads, 62 sectors/track, 1009 cylinders, total 2001888 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000


Disk /dev/sdc doesn't contain a valid partition table

Or this:

  Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63    23085404    11542671   83  Linux
/dev/sdb2        23085405    33591914     5253255   83  Linux
/dev/sdb3   *    33591915   138464234    52436160   83  Linux
/dev/sdb4       138464235   243336554    52436160   83  Linux

Disk /dev/sdc: 2042 MB, 2042191872 bytes
5 heads, 50 sectors/track, 15954 cylinders, total 3988656 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x97880540

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *          50      254749      127350    6  FAT16
  1. We are looking for any partition which is not an internal hard drive. Comparing the output in step 2, we see that /dev/sdc is a new device which was displayed in step 4 but not in step 2. In this particular case, /dev/sdc is the device name we are interested in as the size matches the size of the compact flash device we inserted into the writer. Make a note of your device name as it will be required to write the disk image to the compact flash in the next section. We will refer to the noted device as /dev/devicenamenoted throughout the rest of this article.
  2. If you see a valid partition on the compact flash device (Step 4 example output 2) you will need unmount the partition. To unmount the partition, type: sudo umount /dev/devicenamenoted

Limey Linux Instllation on a Large Compact Flash Card

This section was Written by Randy Hammock - KC6HUR

The following is the procedure I use to load Limey Linux onto a CF card. Since the CF card I was configuring in this example is significantly larger than Limey boot image, I also configured the remaining space on the CF card to be a Linux partition that can be used for additional storage (can you say audio files?). This procedure has been used to configure CF cards up to 4GB without any problems.

I use a Compact Flash to PCMCIA adapter which I then plug into PCMCIA adapter on my main computer running Ubuntu 8.04 LTS (Hardy Heron). On my system, the CF card is identified as /dev/sdc. Please note that this could end up being called a different device on your system! Ubuntu mounts the device and displays any partitions found in file browser windows. Close the windows then locate the device icons on the Desktop, right-click on them and select unmount volume

We are now ready to proceed to load our Limey Linux image onto the CF card. In this example, I'm loading an image for the d201gly2 mobo.

Once you have down loaded the image from the Limey Linux web site and un-tarred it, you need to copy the image to the CF card using the Linux dd command. Note: You must be root or use the sudo command for the following procedures to work:

   root@sierra:/home/rhammock# dd if=cfimg-d201gly2-1.0.6 of=/dev/sdc
   250880+0 records in
   250880+0 records out
   128450560 bytes (128 MB) copied, 233.421 s, 550 kB/s

The Limey Linux image has now been copied onto the CF card. We will now create a Linux partition so that remainder of the card can be used for additional storage.

   root@sierra:/home/rhammock# fdisk /dev/sdc

The number of cylinders for this disk is set to 4036. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK)

Using the p command we can see that about 25% of the CF card is being used by the Limey Linux boot partition:

Command (m for help): p

Disk /dev/sdc: 512 MB, 512483328 bytes
4 heads, 62 sectors/track, 4036 cylinders
Units = cylinders of 248 * 512 = 126976 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 1011 125333 6 FAT16

The n command is used to create a new partition. This will be a primary partition and use number 2 since 1 is the boot partition. Just press Enter for the First cylinder and Last cylinder questions to accept the default conditions which be to use the remainder of the CF card.

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (1012-4036, default 1012):
Using default value 1012
Last cylinder or +size or +sizeM or +sizeK (1012-4036, default 4036):
Using default value 4036 

Use the p command to examine our current configuration.

Command (m for help): p

Disk /dev/sdc: 512 MB, 512483328 bytes
4 heads, 62 sectors/track, 4036 cylinders
Units = cylinders of 248 * 512 = 126976 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 1011 125333 6 FAT16
/dev/sdc2 1012 4036 375100 83 Linux

We must now write this configuration out to the CF card using the w command.

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

We must now format the newly created partition. To do this we will use the mkfs (Make Filesystem) command. From above, we see that the Linux partition is located on /dev/sdc2 (the second partition on /dev/sdc). Remember, your system might have the CF card configured as a different device.

root@sierra:/home/rhammock# mkfs -t ext2 /dev/sdc2
mke2fs 1.40.8 (13-Mar-2008)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
93840 inodes, 375100 blocks
18755 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67633152
46 block groups
8192 blocks per group, 8192 fragments per group
2040 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185 

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.


Because Ubuntu remounted the boot partition and opened a File Browser window for that partition when we finished creating the Linux partition, close the File Browser window then unmount the device as was done before.

You can now eject the Compact Flash to PCMCIA adapter from the PCMCIA adapter. The CF card is now ready to be used on the Asterisk computer.

Preparing the Compact Flash

Choosing Which Image to Download

There are unique precompiled images for different groups of motherboards. The correct image must be chosen or the system may fail to boot, or some of the on-board peripherals such as the network controller will not be properly initialized. Currently, there are 2 different images available:

  1. i586 image for VIA Mini-ITX motherboard models ME-6000, SP-8000 and CN-10000
  2. i686 image for supported Mini-ITX motherboards: Intel D201GLY2, Intel D945GCLF, and Igoe Logic I3386G

The image file must be selected,downloaded, and unpacked. Please note: VIA motherboards do not have enough processing power to support the URI. If your radio interface is a URI, you must use one of the other Motherboards in the above list.

The URL http://limeylinux.org/downloads lists all of the available compact flash images. Below is a list of what's available on the site as of 10/10/2009:

cfimg-i686-supported-1.0.8.tar.gz
cfimg-i586-via-1.0.8.tar.gz

All compact flash images start with the letters 'cfimg'. If the word 'test'or 'pre' is in the image name, this means the image is a test image and should be avoided for production systems unless you are aware of what has been changed.

Download and Unpack the Image

  1. After you have decided which image is right for you, open up a terminal window on your Linux system, and download it using the wget command: wget -N http://limeylinux.org/downloads/cfimg-x86-xxxx-x.x.x.tar.gz Where: cfimg-x86-xxxx-x.x.x.tar.gz is the image you chose above.
  2. Unpack the image by typing: tar xvfz cfimg-x86-xxxx-x.x.x.tar.gz

Copy the Image to the Compact Flash

Now all that's left to do is to copy the image to the compact flash. Using the device name you determined on the previous page, and the unpacked image file, type the following being extra careful not to make any typing mistakes: sudo dd if=cfimg-x.x.x of=/dev/devicenamenoted Where: cfimg-x.x.x is the unpacked compact flash image, and /dev/devicenamenoted is the name of the CF writer determined on the previous page.

Save Asterisk Binary

On Limey Linux it may be necessary to save the Asterisk bin files, notably after adding node sound files. The commands below creates a file astbin in the current directory (usually /root) and moves it to the CF card.

svastbin

mount /mnt/cf

mv astbin.tgz /mnt/cf/astbin.tgz

umount /mnt/cf

Limey Linux decompresses astbin.tgz to create the Asterisk binaries in memory on system boot up.