Jump to content






Photo

PFSense update and tweaking

Posted by pete_c , 06 May 2017 · 120 views

Just a quick entry relating to PFSense.
 
Updated PFSense this past week with no issues.
 
2.3.4-RELEASE (amd64)
built on Wed May 03 15:13:29 CDT 2017
FreeBSD 10.3-RELEASE-p19
 
Never really paid much attention to how slow it was booting.  I did upgrade the old notebook SATA drive on it to a 32Gb SSD in the last few months. 
 
For quicker boot times it is suggested to remove the F1 boot prompt.
 
The following documentation comes from PFSense documentation.  It took about 3 minutes to implement this change and yes it now boots up in seconds.
 
To (slightly) decrease boot time for a full install, the multi-boot capabilities of the boot manager can be removed if they are not needed.
 
NOTE: Do not attempt this on NanoBSD as it relies on the boot manager for required functionality.
 
To remove the boot manager, the boot code on the main disk in the system must be reinitialized. This is typically ad0 or ada0 when using an IDE/SATA disk, or da0 for SCSI or USB, but it may vary.
 
Check the contents of /etc/fstab or the output of df to find the disk holding the root (/) slice. For this, we will assume ada0.
 
First, set a special debug mode that allows writing to the early parts of the disk. This enables the so-called "foot shooting mode" so be careful!
 
1 - enable "foot shooting mode" at a terminal prompt.
# sysctl kern.geom.debugflags=16
2 - run
# fdisk -B ada0
3 - you will see something like this:
 
******* Working on device /dev/ada0 *******
parameters extracted from in-core disklabel are:
cylinders=1116 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=1116 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 17928477 (8754 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 91/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
Do you want to change the boot code? [n] y

We haven't changed the partition table yet.  This is your last chance.
parameters extracted from in-core disklabel are:
cylinders=1116 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=1116 heads=255 sectors/track=63 (16065 blks/cyl)

Information from DOS bootblock is:
1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 17928477 (8754 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 91/ head 254/ sector 63
2: <UNUSED>
3: <UNUSED>
4: <UNUSED>
Should we write new partition table? [n] y
fdisk: Class not found
4 - Answer y to both prompts. The Class not found error at the end can be ignored. The F1 Prompt is now gone.
 
Now either reboot, or run:
# sysctl kern.geom.debugflags=0
Which will disable the "foot shooting mode" and also stop printing geom debug messages to the console.
If this error is received:
 
fdisk: failed to write sector zero
 
Then something didn't take with the debugflags sysctl line. Try it again, ensuring everything was typed exactly as shown above.

 
 
 




May 2017

S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28 293031   

Recent Comments