Debian Codegraph @

docs/hardware_dev/storage.rst

raw
1 .. _usb_storage_initialization:
2
3 (optional) Initialize USB Storage
4 =================================
5
6 This section will describe how format the USB storage drive and put the BusKill software on it.
7
8 .. note::
9 The BusKill software cannot run on the USB drive. It must be run from your computer.
10
11 As such, this is an **optional** step. It's documented here as a guide for how Alt Shift International prepares the USB Storage Drives when selling BusKill kits to customers. Having the software on the USB drive simply makes it easier for the end-user (so they can just copy the software from the USB drive to their computer instead of downloading it from the Internet).
12
13 If you're building a BusKill cable for your own use, you should probably **skip this step and just** :ref:`Download the app <download_app>`.
14
15 Windows 10
16 ----------
17
18 Step 1: Assemble Cable
19 ^^^^^^^^^^^^^^^^^^^^^^
20
21 If you haven't yet, :ref:`assemble the BusKill cable <hardware_assembly>`
22
23 Step 2: Plug Into Computer
24 ^^^^^^^^^^^^^^^^^^^^^^^^^^
25
26 Plug the assembled BusKill Cable (with the USB drive attached *through* the Magnetic breakaway) into your computer
27
28 .. figure:: /images/buskill_usb_storage_plug_in.jpg
29 :alt: picture showing the fully-assembled BusKill cable with the USB Storage Drive connected to the magnetic breakaway connected to a laptop's USB port
30 :align: center
31 :target: ../_images/buskill_usb_storage_plug_in.jpg
32
33 .. note:: By plugging in the USB Storage Drive into the computer *via* the magnetic breakaway cable (as opposed to plugging the USB Storage Drive directly into the machine), you also verify the functionality of the cable's pinout.
34
35 .. _format_usb_drive:
36
37 Step 3: Format
38 ^^^^^^^^^^^^^^
39
40 Open Windows Explorer (Start -> File Explorer)
41
42 .. figure:: /images/buskill_usb_storage_win_open_file_explorer.png
43 :align: center
44
45 Click on "This PC"
46
47 .. figure:: /images/buskill_usb_storage_win_click_this_pc.png
48 :align: center
49
50 Under ``Devices and drives``, right-click on the USB drive and choose ``Format``
51
52 .. figure:: /images/buskill_usb_storage_win_click_format.png
53 :align: center
54
55 .. warning::
56 Make absolutely sure you've selected the correct drive!!
57
58 If you select the **wrong drive**, it may result in **irrevocable deletion of all your data!**
59
60 If you're not sure, unplug the BusKill cable and plug it back in again. The drive will disappear and reappear. **Make absolutely sure you're choosing the BusKill USB Storage Drive** before proceeding with the format.
61
62 In the new window:
63
64 #. Set the ``File system`` to ``FAT32``
65 #. Leave the ``Allocation unit size`` at the default ``4096 bytes``
66 #. For ``Volume label``, type ``BusKill``
67 #. Leave the ``Quick Format`` option checked
68 #. Click ``Start``
69
70 .. figure:: /images/buskill_usb_storage_win_format_options.png
71 :align: center
72
73 .. note::
74 Make sure the ``Volume label`` is ``BusKill`` with an upper-case ``B`` and ``K`` -- not ``Buskill`` nor ``buskill``.
75
76 Double-check that you've selected the **correct drive** before clicking ``OK`` in the WARNING prompt. If you proceed with formatting the wrong drive, it will immediately lead to **loss of all your data** on that drive.
77
78 .. figure:: /images/buskill_usb_storage_win_format_warning.png
79 :align: center
80
81 After the format completes, close the windows.
82
83 .. figure:: /images/buskill_usb_storage_win_format_complete.png
84 :align: center
85
86 In the File Explorer, you should now see a drive named ``BusKill``
87
88 .. figure:: /images/buskill_usb_storage_win_this_pc_now_says_buskill_label_on_drive.png
89 :alt: screenshot shows the USB Drive under "This PC" is named "BUSKILL"
90 :align: center
91 :target: ../_images/buskill_usb_storage_win_open_new_file_explorer_window.png
92
93 Step 4: Download, Verify, Extract Archive
94 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95
96 .. note::
97
98 You only need to do this step once. If you've already downloaded, verified, and extracted the archive to your computer, then skip this step
99
100 You should have already received:
101
102 #. A download link to the "usbRoot" compressed archive and
103 #. A SHA256 Hash for this file
104
105 Download the archive using the provided link and put it in your ``Downloads`` folder. This archive contains the files that will be extracted onto the newly formatted USB Storage Drive.
106
107 .. note:: Advanced users can build the .zip archive themselves using docker by checking out the git repo and executing the following script.
108
109 * https://github.com/BusKill/buskill-app/blob/dev/build/usb/debianWrapper.sh
110
111 Open a new File Explorer Window (File -> New Window) and open your Downloads folder. Find the .zip archive.
112
113 .. list-table::
114
115 * - .. figure:: /images/buskill_usb_storage_win_open_new_file_explorer_window.png
116 :alt: screenshot shows how to open a new File Explorer Window (File -> New Window)
117 :align: center
118 :target: ../_images/buskill_usb_storage_win_open_new_file_explorer_window.png
119
120 - .. figure:: /images/buskill_usb_storage_win_click_downloads.png
121 :alt: screenshot shows where to click "Downloads"
122 :align: center
123 :target: ../_images/buskill_usb_storage_win_click_downloads.png
124
125 Before extracting the archive's contents, check the integrity of the compressed archive via its SHA256 checksum. This is the "hash" or "checksum" that you should have received with the download link.
126
127 Check the integrity of the archive in PowerShell (Start -> Windows PowerShell).
128
129 .. figure:: /images/buskill_usb_storage_win_open_powershell.png
130 :alt: screenshot shows how to open Windows PowerShell (Start -> PowerShell)
131 :align: center
132 :target: ../_images/buskill_usb_storage_win_open_powershell.png
133
134 Type the following command:
135
136 ::
137
138 Get-FileHash Downloads\buskill*.zip
139
140 .. figure:: /images/buskill_usb_storage_win_get_filehash.png
141 :alt: screenshot shows the SHA256 output from the File-GetHash command
142 :align: center
143 :target: ../_images/buskill_usb_storage_win_get_filehash.png
144
145 Check that the ``Hash`` exactly matches the hash provided along with the download link.
146
147 .. warning::
148 Do *not* proceed if the hash doesn't match.
149
150 If the hash does not match, it's an indication that the compressed archive is corrupted. This means the **software won't work for the customer**, so this is a critical QA step.
151
152 If the hash matches, close the PowerShell window and extract its contents.
153
154 .. figure:: /images/buskill_usb_storage_win_close_powershell.png
155 :alt: screenshot shows how to close the PowerShell window (click the "X")
156 :align: center
157 :target: ../_images/buskill_usb_storage_win_close_powershell.png
158
159 Right-click on the archive and click ``Extract All...``
160
161 .. figure:: /images/buskill_usb_storage_win_extract_all.png
162 :alt: screenshot shows
163 :align: center
164 :target: ../_images/buskill_usb_storage_win_extract_all.png
165
166 Click ``Extract``
167
168 .. figure:: /images/buskill_usb_storage_win_extract.png
169 :alt: screenshot shows the "Extract Compressed (Zipped) Folders" wizard and highlights the "Extract" button to proceed
170 :align: center
171 :target: ../_images/buskill_usb_storage_win_extract.png
172
173 Step 4: Copy Files
174 ^^^^^^^^^^^^^^^^^^
175
176 In the extracted archive's directory, enter the ``usbRoot`` directory.
177
178 Double-click ``usbRoot``
179
180 .. figure:: /images/buskill_usb_storage_win_click_usbRoot.png
181 :alt: screenshot shows the extracted archive's contents root with one folder titled "usbRoot"
182 :align: center
183 :target: ../_images/buskill_usb_storage_win_click_usbRoot.png
184
185 .. note ::
186 Do not copy the ``usbRoot`` folder to the USB Storage Drive. Copy the *contents* of the ``usbRoot`` folder to the USB Storage Drive.
187
188 Click ``Home`` -> ``Select All``
189
190 .. figure:: /images/buskill_usb_storage_win_select_all.png
191 :alt: screenshot shows the process to click Home -> Select All
192 :align: center
193 :target: ../_images/buskill_usb_storage_win_select_all.png
194
195 Click ``Home`` -> ``Copy to`` -> ``Choose location...``
196
197 .. figure:: /images/buskill_usb_storage_win_copy_to.png
198 :alt: screenshot shows the process to click Home -> Copy to -> Choose location...
199 :align: center
200 :target: ../_images/buskill_usb_storage_win_copy_to.png
201
202 Under ``This PC`` select the ``BUSKILL`` USB Storage Drive and click ``Copy``
203
204 .. figure:: /images/buskill_usb_storage_win_copy_to_usb.png
205 :alt: screenshot shows the "Copy Items" popup window and "BUSKILL" selected as the destination, with the "Copy" button selected
206 :align: center
207 :target: ../_images/buskill_usb_storage_win_copy_to_usb.png
208
209 When the copy finishes, close the top two File Explorer windows
210
211 .. list-table::
212
213 * - .. figure:: /images/buskill_usb_storage_win_close_window_1.png
214 :alt: screenshot shows three File Explorer windows with the "X" highlighted on the top-most window
215 :align: center
216 :target: ../_images/buskill_usb_storage_win_close_window_1.png
217
218 - .. figure:: /images/buskill_usb_storage_win_close_window_2.png
219 :alt: screenshot shows two File Explorer windows with the "X" highlighted on the top-most window
220 :align: center
221 :target: ../_images/buskill_usb_storage_win_close_window_2.png
222
223 Step 4: Safely Eject
224 ^^^^^^^^^^^^^^^^^^^^
225
226 Right-click on the ``BUSKILL`` USB Storage Drive and click ``Eject``
227
228 .. figure:: /images/buskill_usb_storage_win_eject.png
229 :alt: screenshot shows the right-click menu for the "BUSKILL" drive and the "Eject" option highlighted
230 :align: center
231 :target: ../_images/buskill_usb_storage_win_eject.png
232
233 .. warning::
234
235 Do *not* simply remove the USB Storage Drive from your computer without first ejecting it as shown above!!
236
237 Physically removing the drive from the computer before clicking ``Eject`` can cause data to not be written, even after the copy finishes successfully.
238
239 If the data isn't fully written to the disk before it's removed, the software on the USB Storage Drive could be corrupt. This means the **software won't work for the customer**, so this is a **critical QA step**.
240
241 Wait until the drive disappears from the File Explorer window.
242
243 .. figure:: /images/buskill_usb_storage_win_physically_remove.png
244 :alt: screenshot shows that the USB Drive named "BusKill" is no longer visible in the File Explorer window
245 :align: center
246 :target: ../_images/buskill_usb_storage_win_physically_remove.png
247
248 After the drive is no longer visible, physically remove the USB Storage Drive.
249
250 Step 5: Verify Integrity
251 ^^^^^^^^^^^^^^^^^^^^^^^^
252
253 Plug the BusKill Cable into the computer again.
254
255 .. figure:: /images/buskill_usb_storage_plug_in.jpg
256 :alt: picture showing the fully-assembled BusKill cable with the USB Storage Drive connected to the magnetic breakaway connected to a laptop's USB port
257 :align: center
258 :target: ../_images/buskill_usb_storage_plug_in.jpg
259
260 Double-click the ``BUSKILL`` drive when it appears
261
262 .. figure:: /images/buskill_usb_storage_win_this_pc_now_says_buskill_label_on_drive.png
263 :alt: screenshot shows the USB Drive under "This PC" is named "BUSKILL"
264 :align: center
265 :target: ../_images/buskill_usb_storage_win_open_new_file_explorer_window.png
266
267 Double-click ``provision``
268
269 .. figure:: /images/buskill_usb_storage_win_click_provision.png
270 :alt: screenshot shows the file "provision" selected at the root of the USB Storage Drive
271 :align: center
272 :target: ../_images/buskill_usb_storage_win_click_provision.png
273
274 If the window says ``FAIL``, then something is wrong with the drive. Go back to the :ref:`Format <format_usb_drive>` step above and retry.
275
276 If the window says ``PASS`` then everything worked. Close the command prompt window and safely eject the drive.
277
278 .. list-table::
279
280 * - .. figure:: /images/buskill_usb_storage_win_pass.png
281 :alt: screenshot shows how to close the command prompt window, with the "X" on the top-right highlighted
282 :align: center
283 :target: ../_images/buskill_usb_storage_win_pass.png
284
285 - .. figure:: /images/buskill_usb_storage_win_eject.png
286 :alt: screenshot shows the right-click menu for the "BUSKILL" drive and the "Eject" option highlighted
287 :align: center
288 :target: ../_images/buskill_usb_storage_win_eject.png
289
290 After the drive is no longer visible, physically remove the USB Storage Drive.
291
292 Linux
293 -----
294
295 TODO
296
297 MacOS
298 -----
299
300 TODO