domingo, 19 de enero de 2014

Install Elastix from USB Step by Step

Install Elastix from USB Step by Step

Elastix is one of the best Open Source Unified Communications Servers available today, it is very easy to install but the installer is designed to be run from CDROM and we can make the installation in several devices that don´t have an optical drive.  This document will guide you to modify the installer so you can install entirely from an USB Flash drive.

Warning: The Server Security is a very important and serious aspect in a VoIP server, this guide will not cover that but there is plenty of information on that topic in the Internet. If you are looking for a professional installation contact me and I'll be glad to help you for a very reasonable price.

This guide was created using a PC with an unpartitioned hard disk, if your hard disk is already partitioned, formatted or has data you need to keep, you may need to adjust the settings for your configuration.  You may also lose the data in the disk. I assume no responsibility for data loss or hardware damage, if you decide to follow this guide, you do so at your own risk.

What you need:

Computer with hard drive
2GB or larger USB
Elastix ISO
UNetbootin (to create the bootable USB)

Let's start ...

1. Go to the Elastix Web Site and download the ISO, the stable version right now is 2.4.0, but this guide should work with the beta and alpha versions too (I hope). 


2. Then get UNetbootin to make the USB bootable.

http://unetbootin.sourceforge.net/

3. Format the USB in FAT32.

4. Open UNetbootin,
        1. Select ImageDisc
        2. Click on the ... button and select the elastix iso you downloaded earlier
        3. Select your usb drive
        4 Click OK




UNetbootin will make the USB bootable and will extract the ISO files to the USB.



When UNetbootin finishes extracting just click on Exit, we don't need to reboot.

5. Now let's copy the Elastix ISO to the USB, even though UNetbootin extracted the ISO in the USB we also need the ISO in the USB.  When Anaconda (the linux installer) installs from hard drive it looks for the ISO.

6. We need to modify two files in the USB

Here we need to understand how Linux identifies the different drives we have in the computer, usually the first hard drive is SDA, the second is SDB and so on.  So if you are going to install Elastix to the first hard drive (and the only one) that would be SDA.  For Linux the USB will be another hard drive so it will identify it as SDB if there are no other hard drives in the PC.  If you have 2 hard drives, then the USB would be SDC.

Now that we understand the Linux hard drive naming, let's open the first file we need to modify:

I recommend you to use Notepad++ to modify the files, sometimes windows notepad does not handle Linux files very good. You can get it here: http://notepad-plus-plus.org/ 

Open the file syslinux.cfg with Notepad++, the file is in the root of the USB.

Look for this line, in my file is line 9, but it may change:

append initrd=/ubninit ks=cdrom:/ks_default.cfg ramdisk_size=8192

and change it to:

append initrd=/ubninit ks=hd:sdb1:/ks_default.cfg ramdisk_size=8192

The original line instructs the Linux installer to look for the configuration file in the CDROM, we changed that to make it look for the file in a hard drive (SDB1), the 1 at the end is the partition, sdb1 is the second hard drive's first partition. If you have more than one hard drive you would have to modify the line. As we only have one hard drive (sda) the usb is the second hard drive (sdb),  if you have 2 hard drives then the USB would be the third hard drive (sdc).

That is all for the first file, save it and close it.

Now let's look for the file ks_default.cfg in the USB root and open it with Notepad++

Look for this lines:

#Use CDROM installation media
cdrom


and change it to:

#Use CDROM installation media
#
cdrom


we comment the cdrom line because we are not going to install from cdrom.

Now append this line after the CDROM section

ignoredisk --drives=sdb

This line tells the Linux Installer to ignore the USB as a target for installation, we won't install to the USB we are going to install to the hard drive.

Now look for this line, is right below:

#System bootloader configuration
bootloader --location=mbr 


and change it to:

#System bootloader configuration
bootloader --location=mbr --driveorder=sda,sdb


This change is very important, it tells the Linux installer that the computer boots first from sda (the hard drive), so it installs the bootloader there. If you miss this change, the linux installer will install the bootloader in the USB, so you would only be able to boot Elastix if the USB is connected.

That's it for the second file, save it and close it.

7. We are ready to start the installation.  Plug in the USB drive in the computer and turn it on. As we only have one unpartitioned hard drive, the PC should boot directly from the USB.  If it doesn't, load the computer boot menu and select the USB to boot.

8. You should see the screen below, just hit Enter to continue.



9. Select your installation language and hit enter to continue. 




10. Select the keyboard layout and hit enter to continue.

11. In the next screen select Hard Drive and enter to continue.



12. Now, if you are using the same configuration as me (one unpartitioned hard drive), you should get only one choice here /dev/sdb1 (arrow 1) which is the USB, if your hard drive already have partitions or you have more than one hard drive you will probably get a list here.  You should select the USB, usually it is the last one in the list.

If you copied the Elastix ISO to the USB root just leave the directory blank (arrow 2), if you copied it to a directory, specify it there and the click OK to continue.




13. If your hard disk was unpartitioned you will get a warning that the installer will overwrite all the data, just select yes to continue.



14. Now in the partition type screen, select the first option and make sure the hard drive in which you plan to install Elastix is selected, then select OK to continue.




15. You are going to see another warning about losing all your data in the hard drive, this is the last on, so make sure the data in the hard drive (if any) can be deleted. select Yes to continue.




16. If you want to modify the installer suggested disk layout you can do so in this screen, usually we would not need to change it, so click no to continue.




17.  In the 4 following screens, configure the NIC parameters according to your current network, select YES to continue.





The data in the previous screens is just an example, fill the data with your own network info.


18. Select a Hostname, and fill it in this screen.




19. Now select you current time zone, leave the option "System clock uses UTC" unchecked as some versions of FreePbx don't handle UTC very well.




20.  Select a strong root password and write it down or memorize it, it is not easy to recover it if you lose it.




21. The installer will now format the hard drive and copy all the files needed, this step could take 10 minutes or more depending on the hardware you have.




22.  After the file copy is complete, the computer will reboot, make sure you have the hard drive as the first boot device in the bios.  Elastix should boot from the hard drive and you should see a screen like this.




23. In the first boot Elastix will ask for 2 passwords, first Mysql password, as a regular user, this password is not used very often, but if you are going to need access to the databases to make special applications you will need it, so better write it down.




Then the admin password, this is a very important password, it is the one you will use to enter to the web interface to configure your server, make sure it is a complex password and to write it down.




24. And that's it,  you now have Elastix installed without the need of a CDROM drive !!!.



I hope this guide is useful for you.

Thanks for reading, and leave comments !!!.

Henry.



52 comentarios:

  1. Great instruction .
    At Step 12 it open the directory and in root is the folder Elastix where all drivers are located.
    Get stuck there

    ResponderBorrar
    Respuestas
    1. In step 12, you should select the last one from the list that is usually the USB, and in the second box you should write the folder in the USB where you copied the ISO (step 5), if you copied the ISO to the root folder of the USB just leave it black.

      Borrar
    2. Me too,
      after step 12 I got error message "Device /dev/sdb1 does not appear to contain Elastix CDROM images"

      Borrar
  2. I also got stuck on step 12 but then I re-read everything and found the important step 5: "Now let's copy the Elastix ISO to the USB". After I copied the Elastix ISO to the USB drive everything went smoothly.
    Thanks for a great work!

    JPP

    ResponderBorrar
  3. This doesn't work for me. Always fails at finding the install.img even though it's pointing to the correct place.

    ResponderBorrar
  4. That was a straight forward instruction there. I got stucked at a point where I got an error message that reads thus:

    Missing ISO 9660 image
    The installer has tried to mount image#1, but cannot find it on the hard drive. Please copy this image to the drive and click Retry. Click Exit to abort the installation.

    Meanwhile, I have already copied the ISO file to the USB before commencing installation. Am so confused. Please help. I Will be looking forward to hearing from you soonest. Thanks in advance.

    ResponderBorrar
  5. Amazing ..I was trying from more than 4 hours but I failed .now as per your instruction I have installed .thanks .

    ResponderBorrar
  6. awsome. it works.
    just follow the henry's guide, you can install it without trouble :)

    ResponderBorrar
  7. Thanks for the tutorial, but i have a problem, after press enter on default, the lines stay freeze on
    "io sheduler cfq registered (default)"
    Please help me.

    ResponderBorrar
  8. awesome tutorial. thank you very very very very much. i appreciate

    ResponderBorrar
  9. On syslinux.cfg, cant find what you say there, there's only these:
    DEFAULT loadconfig

    LABEL loadconfig
    CONFIG /isolinux/isolinux.cfg
    APPEND /isolinux/

    ResponderBorrar
    Respuestas
    1. According the experience I had following this instructions,it seems that you didn't use the UNetbootin to make the USB bootable. Use it so you can get the proper lines.
      I know this is a late recommendation, but might serve to any other with the same issue.

      Borrar
  10. Hi at select partition i see /dev/sda1 and /dev/sda2. I tried both and it says does not contain the image. So i tried pressing f2 and selecting sdb at driver disk source but still doesn't work. I edited all files like in your examples. Can please guide me. Thanks.

    ResponderBorrar
  11. Hi there,

    I have tried all possible way but without any success, it is still failed the kickstart file. I have followed your tutorial closely, I have triple checked everything.

    I'm trying to install the Elastix on Asus EEE PC 901.

    Can someone please help! is there any better and easier way to install Elastix from USB?

    Many thanks

    ResponderBorrar
    Respuestas
    1. me too....find error
      "cannot find kickstart file on hard drive"
      please give mo to solution

      Borrar
    2. I get ""cannot find kickstart file on hard drive"
      how ever I SOLVED IT putting /dev/sda1

      Because my hard disk is /dev/hda1
      So my USB Drive is /dev/sda1 instead /dev/sda2

      Good Look!


      Borrar
  12. Este comentario ha sido eliminado por el autor.

    ResponderBorrar
  13. Thank you MR.Henry
    Hope you the best

    ResponderBorrar
  14. Very Helpfull Henry Thanks !!!

    ResponderBorrar
  15. My server ProLiant ML10 v2 doesn't load the Elastix once I change the boot order to HDD. Do you have any why?

    ResponderBorrar
  16. Compa eres increible. Muy útil me encanto. Muchas gracias :)

    ResponderBorrar
  17. Compa eres increible. Muy útil me encanto. Muchas gracias :)

    ResponderBorrar
  18. What would be the changes to elastix 4.0 and be able to install from a USB?

    ResponderBorrar


  19. made my usb bootable with rufus 2.9 then open isolinux.cfg with notepad++ just change the line

    inst.ks=hd:sdb1:/ks/anaconda-ks.cfg quiet

    where sdb1 used to say cdrom

    ResponderBorrar
  20. my server is making USB as sda and hard disk as sdb what should i do

    ResponderBorrar
  21. What would be the changes to elastix 4.0 and be able to install from a USB?

    ResponderBorrar
  22. what would be necesary to change in order to make it work with an APU2 from PC ENGINES?

    ResponderBorrar
  23. Hello Henry, Thank you so much. It worked for me. But after putting password to freePBX admin, the prompt shows no elastix callcenter database found. What to do now.

    ResponderBorrar
  24. gracias , realmente se agradece el aporte, no muchos se toman el tiempo de ayudar a los demas, encontre pocos temas sobre esto , y el tuyo es el que funciono , gracias

    ResponderBorrar
  25. Excellent post, all work peferfect, Thanks a lot

    ResponderBorrar
  26. really useful. thank you vm.
    (for my fit-pc2 drives were hda and sda, not sda and sdb. but once changed these all runs fine)

    ResponderBorrar
  27. You are amazing man
    Thanks a million, you made this process runs like a piece of cake

    ResponderBorrar
  28. Can nicely write on similar topics! Welcome to here you'll find out how it should look. usb-c adapters

    ResponderBorrar
  29. Gracias Enrique.
    Supongo que tengo una nueva versión de ELASTIC, por eso hubo cosas que no coincidían. Pero lo deduje de tus instrucciones. Debajo dejo los cambios.

    1)_ "isolinux.cfg" (reemplacé todos los cdrom por sdb1)
    label linux
    kernel vmlinuz
    append ks=hd:sdb1:/ks_default.cfg initrd=initrd.img ramdisk_size=8192
    label rhinoraid
    kernel vmlinuz
    append ks=hd:sdb1:/ks_rhinoraid.cfg initrd=initrd.img ramdisk_size=8192
    label nochoice
    kernel vmlinuz
    append ks=hd:sdb1:/ks_nochoice.cfg initrd=initrd.img ramdisk_size=8192
    label manual
    kernel vmlinuz
    append initrd=initrd.img ramdisk_size=8192
    label local
    localboot 1

    2)_ "ks_default.cfg"
    #Use CDROM installation media
    #cdrom
    ignoredisk --drives=sdb

    #System bootloader configuration
    bootloader --location=mbr --driveorder=sda, sdb

    ResponderBorrar
  30. Get help installing PC software on your computer, including installing software on Windows 10 devices, in this free lesson.
    viber voice changer

    ResponderBorrar
  31. Your blog is amazing. Excellent work. keep it up. I'd like to see many more submissions from you in the future. This article is awesome. Super immersive.https://cracksys.com/bulk-image-downloader-crack/

    ResponderBorrar