Site Tools


usb_formatting_with_swap_partition

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
usb_formatting_with_swap_partition [2024/03/27 15:30] – [Deactivating the Swap Partition (Pre-unmount command)] -formatting hogwildusb_formatting_with_swap_partition [2024/10/31 23:51] (current) – [Deactivating the Swap Partition (Pre-unmount command)] hogwild
Line 26: Line 26:
 (echo o; echo n; echo p; echo 2; echo ; echo +1000M; echo t; echo 82; echo n; echo p; echo 1; echo ; echo ; echo w) | fdisk $device (echo o; echo n; echo p; echo 2; echo ; echo +1000M; echo t; echo 82; echo n; echo p; echo 1; echo ; echo ; echo w) | fdisk $device
 # Uncomment the preferred option here below: # Uncomment the preferred option here below:
-# mkfs.ext2 -L usb $partion +# mkfs.ext2 -L usb $partition 
-# mkfs.vfat -n usb $partion +# mkfs.vfat -n usb $partition 
-mkswap -L swap $swappartion +mkswap -L swap $swappartition 
-swapon swap +swapon $swappartition 
-mkdir /mnt/usb && mount /dev/sda1 /mnt/usb+mkdir -p /mnt/usb && mount /dev/sda1 /mnt/usb
 nvram set usb_automount="1" nvram set usb_automount="1"
 </code> </code>
Line 94: Line 94:
 </code> </code>
  
- \\  Next, mount the partitions: \\ \\+ \\ \\  \\ 
 + 
 +Next, mount the partitions: \\ \\
  
 <code -> <code ->
Line 112: Line 114:
 For best practice, the swap partition should be activated as swap once the USB drive/flash is mounted. Additionally, it's best to deactivate swap partitions before unmounting them. It is quite simple to configure both the post-mount and pre-unmount commands. The methods for both are as follows: For best practice, the swap partition should be activated as swap once the USB drive/flash is mounted. Additionally, it's best to deactivate swap partitions before unmounting them. It is quite simple to configure both the post-mount and pre-unmount commands. The methods for both are as follows:
  
 +
 + \\
  
 ==== Activating Swap Partition (Post Mount Command) ==== ==== Activating Swap Partition (Post Mount Command) ====
Line 124: Line 128:
  
  \\  \\
 + \\ 
 The field should look like this: The field should look like this:
  
Line 130: Line 134:
 You may have additional commands within the field. You may have additional commands within the field.
 )) ))
- 
  
  \\  \\
 +
  
 ==== Deactivating the Swap Partition (Pre-unmount command) ==== ==== Deactivating the Swap Partition (Pre-unmount command) ====
Line 145: Line 149:
  
  \\  \\
 + \\ 
 The field should appear like this: The field should appear like this:
  
Line 151: Line 155:
 Again, your form field may have additional data within it. Again, your form field may have additional data within it.
 )) ))
- + \\  
-In both cases, the Save button at the bottom should be checked before continuing.+ \\  
 +In both cases, click Save at the bottom before continuing.
  
  
Line 159: Line 164:
  \\  The USB flash drive is now formatted. Your USB and NAS page settings should look like this:  \\  The USB flash drive is now formatted. Your USB and NAS page settings should look like this:
  
-\\ [[https://wiki.freshtomato.org/lib/exe/detail.php?id=usb_formatting_with_swap_partition&media=935fc69f3e8c4985542e9dbb9a4834ef.png|{{:935fc69f3e8c4985542e9dbb9a4834ef.png}}]]+\\ [[https://wiki.freshtomato.org/lib/exe/detail.php?id=usb_formatting_with_swap_partition&media=935fc69f3e8c4985542e9dbb9a4834ef.png|{{:935fc69f3e8c4985542e9dbb9a4834ef.png?528}}]]
  
  \\   \\  Under Attached Devices, you should see something similar to this:  \\   \\  Under Attached Devices, you should see something similar to this:
Line 167: Line 172:
  \\   \\ To verify the swap partition works properly, check the [[status-overview|Overview]] menu. You should see details related to swap space:  \\   \\ To verify the swap partition works properly, check the [[status-overview|Overview]] menu. You should see details related to swap space:
  
- \\ [[https://wiki.freshtomato.org/lib/exe/detail.php?id=usb_formatting_with_swap_partition&media=dbae47af7a43e0a02c8637092a2edd2b.png|{{:dbae47af7a43e0a02c8637092a2edd2b.png}}]]+ \\ [[https://wiki.freshtomato.org/lib/exe/detail.php?id=usb_formatting_with_swap_partition&media=dbae47af7a43e0a02c8637092a2edd2b.png|{{:dbae47af7a43e0a02c8637092a2edd2b.png?409}}]]
  
  \\  \\
usb_formatting_with_swap_partition.1711553442.txt.gz · Last modified: 2024/03/27 15:30 by hogwild