User documentation and guides for products sold on the Libre Tech Shop. https://docs.libretech.shop
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1017 lines
29 KiB

  1. <!doctype html>
  2. <html lang="en" class="no-js">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <meta name="description" content="Accessible & Free Documentation for Libre Products">
  7. <meta name="author" content="Abhas Abhinav">
  8. <link rel="icon" href="../../images/als-icon.png">
  9. <meta name="generator" content="mkdocs-1.2.3, mkdocs-material-8.1.7">
  10. <title>(MHUSB) Using the USB disk - LibreTechShop - Documentation</title>
  11. <link rel="stylesheet" href="../../assets/stylesheets/main.cd566b2a.min.css">
  12. <link rel="stylesheet" href="../../assets/stylesheets/palette.e6a45f82.min.css">
  13. <meta name="theme-color" content="#7e56c2">
  14. <link rel="stylesheet" href="../../css/extra.css">
  15. <script>__md_scope=new URL("../..",location),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
  16. </head>
  17. <body dir="ltr" data-md-color-scheme="light" data-md-color-primary="deep-purple" data-md-color-accent="pink">
  18. <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
  19. <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
  20. <label class="md-overlay" for="__drawer"></label>
  21. <div data-md-component="skip">
  22. <a href="#using-the-mh-usb-disk" class="md-skip">
  23. Skip to content
  24. </a>
  25. </div>
  26. <div data-md-component="announce">
  27. </div>
  28. <header class="md-header" data-md-component="header">
  29. <nav class="md-header__inner md-grid" aria-label="Header">
  30. <a href="../.." title="LibreTechShop - Documentation" class="md-header__button md-logo" aria-label="LibreTechShop - Documentation" data-md-component="logo">
  31. <img src="../../images/als-icon.png" alt="logo">
  32. </a>
  33. <label class="md-header__button md-icon" for="__drawer">
  34. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
  35. </label>
  36. <div class="md-header__title" data-md-component="header-title">
  37. <div class="md-header__ellipsis">
  38. <div class="md-header__topic">
  39. <span class="md-ellipsis">
  40. LibreTechShop - Documentation
  41. </span>
  42. </div>
  43. <div class="md-header__topic" data-md-component="header-topic">
  44. <span class="md-ellipsis">
  45. (MHUSB) Using the USB disk
  46. </span>
  47. </div>
  48. </div>
  49. </div>
  50. <label class="md-header__button md-icon" for="__search">
  51. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
  52. </label>
  53. <div class="md-search" data-md-component="search" role="dialog">
  54. <label class="md-search__overlay" for="__search"></label>
  55. <div class="md-search__inner" role="search">
  56. <form class="md-search__form" name="search">
  57. <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
  58. <label class="md-search__icon md-icon" for="__search">
  59. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
  60. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
  61. </label>
  62. <nav class="md-search__options" aria-label="Search">
  63. <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
  64. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
  65. </button>
  66. </nav>
  67. </form>
  68. <div class="md-search__output">
  69. <div class="md-search__scrollwrap" data-md-scrollfix>
  70. <div class="md-search-result" data-md-component="search-result">
  71. <div class="md-search-result__meta">
  72. Initializing search
  73. </div>
  74. <ol class="md-search-result__list"></ol>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="md-header__source">
  81. <a href="https://sovran.dev/mh/lts-docs" title="Go to repository" class="md-source" data-md-component="source">
  82. <div class="md-source__icon md-icon">
  83. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
  84. </div>
  85. <div class="md-source__repository">
  86. mh/lts-docs
  87. </div>
  88. </a>
  89. </div>
  90. </nav>
  91. </header>
  92. <div class="md-container" data-md-component="container">
  93. <main class="md-main" data-md-component="main">
  94. <div class="md-main__inner md-grid">
  95. <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
  96. <div class="md-sidebar__scrollwrap">
  97. <div class="md-sidebar__inner">
  98. <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
  99. <label class="md-nav__title" for="__drawer">
  100. <a href="../.." title="LibreTechShop - Documentation" class="md-nav__button md-logo" aria-label="LibreTechShop - Documentation" data-md-component="logo">
  101. <img src="../../images/als-icon.png" alt="logo">
  102. </a>
  103. LibreTechShop - Documentation
  104. </label>
  105. <div class="md-nav__source">
  106. <a href="https://sovran.dev/mh/lts-docs" title="Go to repository" class="md-source" data-md-component="source">
  107. <div class="md-source__icon md-icon">
  108. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
  109. </div>
  110. <div class="md-source__repository">
  111. mh/lts-docs
  112. </div>
  113. </a>
  114. </div>
  115. <ul class="md-nav__list" data-md-scrollfix>
  116. <li class="md-nav__item">
  117. <a href="../.." class="md-nav__link">
  118. Home
  119. </a>
  120. </li>
  121. <li class="md-nav__item md-nav__item--nested">
  122. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2" type="checkbox" id="__nav_2" >
  123. <label class="md-nav__link" for="__nav_2">
  124. LC230
  125. <span class="md-nav__icon md-icon"></span>
  126. </label>
  127. <nav class="md-nav" aria-label="LC230" data-md-level="1">
  128. <label class="md-nav__title" for="__nav_2">
  129. <span class="md-nav__icon md-icon"></span>
  130. LC230
  131. </label>
  132. <ul class="md-nav__list" data-md-scrollfix>
  133. <li class="md-nav__item">
  134. <a href="../../lc230/" class="md-nav__link">
  135. (LC230) Overview
  136. </a>
  137. </li>
  138. <li class="md-nav__item">
  139. <a href="../../lc230/user-guide/" class="md-nav__link">
  140. (LC230) User Guide
  141. </a>
  142. </li>
  143. <li class="md-nav__item">
  144. <a href="../../lc230/troubleshooting/" class="md-nav__link">
  145. (LC230) Troubleshooting
  146. </a>
  147. </li>
  148. </ul>
  149. </nav>
  150. </li>
  151. <li class="md-nav__item md-nav__item--active md-nav__item--nested">
  152. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" checked>
  153. <label class="md-nav__link" for="__nav_3">
  154. MH-USB
  155. <span class="md-nav__icon md-icon"></span>
  156. </label>
  157. <nav class="md-nav" aria-label="MH-USB" data-md-level="1">
  158. <label class="md-nav__title" for="__nav_3">
  159. <span class="md-nav__icon md-icon"></span>
  160. MH-USB
  161. </label>
  162. <ul class="md-nav__list" data-md-scrollfix>
  163. <li class="md-nav__item">
  164. <a href="../" class="md-nav__link">
  165. (MHUSB) About & Contents
  166. </a>
  167. </li>
  168. <li class="md-nav__item md-nav__item--active">
  169. <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
  170. <label class="md-nav__link md-nav__link--active" for="__toc">
  171. (MHUSB) Using the USB disk
  172. <span class="md-nav__icon md-icon"></span>
  173. </label>
  174. <a href="./" class="md-nav__link md-nav__link--active">
  175. (MHUSB) Using the USB disk
  176. </a>
  177. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  178. <label class="md-nav__title" for="__toc">
  179. <span class="md-nav__icon md-icon"></span>
  180. Table of contents
  181. </label>
  182. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  183. <li class="md-nav__item">
  184. <a href="#organisation-of-the-mh-usb-disk" class="md-nav__link">
  185. Organisation of the MH-USB Disk
  186. </a>
  187. </li>
  188. <li class="md-nav__item">
  189. <a href="#booting-on-physical-computer" class="md-nav__link">
  190. Booting on physical computer
  191. </a>
  192. </li>
  193. <li class="md-nav__item">
  194. <a href="#booting-on-a-virtual-machine" class="md-nav__link">
  195. Booting on a virtual machine
  196. </a>
  197. <nav class="md-nav" aria-label="Booting on a virtual machine">
  198. <ul class="md-nav__list">
  199. <li class="md-nav__item">
  200. <a href="#booting-a-virtual-machine-with-seabios" class="md-nav__link">
  201. Booting a virtual machine with SeaBIOS
  202. </a>
  203. </li>
  204. <li class="md-nav__item">
  205. <a href="#booting-a-virtual-machine-with-a-uefi-bios" class="md-nav__link">
  206. Booting a virtual machine with a UEFI BIOS
  207. </a>
  208. </li>
  209. </ul>
  210. </nav>
  211. </li>
  212. <li class="md-nav__item">
  213. <a href="#writing-an-image-to-another-usb-drive" class="md-nav__link">
  214. Writing an image to another USB drive
  215. </a>
  216. </li>
  217. <li class="md-nav__item">
  218. <a href="#working-with-raspberry-pi-images" class="md-nav__link">
  219. Working with Raspberry Pi images
  220. </a>
  221. </li>
  222. </ul>
  223. </nav>
  224. </li>
  225. <li class="md-nav__item">
  226. <a href="../update/" class="md-nav__link">
  227. (MHUSB) Add / Update images
  228. </a>
  229. </li>
  230. <li class="md-nav__item">
  231. <a href="../internals/" class="md-nav__link">
  232. (MHUSB) Internals
  233. </a>
  234. </li>
  235. <li class="md-nav__item">
  236. <a href="../faqs/" class="md-nav__link">
  237. (MHUSB) FAQs
  238. </a>
  239. </li>
  240. </ul>
  241. </nav>
  242. </li>
  243. <li class="md-nav__item md-nav__item--nested">
  244. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" >
  245. <label class="md-nav__link" for="__nav_4">
  246. Routers
  247. <span class="md-nav__icon md-icon"></span>
  248. </label>
  249. <nav class="md-nav" aria-label="Routers" data-md-level="1">
  250. <label class="md-nav__title" for="__nav_4">
  251. <span class="md-nav__icon md-icon"></span>
  252. Routers
  253. </label>
  254. <ul class="md-nav__list" data-md-scrollfix>
  255. <li class="md-nav__item">
  256. <a href="../../routers/" class="md-nav__link">
  257. Introduction
  258. </a>
  259. </li>
  260. <li class="md-nav__item">
  261. <a href="../../routers/first-use/" class="md-nav__link">
  262. First Use
  263. </a>
  264. </li>
  265. <li class="md-nav__item">
  266. <a href="../../routers/next-steps/" class="md-nav__link">
  267. Next Steps
  268. </a>
  269. </li>
  270. <li class="md-nav__item">
  271. <a href="../../routers/optional-steps/" class="md-nav__link">
  272. Optional Steps
  273. </a>
  274. </li>
  275. <li class="md-nav__item">
  276. <a href="../../routers/cli/" class="md-nav__link">
  277. Command Line Guide
  278. </a>
  279. </li>
  280. <li class="md-nav__item">
  281. <a href="../../routers/upgrade/" class="md-nav__link">
  282. Upgrading OpenWrt
  283. </a>
  284. </li>
  285. </ul>
  286. </nav>
  287. </li>
  288. <li class="md-nav__item md-nav__item--nested">
  289. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" >
  290. <label class="md-nav__link" for="__nav_5">
  291. Phones
  292. <span class="md-nav__icon md-icon"></span>
  293. </label>
  294. <nav class="md-nav" aria-label="Phones" data-md-level="1">
  295. <label class="md-nav__title" for="__nav_5">
  296. <span class="md-nav__icon md-icon"></span>
  297. Phones
  298. </label>
  299. <ul class="md-nav__list" data-md-scrollfix>
  300. <li class="md-nav__item">
  301. <a href="../../phones/" class="md-nav__link">
  302. Introduction
  303. </a>
  304. </li>
  305. <li class="md-nav__item">
  306. <a href="../../phones/lineageos/" class="md-nav__link">
  307. LineageOS
  308. </a>
  309. </li>
  310. <li class="md-nav__item">
  311. <a href="../../phones/f-droid/" class="md-nav__link">
  312. F-Droid
  313. </a>
  314. </li>
  315. <li class="md-nav__item">
  316. <a href="../../phones/first-use/" class="md-nav__link">
  317. First Use
  318. </a>
  319. </li>
  320. <li class="md-nav__item">
  321. <a href="../../phones/applications/" class="md-nav__link">
  322. Applications
  323. </a>
  324. </li>
  325. <li class="md-nav__item">
  326. <a href="../../phones/services/" class="md-nav__link">
  327. Services
  328. </a>
  329. </li>
  330. <li class="md-nav__item">
  331. <a href="../../phones/backups/" class="md-nav__link">
  332. Taking Backups
  333. </a>
  334. </li>
  335. <li class="md-nav__item">
  336. <a href="../../phones/recovery/" class="md-nav__link">
  337. Using Recovery
  338. </a>
  339. </li>
  340. <li class="md-nav__item">
  341. <a href="../../phones/ubports/" class="md-nav__link">
  342. Installing Ubports
  343. </a>
  344. </li>
  345. <li class="md-nav__item">
  346. <a href="../../phones/calyxos/" class="md-nav__link">
  347. Installing CalyxOS
  348. </a>
  349. </li>
  350. </ul>
  351. </nav>
  352. </li>
  353. </ul>
  354. </nav>
  355. </div>
  356. </div>
  357. </div>
  358. <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
  359. <div class="md-sidebar__scrollwrap">
  360. <div class="md-sidebar__inner">
  361. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  362. <label class="md-nav__title" for="__toc">
  363. <span class="md-nav__icon md-icon"></span>
  364. Table of contents
  365. </label>
  366. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  367. <li class="md-nav__item">
  368. <a href="#organisation-of-the-mh-usb-disk" class="md-nav__link">
  369. Organisation of the MH-USB Disk
  370. </a>
  371. </li>
  372. <li class="md-nav__item">
  373. <a href="#booting-on-physical-computer" class="md-nav__link">
  374. Booting on physical computer
  375. </a>
  376. </li>
  377. <li class="md-nav__item">
  378. <a href="#booting-on-a-virtual-machine" class="md-nav__link">
  379. Booting on a virtual machine
  380. </a>
  381. <nav class="md-nav" aria-label="Booting on a virtual machine">
  382. <ul class="md-nav__list">
  383. <li class="md-nav__item">
  384. <a href="#booting-a-virtual-machine-with-seabios" class="md-nav__link">
  385. Booting a virtual machine with SeaBIOS
  386. </a>
  387. </li>
  388. <li class="md-nav__item">
  389. <a href="#booting-a-virtual-machine-with-a-uefi-bios" class="md-nav__link">
  390. Booting a virtual machine with a UEFI BIOS
  391. </a>
  392. </li>
  393. </ul>
  394. </nav>
  395. </li>
  396. <li class="md-nav__item">
  397. <a href="#writing-an-image-to-another-usb-drive" class="md-nav__link">
  398. Writing an image to another USB drive
  399. </a>
  400. </li>
  401. <li class="md-nav__item">
  402. <a href="#working-with-raspberry-pi-images" class="md-nav__link">
  403. Working with Raspberry Pi images
  404. </a>
  405. </li>
  406. </ul>
  407. </nav>
  408. </div>
  409. </div>
  410. </div>
  411. <div class="md-content" data-md-component="content">
  412. <article class="md-content__inner md-typeset">
  413. <h1 id="using-the-mh-usb-disk">Using the MH-USB Disk<a class="headerlink" href="#using-the-mh-usb-disk" title="Permanent link">&para;</a></h1>
  414. <h2 id="organisation-of-the-mh-usb-disk">Organisation of the MH-USB Disk<a class="headerlink" href="#organisation-of-the-mh-usb-disk" title="Permanent link">&para;</a></h2>
  415. <p>The files on the MH-USB disk are arranged as follows:</p>
  416. <div class="highlight"><pre><span></span><code>MH-USB/
  417. /OS/ &lt;-- Contains OS Images
  418. /Tools/ &lt;-- Contains some tools and software
  419. /RPi/ &lt;-- OS Images for the Raspberry Pi
  420. /ventoy/ &lt;-- Config files for the Ventoy/Grub2 bootloader
  421. </code></pre></div>
  422. <p>The MH-USB partition of the USB disk is formatted with <a href="https://en.wikipedia.org/wiki/ExFAT">exFAT</a>.
  423. This enables universal access to the data on any operating system that supports exFAT.</p>
  424. <h2 id="booting-on-physical-computer">Booting on physical computer<a class="headerlink" href="#booting-on-physical-computer" title="Permanent link">&para;</a></h2>
  425. <p>You boot the USB disk on a physical computer (dekstop, laptop, single-board
  426. computer or laptop) by simply plugging it in and choosing it as a boot device.</p>
  427. <p>The MH-USB runs the <a href="https://www.gnu.org/software/grub/">GRUB2</a> boot
  428. loader and will boot just fine with a "legacy" BIOS or UEFI BIOS.</p>
  429. <p>The USB make would show up as a USB disk called "Generic Flash Drive":</p>
  430. <figure>
  431. <img src="/images/usb/boot-device.jpg" width="600">
  432. </figure>
  433. <p>Just choose it as the boot device and you will be greeted by the MH-USB
  434. boot screen.</p>
  435. <h2 id="booting-on-a-virtual-machine">Booting on a virtual machine<a class="headerlink" href="#booting-on-a-virtual-machine" title="Permanent link">&para;</a></h2>
  436. <p>You can also boot the USB using a virtual machine. On a GNU/Linux
  437. system, one can use QEMU to boot the USB.</p>
  438. <p>First check the device name assigned to the USB disk. A quick way to
  439. check it out would be to use the <code>lsblk</code> command like this:</p>
  440. <div class="highlight"><pre><span></span><code><span class="gp">$ </span>lsblk -o NAME,SIZE,HOTPLUG -P -d <span class="p">|</span> grep <span class="s2">&quot;HOTPLUG=\&quot;1\&quot;&quot;</span> <span class="p">|</span> cut -d<span class="s2">&quot; &quot;</span> -f1
  441. <span class="go">NAME=&quot;sdb&quot; </span>
  442. </code></pre></div>
  443. <p>The command above will list out all the USB disks attached to your
  444. computer. (Actually, all "HOTPLUG" storage devices - which includes USB
  445. storage.)</p>
  446. <h3 id="booting-a-virtual-machine-with-seabios">Booting a virtual machine with SeaBIOS<a class="headerlink" href="#booting-a-virtual-machine-with-seabios" title="Permanent link">&para;</a></h3>
  447. <p>To boot the USB disk using QEMU + SeaBIOS, install the <code>qemu</code> package
  448. from your GNU/Linux OS repository and then run:</p>
  449. <div class="highlight"><pre><span></span><code><span class="gp">$ </span><span class="nv">DEVICE</span><span class="o">=</span><span class="sb">`</span>lsblk -o NAME,SIZE,HOTPLUG -P -d <span class="p">|</span> grep <span class="s2">&quot;HOTPLUG=\&quot;1\&quot;&quot;</span> <span class="p">|</span> cut -d<span class="s2">&quot;\&quot;&quot;</span> -f2<span class="sb">`</span>
  450. <span class="gp">$ </span>sudo qemu-system-x86_64 <span class="se">\</span>
  451. -enable-kvm -rtc <span class="nv">base</span><span class="o">=</span>localtime -m 2G -vga std <span class="se">\</span>
  452. -drive <span class="nv">file</span><span class="o">=</span>/dev/<span class="nv">$DEVICE</span>,readonly<span class="o">=</span>on,cache<span class="o">=</span>none,format<span class="o">=</span>raw,if<span class="o">=</span>virtio
  453. </code></pre></div>
  454. <p>This will boot the USB via QEMU and show you the boot screen in a popup window.</p>
  455. <h3 id="booting-a-virtual-machine-with-a-uefi-bios">Booting a virtual machine with a UEFI BIOS<a class="headerlink" href="#booting-a-virtual-machine-with-a-uefi-bios" title="Permanent link">&para;</a></h3>
  456. <p>If you want to try booting the USB with QEMU with the <code>tianocore</code> UEFI BIOS, first install the OVMF
  457. (Open Virtual Machine Firmware) packages.</p>
  458. <p>On Debian and Debian-based distributions run:</p>
  459. <div class="highlight"><pre><span></span><code><span class="gp"># </span>apt-get install ovmf
  460. <span class="gp">$ </span><span class="nv">BIOS</span><span class="o">=</span><span class="s2">&quot;/usr/share/qemu/OVMF.fd&quot;</span>
  461. </code></pre></div>
  462. <p>On Archlinux-based distributions run:</p>
  463. <div class="highlight"><pre><span></span><code><span class="gp"># </span>pacman -S edk2-ovmf
  464. <span class="gp">$ </span><span class="nv">BIOS</span><span class="o">=</span><span class="s2">&quot;/usr/share/edk2-ovmf/x64/OVMF.fd&quot;</span>
  465. </code></pre></div>
  466. <div class="highlight"><pre><span></span><code>$ <span class="nv">DEVICE</span><span class="o">=</span><span class="sb">`</span>lsblk -o NAME,SIZE,HOTPLUG -P -d <span class="p">|</span> grep <span class="s2">&quot;HOTPLUG=\&quot;1\&quot;&quot;</span> <span class="p">|</span> cut -d<span class="s2">&quot;\&quot;&quot;</span> -f2<span class="sb">`</span>
  467. $ sudo qemu-system-x86_64 <span class="se">\</span>
  468. -bios <span class="nv">$BIOS</span> <span class="se">\</span>
  469. -enable-kvm -rtc <span class="nv">base</span><span class="o">=</span>localtime -m 2G -vga std <span class="se">\</span>
  470. -drive <span class="nv">file</span><span class="o">=</span>/dev/<span class="nv">$DEVICE</span>,readonly<span class="o">=</span>on,cache<span class="o">=</span>none,format<span class="o">=</span>raw,if<span class="o">=</span>virtio
  471. </code></pre></div>
  472. <h2 id="writing-an-image-to-another-usb-drive">Writing an image to another USB drive<a class="headerlink" href="#writing-an-image-to-another-usb-drive" title="Permanent link">&para;</a></h2>
  473. <p>While a multi-boot USB is nice, there might be times when you want to write an OS image to another
  474. USB disk. The MH-USB includes the "RaspberryPi Imager" (<code>rpi-imager</code>) tool to help you write an OS
  475. image to a USB disk safely and quickly.</p>
  476. <p>You can run the the <code>rpi-imager</code> directly from the USB. Insert the MH-USB into a GNU/Linux (or
  477. Windows) computer and mount it. In the <code>Tools/</code> directory on the USB, you will see binaries for the
  478. Raspberry Pi imager. You can use it to write any of the bootable operating system images to another
  479. USB.</p>
  480. <p><em>[TODO: Include more details and screenshots!]</em></p>
  481. <h2 id="working-with-raspberry-pi-images">Working with Raspberry Pi images<a class="headerlink" href="#working-with-raspberry-pi-images" title="Permanent link">&para;</a></h2>
  482. <p><em>[TODO: Include details with screenshots]</em></p>
  483. </article>
  484. </div>
  485. </div>
  486. </main>
  487. <footer class="md-footer">
  488. <nav class="md-footer__inner md-grid" aria-label="Footer">
  489. <a href="../" class="md-footer__link md-footer__link--prev" aria-label="Previous: (MHUSB) About &amp; Contents" rel="prev">
  490. <div class="md-footer__button md-icon">
  491. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
  492. </div>
  493. <div class="md-footer__title">
  494. <div class="md-ellipsis">
  495. <span class="md-footer__direction">
  496. Previous
  497. </span>
  498. (MHUSB) About & Contents
  499. </div>
  500. </div>
  501. </a>
  502. <a href="../update/" class="md-footer__link md-footer__link--next" aria-label="Next: (MHUSB) Add / Update images" rel="next">
  503. <div class="md-footer__title">
  504. <div class="md-ellipsis">
  505. <span class="md-footer__direction">
  506. Next
  507. </span>
  508. (MHUSB) Add / Update images
  509. </div>
  510. </div>
  511. <div class="md-footer__button md-icon">
  512. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
  513. </div>
  514. </a>
  515. </nav>
  516. <div class="md-footer-meta md-typeset">
  517. <div class="md-footer-meta__inner md-grid">
  518. <div class="md-copyright">
  519. <div class="md-copyright__highlight">
  520. Copyright &copy; Mostly Harmless
  521. </div>
  522. Made with
  523. <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
  524. Material for MkDocs
  525. </a>
  526. </div>
  527. </div>
  528. </div>
  529. </footer>
  530. </div>
  531. <div class="md-dialog" data-md-component="dialog">
  532. <div class="md-dialog__inner md-typeset"></div>
  533. </div>
  534. <script id="__config" type="application/json">{"base": "../..", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../../assets/javascripts/workers/search.22074ed6.min.js"}</script>
  535. <script src="../../assets/javascripts/bundle.01de222e.min.js"></script>
  536. </body>
  537. </html>