1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you had a PIAF Forum account in the vBulletin days, log in with your old credentials. Otherwise, sign up again and we'll get you back in business as soon as we can.
  3. A serious FreePBX vulnerability has been reported. Update your Framework Module immediately. Click here for details.
  4. Critical FreePBX vulnerability! Update your server immediately. Details here.

TUTORIAL Create a PIAF2 Thumb Drive

Discussion in 'Developers' Corner' started by wardmundy, Feb 13, 2012.

  1. wardmundy Nerd Uno

    There's finally an easy way to roll your own bootable USB thumb drive using the latest 32-bit PIAF2 ISO. We have barely tested this so you are an official PIONEER by proceeding...

    [IMG]

    Alex Agranov has expanded on the work of the UNetbootin project to create ISO2USB which does just what it says.
    It creates a bootable USB thumb drive from a CentOS 5 or CentOS 6 ISO including the 32-bit PIAF2 ISO!

    [IMG]

    This is a Windows app that runs on the Windows XP/Vista/7 platform.

    First, download and install the latest version of ISO2USB from this link.

    Next, download and install the HP Formatting Utility.

    Next, insert a 1GB or larger USB flash drive into an available port on your Windows machine. Partition and format the thumb drive using the HP Formatting Utility. The setup screen should display the proper Drive letter for your thumb drive. Be sure by checking with Windows Explorer. You do NOT want to accidentally reformat your Windows hard disk! HINT: Quick format works just fine.

    Next, download a copy of the 32-bit PIAF2 ISO onto your Windows Desktop.

    Next, with the flash drive still inserted on your Windows machine, run the ISO2USB app. The install screen shown above will appear, and the bottom line should display the proper Drive letter for your thumb drive. Be sure by checking with Windows Explorer. You do NOT want to accidentally damage your Windows hard disk!

    Next, click on the ... button to the right of DiskImage ISO and choose the PIAF2 ISO on your Desktop.

    Here's the tricky part. You need to know the drive names of the devices on the target machine where you will use this thumb drive. Try these commands on target machine: dmesg | grep logical AND dmesg | grep sectors.
    For most modern machines with IDE drives, the names will be sda, sdb, etc. For older machines, they may be hda, hdb. You'll know if it doesn't work. :cool:

    There's also a little surprise with CentOS 6.x. Whenever you boot a machine using a USB flash drive with CentOS 6.x, the device names get switched, and the USB boot device becomes sda even if your hard disk on the system shows up as sda when it is running without a thumb drive. :crazy:

    So... in the ISO2USB setup, change the Hard Disk Name to sdb, and change the USB Device Name to sda. This assumes the first hard disk on your target machine is where you want to install PIAF2. Make adjustments accordingly.


    Double-check your entries and then click OK to create the thumb drive from the PIAF2 ISO.

    Boot your target machine with the new thumb drive and make sure everything works. Please report your results below.


    Special thanks to Hyksos for the heads up on ISO2USB.
  2. Hyksos Guru

    Yeah it works well, but I was only able to test it on VMware (no available physical that can boot from usb...) and you do have make sure the sda sdb stuff is right for your machine.

    I did notice that centos 6 put the usb at sda at the HD at sdb. Once it's completed and the key is no longer there your hd goes back to sda. At least for me it's what happened in VMware.

    If the key knows the sda sdb correctly it does work like a charm without messing with what is on the key.

    I personnaly did not need to use the HP utility. Simple format gui from windows explorer did the trick for me everytime. Maybe YMMV but for me not special format tool was needed, maybe Ward you can check on a physical if letting go of the HP tool breaks your procedure.

    And sorry for keeping it for myself, I was unsure it could benefit someone unless I figured out a really reliable way for managing the sda sdb situation and also, I couldn't test with something else then VMware so I though it needed more work before I shared it.
  3. Graham_UK New Member

    No problems apart from keyboard (presumably not PIAF problem) - installed on Intel Atom based machine, swapped sda sdb as per instructions - all OK. Had already formatted USB stick as FAT so don't know about using windows format.
  4. bmore Guru

    Ward,

    This worked perfectly for me with an Acer Revo. Great work by Alex Agranov in expanding Unetbootin. Thanks Hyksos.

    I have been so busy I could not find the time to experiment with the usb install for Centos 6.

    Couple of notes. Be sure to remove the usb thumb drive after Centos install completes and the machine reboots.

    Centos 6 making the flash drive sda is great and solves the biggest headache I had getting the original usb piaf boot to work.

    Install routines which operate before much of the operating system core and services are available have a hard time if the drive is not standardized. For example in Dos and Windows, the first floppy drive was always A:, the first hard drive C: etc.

    The CD install process worked great for Centos because it simply looked for the install media on the first CD-rom drive. With Centos 5, install from a flash drive meant the flash drive could be at a varied locations depending on installed number of hard drives and type (at sda, sdb, sdc etc). There was no easy I found to detect the first removable drive.

    Making the flash drive sda is great since the install routines now just has to look for the install files on sda and the first hard drive at sdb.
  5. Should your BIOS not support booting from USB Flash but your PC has a CD drive.... you can use this utility to allow an older PC to boot from the USB and continue the install....

    http://www.plop.at/en/ploplinux.html#windows

    Simply burn the iso file to a CD. Have the PC boot from CD, Select PLOP Boot Manager from the Menu, Select USB and your on your way. The process will continue as if you had been able to boot from the USB Flash.

    This will still be faster than just using the PIAF CD and you'll save money burning CD's

    Brian
    [IMG]
  6. Hyksos Guru

    also...

    This is what one can use to boot a usb key from a VMware vm. Not that anybody care about that... ;)
  7. bugtel New Member

    Tested this on an Atom-based PC with SSD. For some reason, this PC needed the Hard Disk name to be "sdd" and the USB Device Name to be "sda". Took me a while to figure that one out, but it looks like it's installing now!
  8. wardmundy Nerd Uno

    With CentOS 6, sda for the flash drive seems to be a constant. For the server drive, you pretty much have to go up the alphabet. Sorry but it seems to depend on the BIOS manufacturer. Acer machines are sdb, AMD BIOS is sdc. And now we have an sdd Atom machine as well. How will you know if you picked the wrong letter? Phase II of the PIAF2 install (after CentOS 6.2 load and reboot) never appears. So just rebuild your thumb drive with the next letter and try again. You'll know when it works.

Share This Page