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
Copy file name to clipboardexpand all lines: docs/GettingStarted.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -160,9 +160,9 @@ To enable NFS mounted root partition:
160
160
1) Run the ONL installer normally (e.g., via the manual mode per above) so that the ONL
161
161
loader is installed.
162
162
163
-
2) Edit /mnt/flash/boot-config, enable DHCP, and change the SWI variable to point to a URL of the form "nfs://$ip[:port]/path/to/directory/". For example, on my machine, this looks like:
163
+
2) Edit /mnt/onl/boot/boot-config, enable DHCP, and change the SWI variable to point to a URL of the form "nfs://$ip[:port]/path/to/directory/". For example, on my machine, this looks like:
164
164
165
-
# cat /mnt/flash/boot-config
165
+
# cat /mnt/onl/boot/boot-config
166
166
SWI=nfs://10.6.0.4/home/robs/export/ly2-1/ # trailing '/' is critical
Copy file name to clipboardexpand all lines: docs/PersistWorkflow.md
+5-31
Original file line number
Diff line number
Diff line change
@@ -18,38 +18,12 @@ It has the following properites:
18
18
19
19
* Any file that is editted/removed/etc is transparently copied into a RAM disk via overlayfs
20
20
* Thus, any changes to files appear as you would expect, until a reboot
21
-
* Any file that is uneditted remains backed by the /mnt/flash2 file system, so you
21
+
* Any file that is uneditted remains backed by the /mnt/onl/data file system, so you
22
22
do not need to have enough RAM to store the entire rootfs. This is important with
23
23
switches that do not have much RAM to begin with.
24
24
25
-
That said, ONL does have a provision to persist explicitly marked files
26
-
across a reboot. This document shows how this works.
25
+
If you want to persist files, you can either install the image directly to disk using
26
+
the Installed installer, put debian files to the /mnt/onl/data/install-debs directory.
27
+
Or use rc.boot files to do system management (/mnt/onl/$dir/rc.boot)
27
28
28
-
29
-
# Persisting Files
30
-
31
-
Just run `/sbin/persist /path/to/file` to mark a file as 'persisted'. This
32
-
file will be saved to the /mnt/flash persistent storage device and automatically
33
-
put back into place on reboot. Once a file has been persisted, it will always
34
-
be persisted across reboots. If you really want to unpersist a file, manually remove it from
35
-
'/persist/rootfs/path/to/file'.
36
-
37
-
# Under the covers
38
-
39
-
Running `/sbin/persist file` makes a hardlink of that file, e.g., /foo/bar/baz, to
40
-
/persist/rootfs/foo/bar/baz.
41
-
42
-
The `/etc/init.d/restorepersist` script runs on bootup and does a number of things:
43
-
44
-
* Restores the previously saved cpio archive from /mnt/flash/persist/rootfs into both / and /persist/rootfs
45
-
* Sets up hard links between /persist/rootfs/foo/bar/baz and /foo/bar/baz
46
-
* Starts a `watchdir` process for changes in /persist/rootfs
47
-
48
-
`watchdir` in turn uses the inotify(3) subsystem to, upon a change, run `/sbin/savepersist /persist/rootfs`.
49
-
50
-
And so, any change to a persisted file is noticed by watchdir and saved
51
-
to /mnt/flash in a cpio archive automatically using /sbin/savepersist.
52
-
53
-
# Limitations
54
-
55
-
You cannot persist any file that is read/used before `/etc/rcS.d/S03restorepersist` is run, including this script itself. Also, it is NOT recommended for persisting logging files, e.g., /var/log/*. While technically this will work, you will likely quickly exceed the write cycle limit of the underlying flash memory. Better to use a syslog server.
29
+
Packages present and listed in /mnt/onl/data/install-debs/list will be installed.
0 commit comments