Pages

Senin, 06 Juni 2011

F1 Boot Remove Prompt


If you want to (slightly) increase your pfSense Full Install's boot time, and you will never need the muli-boot capabilities of the boot manager, it can be removed.
NOTE: Do not attempt this on NanoBSD, it relies on the boot manager for required functionality.
To remove the boot manager, you need to reinitialize the boot code on the main disk in the system. This is typically ad0 if you use 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 your root slice. For this, we will assume ad0.
First, you need to 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!

# sysctl kern.geom.debugflags=16
 
Now, run:
 
# fdisk -B ad0 <-----change with your harddisk

The output will look something like this:
******* Working on device /dev/da0 *******
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
You should answer 'y' to both prompts. The "Class not found" error at the end can be ignored. The F1 Prompt should now be gone.
You should 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 you get this error:
fdisk: failed to write sector zero
 
from :  http://doc.pfsense.org/index.php/Remove_F1_Boot_Prompt
 

Tidak ada komentar:

Posting Komentar