Skip to content

Commit c206522

Browse files
authored
Merge pull request #317 from pcengines/update_auto_installation_pfsense_documentation
docs/pfsense_installerconfig.md: update file
2 parents 25044f0 + 6bca728 commit c206522

File tree

1 file changed

+87
-24
lines changed

1 file changed

+87
-24
lines changed

docs/pfsense_installerconfig.md

+87-24
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,86 @@
1-
Unattanded installation PFSense
1+
Unattended installation PFSense
22
===============================
33

4+
This document describes the process of preparing the automatic installer pFsense
5+
on a USB stick. The whole procedure was tested on Ubuntu.
6+
7+
Kernel installation
8+
-------------------
9+
10+
1. Download the required packages by running the following command:
11+
12+
```bash
13+
sudo apt install linux-headers-$(uname -r) linux-source$(uname -r | cut -d- -f1)
14+
```
15+
16+
1. Go to the indicated location and unzip the file named
17+
`linux-source-$(uname -r | cut -d- -f1).tar.bz2` as shown below:
18+
19+
```bash
20+
cd /usr/src/linux-source-$(uname -r | cut -d- -f1)/
21+
sudo tar xjf linux-source-$(uname -r | cut -d- -f1).tar.bz2
22+
```
23+
24+
1. After successfully unpacking, copy the files required for kernel installation
25+
by running the following commands:
26+
27+
```bash
28+
sudo cp ../linux-headers-$(uname -r)/Module.symvers linux-source-$(uname -r | cut -d- -f1)/
29+
cd linux-source-$(uname -r | cut -d- -f1)/
30+
sudo cp /boot/config-$(uname -r) .config
31+
```
32+
33+
1. Finally, build and install the kernel by running the following command:
34+
35+
```bash
36+
sudo make olddefconfig
37+
```
38+
39+
UFS module compilation
40+
-----------------------
41+
42+
1. Edit the `.config` file by setting the value of `UFS_FS_WRITE` to `y`.
43+
1. Prepare resources to compile the UFS module by running the following
44+
commands:
45+
46+
```bash
47+
sudo make prepare
48+
sudo make modules_prepare
49+
sudo make M=scripts/mod -j8
50+
sudo make M=fs/ufs modules -j8
51+
```
52+
53+
1. Copy the previously prepared files by running the following commands (To load
54+
an unsigned kernel module it is required to disable Secure Boot, otherwise it
55+
won't work):
56+
57+
```bash
58+
sudo cp /lib/modules/$(uname -r)/kernel/fs/ufs/ufs.ko /lib/modules/$(uname -r)/kernel/fs/ufs/ufs_backup.ko
59+
sudo cp fs/ufs/ufs.ko /lib/modules/$(uname -r)/kernel/fs/ufs/ufs.ko
60+
```
61+
62+
1. Load the UFS module by running the following commands:
63+
64+
```bash
65+
sudo depmod
66+
sudo modprobe ufs
67+
```
68+
69+
1. Mount the `FreeBSD_install` partition to properly configure the installer by
70+
running the following command(`X` depending on how many drives are connected
71+
to your computer):
72+
73+
```bash
74+
sudo mount -t ufs -o ufstype=ufs2 /dev/sdX5 /mnt
75+
```
76+
477
rc.local
578
--------
679

7-
After booting from USB stick installer rc.local is executed. Changes have to be
8-
applied to this file to eliminate interactive dialog options.
80+
After booting from the USB stick installer `rc.local` is executed. Changes have
81+
to be applied to this file to eliminate interactive dialog options. After
82+
mounting parition edit the `rc.local` file located in the `etc` folder by using
83+
`nano` or `vim` editors.
984

1085
1. Add environment variable defining terminal type:
1186

@@ -15,7 +90,7 @@ applied to this file to eliminate interactive dialog options.
1590
export TERM=vt100
1691
```
1792

18-
2. Comment out console type input:
93+
1. Comment out console type input:
1994

2095
```bash
2196
# Serial or other console
@@ -34,19 +109,10 @@ applied to this file to eliminate interactive dialog options.
34109
#TERM=${TERM:-vt100}
35110
```
36111

37-
3. Add reboot command after installerconfig finishes:
38-
39-
```bash
40-
if [ -f /etc/installerconfig ]; then
41-
bsdinstall script /etc/installerconfig
42-
reboot
43-
fi
44-
```
45-
46112
installerconfig
47113
---------------
48114

49-
**installerconfig** script is called if exists. If doesn't exist manual
115+
The `installerconfig` script is called if exists. If it doesn't exist manual
50116
installation is performed.
51117
52118
```bash
@@ -59,19 +125,16 @@ installation is performed.
59125
exit
60126
```
61127
62-
This file must be located in **/etc/** directory.
63-
64-
**/etc/installerconfig** script will install pfSense and replace all
65-
configuration files that we want to change before first boot.
66-
67-
Examples
68-
--------
128+
This file must be located in the `etc` directory. The `etc/installerconfig`
129+
script will install pfSense and replace all configuration files that we want to
130+
change before the first boot.
69131
70-
Example file, **installerconfig**, is located in **scripts/** directory.
132+
An example file is located
133+
[here](https://github.com/pcengines/apu2-documentation/blob/master/scripts/installerconfig).
71134
72135
Problems
73136
--------
74137
75-
During extracting distribution files phase installation sometimes hangs up.
76-
I've waited for 15 minutes and nothing happend. My solution was to reset
138+
During extracting distribution files phase installation sometimes hangs up. I
139+
waited for 15 minutes and nothing happened. My solution was to reset the
77140
platform.

0 commit comments

Comments
 (0)