Install PIAF from USB Flash Drive

bmore

Guru
Joined
Feb 12, 2009
Messages
118
Reaction score
1
Hmmm... It was gone on my system. Will check again... It seems to be a problem with the Anaconda install script not clearing the screen after pre-install scripts are run, before the progress bar is displayed.
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
By Code in the BG, I meant the part where it is downloading all of the software - where the two progress bars are and it has the solid blue background. It has random bits of code in it.
 

bmore

Guru
Joined
Feb 12, 2009
Messages
118
Reaction score
1
Fixed text behind progress bar

I uploaded version 1.3 of the kickstart files to the first post. The text that appears behind the progress bars should now be gone.

Bobby
 

ccbadd

New Member
Joined
Jan 1, 2011
Messages
6
Reaction score
0
Is there any way to get the scripts updated to allow install of ethernet drivers before the payload is installed? I have a Nettop box that does not have support to the ethernet devices by default? I would like to installed CentOs, pause for custom ethernet drivers, then a resume of install.

I have been able to get it installed, but it is quite hectic.
 

bmore

Guru
Joined
Feb 12, 2009
Messages
118
Reaction score
1
Is there any way to get the scripts updated to allow install of ethernet drivers before the payload is installed? I have a Nettop box that does not have support to the ethernet devices by default? I would like to installed CentOs, pause for custom ethernet drivers, then a resume of install.

The install grabs the kickstart files from the internet. This avoids the issue of being unable to locate the kickstart files on a local hard drive / the flash drive... the location may be different based on the configuration of the machine. The kickstart files determine which packages are installed. At completion the machine reboots to install and configure the piaf payloads.

To do you what you want, you can configure the syslinux.cfg file on the flash drive to be specific to your machine. I have a commented line in the default install that works for a machine like the Revo with one SATA drive. Uncomment that line and comment the similar line beside it... it has the flash drive as device sdb.

You should then be able to install the drivers after the first stage completes. Or is your problem that it reboots and continues the install of the payload by prompting for which payload, purple etc? If this is the case then the piaf script would need to be written to pause and prompt to allow install of drivers before continuing.
 

ccbadd

New Member
Joined
Jan 1, 2011
Messages
6
Reaction score
0
Thanks bmore, I made the change to the syslinux.cfg file and install went fine. When the install was done, I reboot. Once rebooted I chose the last option, to go to a command line. I installed the needed kmod, rebooted and chose the Purple option. All worked fine. I guess I just could not find any details on this but, in the end, it was easy.
 

bmore

Guru
Joined
Feb 12, 2009
Messages
118
Reaction score
1
I guess I just could not find any details on this but, in the end, it was easy.

I left the commented line in for issues like this. I added some notes ion this to the Quick method linked to from the first post.

Thanks.
 

jervin

New Member
Joined
Aug 30, 2010
Messages
5
Reaction score
0
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:
  • 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
Booting from a flash drive offers a lot of advantages. Among them:
  1. Upgrade existing Centos Install
  2. Advanced users can easily modify the installation by adding packages are other changes
  3. New PIAF releases only need the iso on the flash replaced (no need to burn new CDs)
  4. Easy testing of new deployments by changing the flash drive contents
  5. Generally make changes to installations very easily by editing a portable flash drive
  6. 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. 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)
  2. PIAF 1.7.5.5.5 install ISO
  3. UNetbootin from http://unetbootin.sourceforge.net/ Note that UNetbootin works on Windows and Linux (Ubuntu Debian Fedora Suse Arch Gentoo etc).
Read the complete instructions before attempting this procedure. If used improperly this procedure can result in data loss or erasing of an incorrect drive. You have been warned. The usual caveats apply: You are not required to use this procedure and so if you lose any data for whatever reason or by whatever means you are solely responsible for such loss. However if done properly this procedure is very safe.

Instructions
  1. If you have not done so yet, Download the experimental PIAF 1.7.5.5.5 install ISO from SourceForge.
  2. 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)
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. On the flash drive, delete the following folders/directories:
    Code:
    docs, images, pbx, repodata, source
  8. 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.
  9. Copy the 1.7.5.5.5 piaf iso to the CentOS folder on the flash drive.
  10. Extract the files in the ks.zip archive attached to this post to the root (/) of the USB flash drive
  11. That's it, the flash drive is done.
The *.cfg files in the root of the flash drive were changed: syslinux.cfg and ks*.cfg (ks.cfg, ksauto.cfg, kslvm.cfg, ksmin.cfg, ksnet.cfg, ksraid.cfg). To get this working, at a minimum the syslinux.cfg and one of the ks*.cfg need to be edited/changed. For an automated install we will point to the ks.cfg file at http://www.pbxinaflash.net/ksdir/ks.cfg or http://www.pbxinaflash.com/ksdir/ks.cfg.

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
We will use the ks.cfg files at the piaf website as shown above. The downloaded syslinux.cfg files point to the ks*.cfg files at pbxinaflash.net

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
I think my problem is that my system needs a driver to access the internet. So no internet until the install is done and I can install the appropriate drivers. Perhaps I can attempt to install it on the flash drive.
 

dbaum

Guru
Joined
Jan 11, 2009
Messages
124
Reaction score
2
IS this supposed to work with ISO for 17561 and KS 1.30?

I followed the instructions to the letter using the latest ISO for PIAF (17561) and the latest KS files (1.30).

In an ACER REVO AR3700-U3002 I booted from the Flash Drive and press TAB at the boot menu to view the KS location and volume.

KS location is set for the internet download
Volume is /sdb

The installation continues and I am presented and respond to keyboard type, but it halts being unable to find the CentOS image.

I press F2 and select the /sdb1 location then am presented with a request for the location of the ISO. I select the /CentOS directory and the ISO file and then tab to OK and press ENTER.

The system says the install was abnormally terminated and it is OK to shut down the system.

This happens repeatedly so it is consistent.

What am I doing wrong?

BTW I tried the instructions from http://nerdvittles.com/?p=714 using the newest ISO, which, because it fails, is probably because there is no FLASH ONLY version for download.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,224
Haven't gotten that far yet... but we're still pedaling. :ack2:
 

bmore

Guru
Joined
Feb 12, 2009
Messages
118
Reaction score
1
The process usually works without issues on the Acer Revo. I have not tried it with the latest PIAF yet, will do in a day or 2 after I get some stuff sorted out.
 

dbaum

Guru
Joined
Jan 11, 2009
Messages
124
Reaction score
2
Thanks Ward. I was just trying to get some machines stabilized before my next eye surgery (#8).
 

dbaum

Guru
Joined
Jan 11, 2009
Messages
124
Reaction score
2
Thanks. I was just trying to get some machines stabilized before my next eye surgery
 

dbaum

Guru
Joined
Jan 11, 2009
Messages
124
Reaction score
2
Update?

Had the surgery, so pardon large type.
Any progress on sucessful usb install newest release - actually the newest ISO 1.7.5.6.2 would be helpful.
Thanks in advance!
 

boilermanc

New Member
Joined
Jul 7, 2011
Messages
29
Reaction score
2
Hi, I have tried to install the latest build, 17562 on an Acer Aspire One. It will pull up the starting install page with the warning and shows the "root" prompt but the keyboard does not respond. How do you get that functioning?

thanks!
 

bmore

Guru
Joined
Feb 12, 2009
Messages
118
Reaction score
1
Hi, I have tried to install the latest build, 17562 on an Acer Aspire One. It will pull up the starting install page with the warning and shows the "root" prompt but the keyboard does not respond. How do you get that functioning?

thanks!

I am not sure how to solve your problem. I did most of the testing on the Acer Revo. Yes, the Centos folder should be empty.

If the keyboard is not working, it suggests some type of compatibility issue with Centos and your box or maybe the flash drive.

Sorry, I cannot offer more help but it seems like a compatibility problem.
 

dbayer

Member
Joined
Jul 27, 2011
Messages
39
Reaction score
1
RAID Install

Hello,

I'm trying to get this to work on a Rhino Cerus 1U server with 2 hard drives.

When I boot from the flash drive, I get to the setup options. If I select ksraid, it says the kernel cannot find that module. If I hit Enter and accept the default setup, it then asks me to locate the CentOS folder. I point it to the proper drive for this and the setup continues. It goes back to the setup options, I can now select ksraid. But at the end of the install RAID is not setup.

Can anyone offer any suggestions?

Thanks,
Daniel
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,224
This really was developed and tested for generic (i.e. default) installs. If you get past that, such as with RAID installs, you're probably better off using a CD with the latest ISO.
 

bmore

Guru
Joined
Feb 12, 2009
Messages
118
Reaction score
1
Daniel,

It has been a while since I visited this. As Ward pointed out it was developed and tested for a generic install. However if you would like to try it for a raid install... These are the steps to try.

During the install of CentOs, the install routine reads the ks*.cfg files for automated install selections. Because we were doing generic installs we did not address issues like raid etc.

In our setup the isolinux bootloader is reading syslinux.cfg to display the menu options and then determine which option to load (default, net, raid, etc.) based on the menu option chosen... Mainly which ks*.cfg to load/process.

In our case we tell the bootloader to get the ks.cfg file from Ward's web server.

These files syslinux.cfg and the ks*.cfg files are on the flash drive. You can open them in your favorite text editor, they consist of text directives.

The one you will most likely need to change is syslinux.cfg. (you can download the file in the first post to see what I am talking about).

The file is fairly logical to interpret.
Look at the menu entry:

Code:
label ubnentry7
menu label ksraid (raid install)
kernel /isolinux/vmlinuz
append initrd=/isolinux/initrd.img ks  text ramdisk_size=8192 ks=http://www.pbxinaflash.com/ksdir/ks.cfg  method=hd:sdb1:/CentOS
Notice that because this was generic install, I set all the options to load ks.cfg from the web server. The directive ks=

To get this working you will need to change this:
Code:
ks=http://www.pbxinaflash.com/ksdir/ks.cfg
to:
Code:
 ks=hd:sdc1:/ksraid.cfg
The first one says, for install directives get ks.cfg from the web server.

The new one gets if from a local hard drive (hd: ) It uses the CentOs convention for the hard drives. sda is the first SATA/SCSI hard drive (hda for IDE). The number is the partition. So sdc1 means look on the 3rd local hard drive (sdc), on partition 1, in the root (/) for ksraid.cfg.

The above assumes CentOS has assigned your flash drive as sdc. Note that if you have more than one drive it could be sdc or some other and so on.

For the automatic configuration of your raid... Look in ksraid.cfg

The raid related directives are near the top before the 'reboot' line:
Code:
zerombr
clearpart --all --initlabel
part raid.01 --size=100 --ondisk=sda --asprimary
part raid.02 --size=100 --ondisk=sdb --asprimary
part raid.11 --size=1024 --ondisk=sda
part raid.12 --size=1024 --ondisk=sdb
part raid.21 --size=100 --grow --ondisk=sda
part raid.22 --size=100 --grow --ondisk=sdb
raid /boot --level=1 --device=md0 --fstype=ext3 raid.01 raid.02
raid swap --level=1 --device=md1 --fstype=swap raid.11 raid.12
raid / --level=1 --device=md2 --fstype=ext3 raid.21 raid.22
Note these are CentOS directives: The master boot record is first cleared; All partitions on all drives are cleared. Then drives sda and sdb are partitioned and and setup as raid drives. The default above will most likely work for you without changes.

If you are somewhat knowledgeable with computer and linux stuff you should be able to get it working.

Can you see why with all the myriad configurations out there why we stuck to a generic setup :banghead:

Good luck and let us know.

Bobby





Hello,

I'm trying to get this to work on a Rhino Cerus 1U server with 2 hard drives.

When I boot from the flash drive, I get to the setup options. If I select ksraid, it says the kernel cannot find that module. If I hit Enter and accept the default setup, it then asks me to locate the CentOS folder. I point it to the proper drive for this and the setup continues. It goes back to the setup options, I can now select ksraid. But at the end of the install RAID is not setup.

Can anyone offer any suggestions?

Thanks,
Daniel
 

Members online

No members online now.

Forum statistics

Threads
25,816
Messages
167,785
Members
19,246
Latest member
rahee
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top