This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
usb_formatting_with_swap_partition [2023/07/14 18:30] – [Final setup] -fix broken Overview link hogwild | usb_formatting_with_swap_partition [2024/03/27 15:32] (current) – [Deactivating the Swap Partition (Pre-unmount command)] -condense hogwild | ||
---|---|---|---|
Line 6: | Line 6: | ||
For this example, we use a 16GB USB flash drive seen in the system as device **sda**. | For this example, we use a 16GB USB flash drive seen in the system as device **sda**. | ||
- | |||
===== Automatic method ===== | ===== Automatic method ===== | ||
Line 36: | Line 35: | ||
\\ | \\ | ||
- | |||
===== Manual method ===== | ===== Manual method ===== | ||
Line 96: | Line 94: | ||
</ | </ | ||
- | \\ \\ | + | |
<code -> | <code -> | ||
Line 108: | Line 106: | ||
\\ | \\ | ||
+ | |||
+ | |||
+ | ===== Configuring Post-mount and Pre-unmount Commands ===== | ||
+ | |||
+ | For best practice, the swap partition should be activated as swap once the USB drive/flash is mounted. Additionally, | ||
+ | |||
\\ | \\ | ||
+ | |||
+ | ==== Activating Swap Partition (Post Mount Command) ==== | ||
+ | |||
+ | To activate the swap partition you created on the drive, enter the following into the "**Run after mounting**" | ||
+ | |||
+ | \\ | ||
+ | |||
+ | <code -> | ||
+ | swapon /dev/sda2 | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | The field should look like this: | ||
+ | |||
+ | {{: | ||
+ | You may have additional commands within the field. | ||
+ | )) | ||
+ | |||
+ | \\ | ||
+ | |||
+ | |||
+ | ==== Deactivating the Swap Partition (Pre-unmount command) ==== | ||
+ | |||
+ | To configure the router to automatically deactivate the swap partition (in this case, **/// | ||
+ | |||
+ | \\ | ||
+ | |||
+ | <code -> | ||
+ | swapoff / | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | The field should appear like this: | ||
+ | |||
+ | {{: | ||
+ | Again, your form field may have additional data within it. | ||
+ | )) | ||
+ | |||
+ | In both cases, click the Save button at the bottom before continuing. | ||