(solved)Automatic Boot from USB harddrive
-
If it does work when using that option, but not when left alone, just make that setting permanent. It's described here:
http://doc.pfsense.org/index.php/Boot_TroubleshootingJust need to add
kern.cam.boot_delay=10000
To /boot/loader.conf.local
-
Thanks for your help, but maybe i was not clear enough (please appologize if so)ā¦.
when i said
"I would like to modify the default value which start after 3 seconds, and that is actualy pointing to embed harddrive to USB."I do not want to modify the 3 secondes delay. I want to change the default boot...I want my device to boot automaticly on USB drive.
I did not see any information on your url related to USB drive boot automaticly....I do not have /dev/ad0 or /dev/ad0s1
on this device...I only have usb drive.regards
-
Then perhaps there is some confusion here.
What is not automatic? What exactly do you have to do manually to make it work?
Does it start to boot and then stop at a mountroot> prompt?
-
Ok i will try to be as clear as possibleā¦.
The device i used did not have hard disk nor flash memory.
So i installedĀ pfsense on 40Go Usb hard drive with Usb memory stick.
it works but i should be in front of the device with keyboard and screen each time i boot it up in order to selest the boot option (start from USB) in order it load pfsense. What i want it just that the device start directly from the usb hard drive it was installed without any human action.
I guess i have to modify the bot up menu, but don't know where it is loacated and how to do so.
-
Then ā as I mentioned before -- make the loader.conf.local changes I suggested. That's what the menu option does, it adds that delay setting.
-
ok i will give it a try and come back for feed back.
regards
-
I've actually been having the same issue but wanted to search the internet plenty before posting. Glad I waited.
I have tried the above mentioned fix and it works. I am also using pfsense v2.0 beta 5 and the file on my box was actually /boot/loader.conf
This file is empty by default and it is there specifically to add overrides to the default loader configuration.
I am liking the idea of using pfsense to boot off of a flashdrive that is plugged directly to the motherboards usb header using an adapter. This way the flash drive will not get messed with, plus it's almost as good as a solid state drive because it will likely never go bad.
Seems to me that pfsense loads most of what it does into memory so a slow usb flash drive should affect perf much should it? (besides swap of course)
Also, will this file be preserved after an update?
-
Don't touch loader.conf - use loader.conf.local - create it if it does not exist.
loader.conf.local is not touched by the upgrade process, but loader.conf may be overwritten.
-
After a short check, it seems that what i'm looking for is not in loader.conf.
I took a picture of the menu i would like to modify:
I would likeĀ menu "3 Boot PFsense Using USB device" to take place as "1 Bot Pfsense [default]". I did not find any mention on this subject in loader.conf.
Coudl some one put light on this?
Thanks
-
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 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.
-
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.
-
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!
-
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.
-
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.
-
here it is:
http://pfsensepict.dyndns.org
-
Sure that's the right URL?
Host pfsensepict.dyndns.org not found: 3(NXDOMAIN)
-
oops, try again, it should be working now that i activated it! :)
-
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.
-
Thaanks, do you have a sample of how it should be written?