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

    (solved)Automatic Boot from USB harddrive

    Scheduled Pinned Locked Moved General pfSense Questions
    30 Posts 6 Posters 27.8k 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.
    • M
      morocon
      last edited by

      @jimp:

      You cannot change the default of the boot menu in that way.

      I'm not sure how many different ways I can tell you this in the same thread, but you need to edit /boot/loader.conf.local and add

      kern.cam.boot_delay=10000
      

      It does not already exist there, you need to add it, not edit the value.

      The boot menu option only sets that variable. Adding it to loader.conf.local sets the value the same way.

      You could repeat it as long as you want, it doesn't work at all. Same result! If i'm not in front of the computer and select option 3 from the menu, PFsense did not boot up and just comes to prompt waiting for me to give instruction.

      Delay is not what i'm waiting for…How could i explain you this. I want the device to start on USB hard drive (where Pfsense is installed) even if i do not have keyboard nor screen. If it is not possible just say it.

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

        But I'm telling you that all option 3 does it set precisely that variable and nothing else related to bootup. It sets two others but they are related to network cards, not booting. Behold:

        From our beastie.4th patch that drives the menu:

        +		dup bootusbkey @ = if
        +			s" 0" s" hw.mca.enabled" setenv
        +			s" 0" s" hw.bce.tso_enable" setenv
        +			s" 10000" s" kern.cam.boot_delay" setenv
        
        

        So if you want to try adding the other two to /boot/loader.conf.local as well, try:

        hw.mca.enabled=0
        hw.bce.tso_enable=0
        kern.cam.boot_delay=10000
        

        Make sure when you edit that file that it's named properly (all lower case letters) and you probably should edit it from the shell with vi or ee to be safest.

        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
        • A
          acjohnson
          last edited by

          morocon-

          Have you even tried adding these options to the file yet? If you try it you may be pleasantly surprised that it works just as jimp has been telling you.

          Sorry for causing the confusion with the loader.conf.local file. Didn't realize I had to create it. I have just tested it and it works great.

          Thank you!

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

            Yes i have tried! but it did not boot on USB drive

            here is my beastie start section, i suspect something wrong in it

            
            : beastie-start
            	s" beastie_disable" getenv
            	dup -1 <> if
            		s" YES" compare-insensitive 0= if
            			exit
            		then
            	else
            		drop
            	then
            	beastie-menu
            	s" autoboot_delay" getenv
            	dup -1 = if
            		drop
            		10
            	else
            		0 0 2swap >number drop drop drop
            	then
            	begin
            		dup tkey
            		0 25 at-xy
            		dup 32 = if nip 0 swap then
            		dup -1 = if 0 boot then
            		dup 13 = if 0 boot then
            		dup bootkey @ = if 0 boot then
            		dup bootacpikey @ = if
            			acpienabled? if
            				s" acpi_load" unsetenv
            				s" 1" s" hint.acpi.0.disabled" setenv
            				s" 1" s" loader.acpi_disabled_by_user" setenv
            				s" 0" s" hw.mca.enabled" setenv
            				s" 0" s" hw.bce.tso_enable" setenv
            			else
            				s" YES" s" acpi_load" setenv
            				s" 0" s" hint.acpi.0.disabled" setenv
                                            s" 0" s" hw.mca.enabled" setenv
                                            s" 0" s" hw.bce.tso_enable" setenv
            			then
            			0 boot
            		then
            		dup bootsafekey @ = if
            			s" arch-i386" environment? if
            				drop
            				s" acpi_load" unsetenv
            				s" 1" s" hint.acpi.0.disabled" setenv
            				s" 1" s" loader.acpi_disabled_by_user" setenv
            				s" 1" s" hint.apic.0.disabled" setenv
                                            s" 0" s" hw.mca.enabled" setenv
                                            s" 0" s" hw.bce.tso_enable" setenv
            			then
            			s" 0" s" hw.ata.ata_dma" setenv
            			s" 0" s" hw.ata.atapi_dma" setenv
            			s" 0" s" hw.ata.wc" setenv
            			s" 0" s" hw.eisa_slots" setenv
            			s" 1" s" hint.kbdmux.0.disabled" setenv
            			s" 0" s" hw.mca.enabled" setenv
            			s" 0" s" hw.bce.tso_enable" setenv
            			0 boot
            		then
            		dup bootusbkey @ = if
            			s" 0" s" hw.mca.enabled" setenv
            			s" 0" s" hw.bce.tso_enable" setenv
            			s" 10000" s" kern.cam.boot_delay" setenv
            			0 boot
            		then
            		dup bootverbosekey @ = if
            			s" 0" s" hw.mca.enabled" setenv
            			s" 0" s" hw.bce.tso_enable" setenv
            			s" YES" s" boot_verbose" setenv
            			0 boot
            		then
            		dup bootsinglekey @ = if
            			s" 0" s" hw.mca.enabled" setenv
            			s" 0" s" hw.bce.tso_enable" setenv
            			s" YES" s" boot_single" setenv
            			0 boot
            		then
            		dup escapekey @ = if
            			2drop
            			s" NO" s" autoboot_delay" setenv
            			exit
            		then
            		rebootkey @ = if 0 reboot then
            	again
            ;
            
            previous
            

            I'm not confident with freebsd bash coding, but i suposed somewhere at the beginning of this section is defined what dup menu will be loaded as default. I would like ti to be bootusbkey. Unfortunatly, and even with modification you recommended, it doesn't start, but just come to a prompt that talk about vfs.mountfrom.options whish should have been set to read write.

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

              Nothing is wrong with that. As you can see the section I posted is within the part you posted (mine just had the +'s because it was from a patch file not the actual file, and I trimmed the surrounding irrelevant text).

              If the menu option worked but adding it to loader.conf.local does not, then you must not be putting the right values into loader.conf.local or the file isn't in the right place, or something else must be wrong.

              Further, you need to give exact precise error messages and not "a prompt that talk about vfs.mountfrom.options". Take a cell phone picture of the screen if you have to, but be precise.

              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
              • M
                morocon
                last edited by

                here it is:

                http://pfsensepict.dyndns.org

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

                  Sure that's the right URL?

                  Host pfsensepict.dyndns.org not found: 3(NXDOMAIN)
                  

                  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
                  • M
                    morocon
                    last edited by

                    oops, try again, it should be working now that i activated it! :)

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

                      Remove this from /boot/loader.conf and /boot/loader.conf.local

                      autoboot_delay="3"
                      

                      It probably is ignoring the other lines because it says there is a syntax error on that line.

                      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
                      • M
                        morocon
                        last edited by

                        Thaanks, do you have a sample of how it should be written?

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

                          /boot/loader.conf should probably be empty.

                          And if you want to mimic option 3 exactly, /boot/loader.conf.local should only contain:

                          hw.mca.enabled=0
                          hw.bce.tso_enable=0
                          kern.cam.boot_delay=10000
                          

                          Nothing else.

                          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
                          • M
                            morocon
                            last edited by

                            @jimp:

                            /boot/loader.conf should probably be empty.

                            And if you want to mimic option 3 exactly, /boot/loader.conf.local should only contain:

                            hw.mca.enabled=0
                            hw.bce.tso_enable=0
                            kern.cam.boot_delay=10000
                            

                            Nothing else.

                            Ok i will do so.

                            I found a file call loader.conf (<>loader.conf.local)where the " autoboot_delay="3" " is writen, what should i do with this one?

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

                              Remove it from both files.

                              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
                              • M
                                morocon
                                last edited by

                                @jimp:

                                Remove it from both files.

                                You are the hitman jimp!

                                Ok i guess there was some thing wrong in my usb drive, so i decided to start from scrash and re-install f sense on it.

                                Then i create the file /boot/loader.conf/local (as you recommended it) including

                                hw.mca.enabled=0
                                hw.bce.tso_enable=0
                                kern.cam.boot_delay=10000
                                

                                Then reboot, then….Miracle! It works!!

                                Thanks guys

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

                                  Same situation here. I'm using a 2,5 inch USB disk drive for my pfSense server. I needed to press 3 in the pfSense boot menu to get it to work. Using the steps outlined in this forum topic I was able to have it boot using USB support automatically. I have put the easy steps together in a tutorial at http://www.zomers.eu/knowledge/pfSense/Pages/Configure-pfSense-2.0-RC1-to-boot-from-USB-disk.aspx

                                  1 Reply Last reply Reply Quote 0
                                  • ?
                                    Guest
                                    last edited by

                                    Awesome .  thanks for the help.

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