You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since changes to root filesystem on the UDM/P are non-persistent. It is not
36
-
possible with the stock kernel to perform modification to the early boot
37
-
process (since the [on-boot-script](https://github.com/boostchicken/udm-utilities/blob/master/on-boot-script/README.md) only runs after UniFi OS is started).
38
-
This project enables you to modify the root filesystem before UbiOS is started.
39
-
See [Overriding files on root pre-boot](#overriding-files-on-root-pre-boot) for more information.
16
+
the device. Instead, it boots directly into the custom kernel from the stock
17
+
kernel using [kexec](https://en.wikipedia.org/wiki/Kexec) (see [How it works](#how-it-works)).
18
+
40
19
41
20
## Getting Started
42
21
### Disclaimer
@@ -46,21 +25,14 @@ Make sure you know what you are doing and ensure you have a **backup**!
46
25
I take no responsibility for any damage that might occur as result of using this
47
26
project.
48
27
49
-
### Entering UniFi OS
50
-
To start, SSH into your UniFi Dream Machine (Pro) and enter the UniFi OS shell
51
-
as follows:
52
-
```bash
53
-
unifi-os shell
54
-
```
55
-
56
28
### Installing udm-kernel-tools
57
29
Select from the [Releases](https://github.com/fabianishere/udm-kernel-tools/releases) page
58
30
the package version you want to install and download the selected Debian package,
@@ -110,18 +82,6 @@ To disable this functionality again, run the following command:
110
82
systemctl disable udm-autoboot.service
111
83
```
112
84
113
-
### Overriding files on root pre-boot
114
-
Some users may wish to modify files on the root filesystem before UniFi OS boots
115
-
(e.g., to hook into the early boot process).
116
-
In order to facilitate this, `udm-kernel-tools` allows users to override files
117
-
from the root filesystem using an overlay located at `/mnt/data/udm-kernel-tools/root`,
118
-
119
-
The overlay filesystem will be mounted *only* after running
120
-
`mkdir -p /overlay/root_ro/mnt/data/udm-kernel-tools/root` from within the *UniFi OS* shell
121
-
or when running `mkdir -p /data/udm-kernel-tools/root` from outside UniFi OS.
122
-
123
-
Note that changes to this directory only appear on the root filesystem after
124
-
reboot.
125
85
126
86
### Restoring the stock kernel
127
87
If you are running a custom kernel and wish to return the stock kernel, simply
@@ -141,19 +101,9 @@ apt remove 'udm-kernel*'
141
101
This will remove the artifacts on your device related to this project.
142
102
143
103
## Compatibility
144
-
Since the project requires firmware-specific binaries (e.g., kernel modules), you
145
-
possibly need to upgrade the tools after you have upgraded to a new firmware version.
146
-
Currently, the releases of this project support the following firmware versions:
147
-
148
-
- 1.8.6
149
-
- 1.9.3
150
-
- 1.10.0
151
-
- 1.10.4
152
-
- 1.11.0
153
-
- 1.11.4
154
-
- 1.12.22
155
-
- 1.12.30
156
-
- 1.12.33
104
+
From version 2 onwards, only UniFi Dream Machine (Pro) firmware versions 2 and
105
+
above are supported by this project. If you need support for older firmware,
106
+
please install any of the versions below 2.
157
107
158
108
To build the project for custom firmware versions, please refer to the [Maintenance Guide](MAINTENANCE.md).
159
109
@@ -185,7 +135,7 @@ be able to log back in to your device after a minute.
185
135
Questions, suggestions and contributions are welcome and appreciated!
186
136
You can contribute in various meaningful ways:
187
137
188
-
* Report a bug through [Github issues](https://github.com/fabianishere/udm-kernel-tools/issues).
138
+
* Report a bug through [GitHub issues](https://github.com/fabianishere/udm-kernel-tools/issues).
189
139
* Propose and document use-cases for using this project.
190
140
* Contribute improvements to the documentation.
191
141
* Provide feedback about how we can improve the project.
@@ -202,8 +152,8 @@ Although [udm-unlock](https://github.com/fabianishere/udm-unlock) can be used
202
152
to overwrite the kernel boot image or root filesystem, such an approach is fragile
203
153
and might lead to a bricked device.
204
154
205
-
To prevent touching the UDM/P firmware for booting a custom Linu kernel, we can
206
-
employ Linux' [kexec](https://en.wikipedia.org/wiki/Kexec) functionality, which
155
+
To prevent touching the UDM/P firmware for booting a custom Linux kernel, we can
156
+
employ Linux's[kexec](https://en.wikipedia.org/wiki/Kexec) functionality, which
207
157
enables Linux to act as a second stage bootloader for a custom kernel.
208
158
209
159
Since _kexec_ is not supported natively by the stock kernel running on the
@@ -213,11 +163,5 @@ These tools use the _kexec_ backport to load a custom kernel into memory and boo
213
163
directly into the custom kernel. With this, we do not need to modify the device
214
164
firmware and in case of issues, we can simply power-cycle the device.
215
165
216
-
While we can now boot into a custom Linux kernel, we will find that UbiOS requires
217
-
several proprietary kernel modules to properly function. To address this issue,
218
-
during the [initramfs phase](https://en.wikipedia.org/wiki/Initial_ramdisk), we
219
-
prepare a workaround that force-inserts the proprietary modules into the kernel,
220
-
even when the versions do not match (see [here](https://github.com/fabianishere/udm-kernel-tools/blob/32f0816089c5187f4ff13e3c68f9ea2f6325c591/udm-init#L45) for the implementation).
221
-
222
166
## License
223
167
The code is released under the GPLv2 license. See [COPYING.txt](/COPYING.txt).
0 commit comments