Dec 24, 2010: Uploaded new config files (the process should be more robust on a wider range of machines).
Pbx in a Flash on a Flash - the quick method.
Note: I have significantly changed the procedure from the original. The Centos DVD is no longer required and you use the *.cfg files in the attached archive. A USB drive with free space of 655 MB or greater can be used.
After a lot of reading and testing I was able to get PIAF to install from a bootable USB flash drive. Read all the procedures before you start. The article is long but the process is not complex.
This list below is a summary of the procedures so you get an overall picture of what you will be doing:
Prerequisites
Instructions
The Linux bootloader uses the instructions in syslinux.cfg and the selected ks*.cfg file to control the bootup and install process. ks.cfg files are called Kickstart files and are used to automate the install process. On X windows Linux you can install and use the graphical Kickstart Configurator package. This makes editing a kickstart (ks*.cfg) file much easier.
To linux the flash drive is like another hard drive. Linux mounts your hard drives as block devices and assigns the drive a device name of the form sda or hda (hda for ide drives, sda for SATA drives and our flash drive). Each partition on each drive is assigned a partition number (from 1 to 4 for primary partitions and from 5 up for extended partitions).
The flash drive device will be sdX (where X is a letter like a, b, c). The partitions are addressed as sdX1, sdX2 (sdb1, sdb2 etc). The mostly likely device name will be sdb (but you must make absolutely sure you know the device name), though code in the files will try and usually detect it correctly. The flash drive needs to have a primary partition formatted as fat32. Thus the most likely device name for the first partition on the flash drive will be sdb1 (this is the name on a stock Acer Aspire Revo).
If the flash drive is not not sdb, the install will pause and ask you to select the drive with the install files. The flash drive will be one of the sdx drives (sda or sdc etc)
The Kickstart files
The default pbx in a flash install erases all hard drives. Recall that Centos treats the flash drive as a hard drive so we need to edit our ks*.cfg files to tell it not to erase or partition our flash drive.
I added code to the downloaded kickstart config files to address the following issues:
That is it. Insert the flash drive and boot the computer to install pbx in a flash. First, either enter the bios and change the boot order to USB drive first or interrupt the boot process by pressing the appropriate key (F12 on the Acer Revo) then selecting boot from USB drive.
Let me know if you discover any inaccuracies or issues and I will correct or revise.
There are other advanced and cool ways to change the kickstart files but I will leave those for comments and for advanced users.
Note: The procedure should be considered experimental. Please let me know any issues that you discover so that they can be fixed.
Thanks
Pbx in a Flash on a Flash - the quick method.
Note: I have significantly changed the procedure from the original. The Centos DVD is no longer required and you use the *.cfg files in the attached archive. A USB drive with free space of 655 MB or greater can be used.
After a lot of reading and testing I was able to get PIAF to install from a bootable USB flash drive. Read all the procedures before you start. The article is long but the process is not complex.
This list below is a summary of the procedures so you get an overall picture of what you will be doing:
- Edit PIAF ISO to add a folder named Centos or use PIAF 1.7.5.5.5 ISO.
- Make the flash drive linux bootable using UNetbootin
- Copy the modified pbxiaf iso (or IAF 1.7.5.5.5 ISO) to flash drive CentOS folder.
- Copy the downloaded syslinux and kickstart config files to the root (/) folder of the flash drive
- Upgrade existing Centos Install
- Advanced users can easily modify the installation by adding packages are other changes
- New PIAF releases only need the iso on the flash replaced (no need to burn new CDs)
- Easy testing of new deployments by changing the flash drive contents
- Generally make changes to installations very easily by editing a portable flash drive
- Install on any machine with a flash drive (no need for the box to have a cd drive). Easy install on the Acer Aspire Revo and others with no cd drive
Prerequisites
- 1 GB of Larger USB flash Drive. This procedure needs about 655 MB or greater free. A smaller drive can be used with some customizations (e.g., for a network only install, the drive needs only about 200 kb free)
- PIAF 1.7.5.5.5 install ISO
- UNetbootin from http://unetbootin.sourceforge.net/ Note that UNetbootin works on Windows and Linux (Ubuntu Debian Fedora Suse Arch Gentoo etc).
Instructions
- If you have not done so yet, Download the experimental PIAF 1.7.5.5.5 install ISO from SourceForge.
- If the flash drive is formated as FAT with only one partition, it does does not need to be formated or erased. Additional files can be added to it later. However you should backup any files you need. An initially empty flash drive is easier to manage. If it is not already formated FAT 32, format the flash drive as FAT 32. It needs a sufficiently large primary partition (about 1 Gb or greater for a complete self contained install)
- Insert the flash drive. In Linux it will need to be mounted. In Windows make absolutely sure you know the drive letter windows has assigned to the flash drive.
- Run UNetbootin. Select the Diskimage button. Browse to 1.7.5.5.5 pbxinaflash iso and select. Make sure you choose correct Drive letter/Device for flash drive. Then click OK to create the live usb drive. You do not need to reboot when finished.
- UNetbootin will create a bootable USB drive with the piaf iso copied to the USB drive. You can delete some files and folders as they will not be required.
- Browse to the folder. In linux you can also do this from a terminal and use the proper commands or a X windows file manager.
- On the flash drive, delete the following folders/directories:
Code:
docs, images, pbx, repodata, source
- On the flash drive: If it does not already exist; Create a folder/directory named CentOS (remember exact case is important). It should already exist since it is in the pbiaf iso.
- Copy the 1.7.5.5.5 piaf iso to the CentOS folder on the flash drive.
- Extract the files in the ks.zip archive attached to this post to the root (/) of the USB flash drive
- That's it, the flash drive is done.
The Linux bootloader uses the instructions in syslinux.cfg and the selected ks*.cfg file to control the bootup and install process. ks.cfg files are called Kickstart files and are used to automate the install process. On X windows Linux you can install and use the graphical Kickstart Configurator package. This makes editing a kickstart (ks*.cfg) file much easier.
To linux the flash drive is like another hard drive. Linux mounts your hard drives as block devices and assigns the drive a device name of the form sda or hda (hda for ide drives, sda for SATA drives and our flash drive). Each partition on each drive is assigned a partition number (from 1 to 4 for primary partitions and from 5 up for extended partitions).
The flash drive device will be sdX (where X is a letter like a, b, c). The partitions are addressed as sdX1, sdX2 (sdb1, sdb2 etc). The mostly likely device name will be sdb (but you must make absolutely sure you know the device name), though code in the files will try and usually detect it correctly. The flash drive needs to have a primary partition formatted as fat32. Thus the most likely device name for the first partition on the flash drive will be sdb1 (this is the name on a stock Acer Aspire Revo).
If the flash drive is not not sdb, the install will pause and ask you to select the drive with the install files. The flash drive will be one of the sdx drives (sda or sdc etc)
The Kickstart files
The default pbx in a flash install erases all hard drives. Recall that Centos treats the flash drive as a hard drive so we need to edit our ks*.cfg files to tell it not to erase or partition our flash drive.
I added code to the downloaded kickstart config files to address the following issues:
- Prevent partition formating of the flash drive during boot.
- Have the GRUB bootloader installed on the master boot record of the correct drive and not our flash drive
- Tell the CentOS anaconda boot script the device name of our drives and the folder that contains the install ISO images.
- Let the install find all packages to be installed
That is it. Insert the flash drive and boot the computer to install pbx in a flash. First, either enter the bios and change the boot order to USB drive first or interrupt the boot process by pressing the appropriate key (F12 on the Acer Revo) then selecting boot from USB drive.
Let me know if you discover any inaccuracies or issues and I will correct or revise.
There are other advanced and cool ways to change the kickstart files but I will leave those for comments and for advanced users.
Note: The procedure should be considered experimental. Please let me know any issues that you discover so that they can be fixed.
Thanks