Installing from USB Memory Stick

Hello,

Why is it that the freepbx team and / or CentOS developers are so obsessed with CDROM? It seems so strange that in 2012, this is the only “officially” supported installation medium. It’s like I’ve stepped into a time machine, who still uses CDs? It’s wasteful and ancient, and I wish you would consider supporting USB installation sources.

Wow attacking the dev team sure will get us to fulfill your request.

But hey maybe something like http://iso2usb.sourceforge.net/ will do what you want. I know I have used it before.

I’m sorry, I’ve just spent so much time trying to figure out how to install freepbx on a system without cdrom drive, and I’d just made it work for 1.8.29.55 using unetbootin (similar to the software you suggested I presume), and then the same procedure won’t work for the new versions.

In the hope that you’ll be able to look past my frustration, going for a possibility to install via USB would be a step in the right direction for you, as CDROM drives is indeed becoming a thing of the past.

I can confirm that this works with the newest stable 32bit full install as of today, thank you! :slight_smile: it works so well you should put a link to it and a little note about it next to the download button!

Although it seems to be based on unetbootin, it works where unetbootin fails.

It seems so strange that in 2012 people don’t know how to put a CD image on a USB stick… after all CD drives are becoming a thing of the past.

Last month I installed FreePBX on a SuperMicro 5015A-EHF-D525 from a USB stick, I don’t get what the big deal is.

Partition the stick, create a vfat filesystem, sys it, and then copy the cd image content… don’t forget to rename isolinux.cfg to syslinux.cfg

I guess you could say that, but since centos (at least with kickstart) seems incompatible with unetbootin (which works well for a boatload of other linux distros), I think it could be a good idea to point users to iso2usb, since it’s specially made for centos. Moreover, the processes you’re suggesting isn’t that easy for windows users.

For the Linux-challenged

Download the distro

([email protected]:~)# wget http://downloads.freepbxdistro.org/ISO/NetInstall/32bit/FreePBX-Distro-Net-32bit-1.811.210.57.iso
--2012-05-12 14:59:30--  http://downloads.freepbxdistro.org/ISO/NetInstall/32bit/FreePBX-Distro-Net-32bit-1.811.210.57.iso
Resolving downloads.freepbxdistro.org... 199.102.239.6, 66.147.162.254, 74.95.141.139
Connecting to downloads.freepbxdistro.org|199.102.239.6|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25573376 (24M) [application/octet-stream]
Saving to: `FreePBX-Distro-Net-32bit-1.811.210.57.iso'

100%[===================================================================================================================================================>] 25,573,376  78.3K/s   in 6m 56s

2012-05-12 15:06:27 (60.0 KB/s) - `FreePBX-Distro-Net-32bit-1.811.210.57.iso' saved [25573376/25573376]

Partition the USB stick. You’ll need to know the device it’s attached as and adjust as necessary.

Delete existing partitions THIS WILL DESTROY ALL DATA ON THE DEVICE
Create a new FAT32 primary partition marked as boot

([email protected]:~)# fdisk /dev/sdb

Command (m for help): d
Selected partition 1

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

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): b
Changed system type of partition 1 to b (W95 FAT32)

Command (m for help): a
Partition number (1-4): 1

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

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.

Prepare the file system and sys the device

([email protected]:~)# mkfs.vfat -n FreePBX /dev/sdb1
mkfs.vfat 2.11 (12 Mar 2005)
([email protected]:~)# syslinux -s /dev/sdb1

Mount the devices and copy the files

([email protected]:~)# mkdir /tmp/usb
([email protected]:~)# mount /dev/sdb1 /tmp/usb
([email protected]:~)# mkdir /tmp/img
([email protected]:~)# mount -ro loop FreePBX-Distro-Net-32bit-1.811.210.57.iso /tmp/img
([email protected]:~)# cp -prv /tmp/img/* /tmp/usb/
`/tmp/img/boot.cat' -> `/tmp/usb/boot.cat'
`/tmp/img/boot.msg' -> `/tmp/usb/boot.msg'
`/tmp/img/general.msg' -> `/tmp/usb/general.msg'
`/tmp/img/initrd.img' -> `/tmp/usb/initrd.img'
`/tmp/img/isolinux.bin' -> `/tmp/usb/isolinux.bin'
`/tmp/img/isolinux.cfg' -> `/tmp/usb/isolinux.cfg'
`/tmp/img/memtest' -> `/tmp/usb/memtest'
`/tmp/img/menu.c32' -> `/tmp/usb/menu.c32'
`/tmp/img/options.msg' -> `/tmp/usb/options.msg'
`/tmp/img/param.msg' -> `/tmp/usb/param.msg'
`/tmp/img/rescue.msg' -> `/tmp/usb/rescue.msg'
`/tmp/img/splash.lss' -> `/tmp/usb/splash.lss'
`/tmp/img/TRANS.TBL' -> `/tmp/usb/TRANS.TBL'
`/tmp/img/vmlinuz' -> `/tmp/usb/vmlinuz'

rename the bootloader config.

You may also need to append nousbstorage to the append line(s) in syslinux.cfg using vi (or equiv) or else its likely to discover the USB stick during install and try and install there rather than on the hard disk.

([email protected]:/tmp/usb)# mv /tmp/usb/isolinux.cfg /tmp/usb/syslinux.cfg

flush the cache and unmount the USB device; you’re all done.

([email protected]:/)# sync
([email protected]:/)# umount /tmp/usb

Great! Now we have two alternative ways to do this. Hope people will find this thread, or that it will be put into the installation guide :slight_smile:

I’ve these downloaded:

iso2usb-v0.7.zip
FreePBX-1.812.210.57-i386-Full-1336162969.iso

I am able to use iso2usb to create a flash drive that boots, but I get a message when the installer starts that begins with “unable to download the kickstart file…”

I edited the syslinux.cfg and added “nousbstorage” to the append lines.

Not sure if there is something else that needs to be done.

My flash drive is formatted FAT32:

E:]chkdsk e:
The type of the file system is FAT32.
The volume is in use by another process. Chkdsk
might report errors when no corruption is present.
Volume Serial Number is 4CFB-1C63
Windows is verifying files and folders…
File and folder verification is complete.
Windows has checked the file system and found no problems.

1,020,739,584 bytes total disk space.
16,384 bytes in 1 hidden files.
4,096 bytes in 1 folders.
772,710,400 bytes in 22 files.
248,004,608 bytes available on disk.

    4,096 bytes in each allocation unit.
  249,204 total allocation units on disk.
   60,548 allocation units available on disk.

E:]


And this is what the root folder looks like after iso2usb ran:

E:]dir
Volume in drive E has no label.
Volume Serial Number is 4CFB-1C63

Directory of E:\

05/30/2012 02:29 PM 747,595,776 linux.iso
05/04/2012 10:26 AM 1,770 TRANS.TBL
05/04/2012 10:26 AM 2,048 boot.cat
05/04/2012 10:26 AM 267 boot.msg
09/05/2011 01:53 AM 10,450,542 initrd.img
09/05/2011 01:53 AM 94,600 memtest
05/04/2012 10:26 AM 60,635 splash.lss
09/05/2011 01:53 AM 1,894,036 vmlinuz
05/30/2012 02:29 PM [DIR] isolinux
05/30/2012 02:29 PM 9,460 kickstart-advanced.cfg
05/30/2012 02:29 PM 12,108 kickstart-netinstall.cfg
05/30/2012 02:29 PM 11,625 kickstart-raid.cfg
05/30/2012 02:29 PM 9,804 kickstart-simple.cfg
05/30/2012 02:37 PM 725 syslinux.cfg
13 File(s) 760,143,396 bytes
1 Dir(s) 248,004,608 bytes free

E:]

And this is what the isolinux folder looks like after iso2usb:

E:\isolinux]dir
Volume in drive E has no label.
Volume Serial Number is 4CFB-1C63

Directory of E:\isolinux

05/30/2012 02:29 PM [DIR] .
05/30/2012 02:29 PM [DIR] …
05/04/2012 10:26 AM 1,770 TRANS.TBL
05/04/2012 10:26 AM 2,048 boot.cat
05/04/2012 10:26 AM 267 boot.msg
09/05/2011 01:53 AM 10,450,542 initrd.img
09/05/2011 02:19 AM 10,648 isolinux.bin
05/04/2012 10:26 AM 680 isolinux.cfg
09/05/2011 01:53 AM 94,600 memtest
05/04/2012 10:26 AM 60,635 splash.lss
09/05/2011 01:53 AM 1,894,036 vmlinuz
9 File(s) 12,515,226 bytes
2 Dir(s) 248,004,608 bytes free

E:\isolinux]

Any tips would be appreicated, thanks!

Woops, following-up on my own post…

THIS DOESN’T SEEM TO WORK with USB 3.0 ports. I didn’t even realize those were USB 3.0 ports on this motherboard. Switching the flash drive over to 2.0 ports seems to have done the trick.