Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to create bootable USB installer from 'memstick' IMG download?

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    19 Posts 7 Posters 49.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rmflint
      last edited by

      I re-downloaded the memstick i386 version then unzipped it onto my Ubuntu desktop folder. I then opened terminal and umouted the device (4GB USB Flash stick) then ran the following 'dd' command.

      dd if=/home/daf/Desktop/pfSense-memstick.img of=/dev/sdb1 bs=16k

      There where no errors generated so I assumed it ran correctly. After running the 'dd' command I was unable to mount the USB drive from the terminal or gparted but I assumed this was a normal result of the data overwritten onto the drive. I then restarted the PC with the USB drive plugged in. It appeared to ignore the drive and proceeded to boot from the internal hard drive into Ubuntu. This was done on my test PC which is an old emachine with an AMD Athlon 64 Processor 3800+. Also, as I noted before, I was able to load and test pfSense on this PC using a Live CD disk but this is not an option for the other mini-ITX PC I want to load pfSense to since it does not have a CD drive.

      The PC I want to finally install pfSense on is a mini-ITX. I believe the mobo is made by Jetway. The modo model number is 7F2WE1G-OC-PB. The CPU is and Intel socket 370, version VIA C7 running at 1000MHz. It has a 40GB internal drive which is where I ultimately want to install pfSense to. I was able to use the same USB Flash drive to load and run Ubuntu 13.04 from their Live CD ISO just to make sure it could load and run Linux.

      I want to install pfSense to the mini-ITX hard drive (SATA drive, not SSD) and use it as a standalone router only.

      1 Reply Last reply Reply Quote 0
      • R
        rmflint
        last edited by

        @rmflint:

        I re-downloaded the memstick i386 version then unzipped it onto my Ubuntu desktop folder. I then opened terminal and umouted the device (4GB USB Flash stick) then ran the following 'dd' command.

        dd if=/home/daf/Desktop/pfSense-memstick.img of=/dev/sdb1 bs=16k

        There where no errors generated so I assumed it ran correctly. After running the 'dd' command I was unable to mount the USB drive from the terminal or gparted but I assumed this was a normal result of the data overwritten onto the drive. I then restarted the PC with the USB drive plugged in. It appeared to ignore the drive and proceeded to boot from the internal hard drive into Ubuntu. This was done on my test PC which is an old emachine with an AMD Athlon 64 Processor 3800+. Also, as I noted before, I was able to load and test pfSense on this PC using a Live CD disk but this is not an option for the other mini-ITX PC I want to load pfSense to since it does not have a CD drive.

        The PC I want to finally install pfSense on is a mini-ITX. I believe the mobo is made by Jetway. The modo model number is 7F2WE1G-OC-PB. The CPU is and Intel socket 370, version VIA C7 running at 1000MHz. It has a 40GB internal drive which is where I ultimately want to install pfSense to. I was able to use the same USB Flash drive to load and run Ubuntu 13.04 from their Live CD ISO just to make sure it could load and run Linux.

        I want to install pfSense to the mini-ITX hard drive (SATA drive, not SSD) and use it as a standalone router only.

        I just did a test to verify that my test pc could actually boot from a USB drive by creating an Ubuntu installer using their ISO download. I created the USB drive installer using Ubuntu's 'Startup Disk Creator' application. After restart, my system had no problem booting from the USB drive. Therefore, this leads me to believe that using just the 'dd' command to write the pfSense IMG/ISO download to the USB flash drive is not the only step required. What else could be required? Are there any config files which need to be changed? A special boot loader?

        Can anyone tell the steps they might have used to create a working installer on a USB flash/thumb drive???

        1 Reply Last reply Reply Quote 0
        • G
          gderf
          last edited by

          The easiest way for you to get this done is to remove the 40 GB internal drive from the mini-ITX and install it into a machine that has a CD drive in it, boot the pfsense Live CD, and install pfsense to the 40 GB internal drive. Then remove the 40 GB internal drive and put it back into the mini-ITX.

          1 Reply Last reply Reply Quote 0
          • W
            wallabybob
            last edited by

            @rmflint:

            I re-downloaded the memstick i386 version then unzipped it onto my Ubuntu desktop folder. I then opened terminal and umouted the device (4GB USB Flash stick) then ran the following 'dd' command.

            dd if=/home/daf/Desktop/pfSense-memstick.img of=/dev/sdb1 bs=16k

            The of parameter should have been /dev/sdb to write the disk image to the whole disk (including the MBR, Master Boot Record) rather than /dev/sdb1 which writes it partition 1 (which doesn't update the MBR and hence does make the disk bootable and doesn't write the pfSense boot loader to the MBR and following sectors). The power of 1!

            @gderf:

            The easiest way for you to get this done is to remove the 40 GB internal drive from the mini-ITX and install it into a machine that has a CD drive in it, boot the pfsense Live CD, and install pfsense to the 40 GB internal drive. Then remove the 40 GB internal drive and put it back into the mini-ITX.

            I think this is probably the easiest way if you can't write the image to the USB stick in the correct way (you might not have the necessary privileges), or you then have trouble booting from the USB stick. If you do adopt this course, take care you don't overwrite the system disk on the other machine!

            1 Reply Last reply Reply Quote 0
            • R
              rmflint
              last edited by

              Thanks everyone for your advice. After numerous tries I was unable to create a bootable memstick installer. Therefor I went to plan B: Connected CD drive directly to mini-itx pc and installed from live-cd with no apparent problems on install.

              Unfortunately, I have now spent many frustrating hours trying to successfully connect a client machine to the pfsense box. After setting up the WAN (rl0) and LAN (fwe0) ports I still can't get either my linux pc or Mac to open the webgui via http://192.168.1.1. I thought maybe it was something as simple as the incorrect type of cable so I tried a crossover cable between the machines and still no luck. Can anyone tell me what I am missing or how to test/trouble shoot my setup???

              1 Reply Last reply Reply Quote 0
              • M
                mr_bobo
                last edited by

                @rmflint:

                After setting up the WAN (rl0) and LAN (fwe0) ports I still can't get either my linux pc or Mac to open the webgui via http://192.168.1.1. I thought maybe it was something as simple as the incorrect type of cable so I tried a crossover cable between the machines and still no luck. Can anyone tell me what I am missing or how to test/trouble shoot my setup???

                Are you sure the box you're trying to connect from is on the same subnet as your pfSense box? For example, the UNIX command to change your Linux box to the same subnet as your pfSense box would be:

                # ifconfig fwp0 inet 192.168.1.100 netmask 255.255.255.0
                

                If I work on my modem by connecting directly to it I have to change my machine LAN IP to match the subnet (I know that's the hard way to do things) then back to my pfSense box subnet after I'm done to be able to log onto my LAN.

                1 Reply Last reply Reply Quote 0
                • W
                  wallabybob
                  last edited by

                  @rmflint:

                  After setting up the WAN (rl0) and LAN (fwe0) ports I still can't get either my linux pc or Mac to open the webgui via http://192.168.1.1.

                  fwe is Ethernet emulation on FireWire. I suspect that is NOT the interface you want to use. Please post the output of pfSense shell command ifconfig so we can see what interfaces are present. I presume there is an onboard NIC. Have you added another NIC?

                  1 Reply Last reply Reply Quote 0
                  • W
                    wallabybob
                    last edited by

                    Issue resolved: see http://forum.pfsense.org/index.php/topic,62073.msg335045.html#msg335045

                    1 Reply Last reply Reply Quote 0
                    • T
                      teknophile
                      last edited by

                      @cmb:

                      dd is all you need, but make sure it's un-gzipped before you dd it.

                      same issue, and it is unzipped, USB stick is erased

                      sudo dd if=pfSense-memstick-2.0.3-RELEASE-amd64.img of=/dev/disk1 bs=1k
                      

                      command completes successfully, but it isn't possible to boot from the stick.
                      is there a preferred command to unzip the image maybe? I've been letting OSX handle it.

                      1 Reply Last reply Reply Quote 0
                      • jimpJ
                        jimp Rebel Alliance Developer Netgate
                        last edited by

                        BSD:

                        gzip -dc whatever.img.gz | dd of=/dev/adX
                        

                        or

                        gzip -dc whatever.img.gz | dd of=/dev/adX obs=64k
                        

                        Mac:

                        gzcat whatever.img.gz | dd of=/dev/diskX
                        

                        (Make sure diskX is not mounted and has no mounted slices first)

                        Linux:

                        gunzip -c whatever.img.gz | dd of=/dev/hdX
                        

                        Windows:
                        Use Win32 Disk Imager or Physdiskwrite/PhysGUI, make sure to remove existing partitions in Disk Manager to be sure it's getting a clean write.

                        It should "Just Work" in terms of booting. If it was written correctly, it's up to the BIOS from there. And the USB key can play a part in it. For example, my Soekris net6501 will boot on less than half of my USB sticks, due to quirks in its BIOS when dealing with older sticks.

                        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                        Need help fast? Netgate Global Support!

                        Do not Chat/PM for help!

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.