1
- Unattanded installation PFSense
1
+ Unattended installation PFSense
2
2
===============================
3
3
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
+
4
77
rc.local
5
78
--------
6
79
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.
9
84
10
85
1 . Add environment variable defining terminal type:
11
86
@@ -15,7 +90,7 @@ applied to this file to eliminate interactive dialog options.
15
90
export TERM=vt100
16
91
```
17
92
18
- 2 . Comment out console type input:
93
+ 1 . Comment out console type input:
19
94
20
95
` ` ` bash
21
96
# Serial or other console
@@ -34,19 +109,10 @@ applied to this file to eliminate interactive dialog options.
34
109
# TERM=${TERM:-vt100}
35
110
` ` `
36
111
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
-
46
112
installerconfig
47
113
---------------
48
114
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
50
116
installation is performed.
51
117
52
118
```bash
@@ -59,19 +125,16 @@ installation is performed.
59
125
exit
60
126
```
61
127
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.
69
131
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).
71
134
72
135
Problems
73
136
--------
74
137
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
77
140
platform.
0 commit comments