2 %
\93\8c\8b\9e ReportLab Generated PDF document http://www.reportlab.com
5 /F1 2 0 R /F2 3 0 R /F3 4 0 R /F4 5 0 R /F5 7 0 R /F6 8 0 R
10 /BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font
15 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding /Name /F2 /Subtype /Type1 /Type /Font
20 /BaseFont /Courier-Bold /Encoding /WinAnsiEncoding /Name /F3 /Subtype /Type1 /Type /Font
25 /BaseFont /Courier /Encoding /WinAnsiEncoding /Name /F4 /Subtype /Type1 /Type /Font
30 /Contents 22 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 21 0 R /Resources <<
31 /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
32 >> /Rotate 0 /Trans <<
40 /BaseFont /ZapfDingbats /Name /F5 /Subtype /Type1 /Type /Font
45 /BaseFont /Helvetica-Oblique /Encoding /WinAnsiEncoding /Name /F6 /Subtype /Type1 /Type /Font
50 /Contents 23 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 21 0 R /Resources <<
51 /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
52 >> /Rotate 0 /Trans <<
60 /Contents 24 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 21 0 R /Resources <<
61 /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
62 >> /Rotate 0 /Trans <<
70 /Outlines 13 0 R /PageLabels 25 0 R /PageMode /UseNone /Pages 21 0 R /Type /Catalog
75 /Author () /CreationDate (D:20190823090807+00'00') /Creator (\(unspecified\)) /Keywords () /ModDate (D:20190823090807+00'00') /Producer (ReportLab PDF Library - www.reportlab.com)
76 /Subject (\(unspecified\)) /Title (Simple script to create persistent Live USB drive) /Trapped /False
81 /Count 9 /First 14 0 R /Last 20 0 R /Type /Outlines
86 /Count 1 /Dest [ 6 0 R /XYZ 62.69291 707.0236 0 ] /First 15 0 R /Last 15 0 R /Next 16 0 R /Parent 13 0 R
92 /Dest [ 6 0 R /XYZ 62.69291 656.0236 0 ] /Parent 14 0 R /Title (Dependencies)
97 /Count 2 /Dest [ 6 0 R /XYZ 62.69291 382.8236 0 ] /First 17 0 R /Last 18 0 R /Next 19 0 R /Parent 13 0 R
98 /Prev 14 0 R /Title (Usage)
103 /Dest [ 6 0 R /XYZ 62.69291 349.8236 0 ] /Next 18 0 R /Parent 16 0 R /Title (Identify USB device)
108 /Dest [ 9 0 R /XYZ 62.69291 318.6236 0 ] /Parent 16 0 R /Prev 17 0 R /Title (Linux install image)
113 /Dest [ 9 0 R /XYZ 62.69291 222.6236 0 ] /Next 20 0 R /Parent 13 0 R /Prev 16 0 R /Title (Running disk_creator)
118 /Dest [ 10 0 R /XYZ 62.69291 659.8236 0 ] /Parent 13 0 R /Prev 19 0 R /Title (Testing it worked)
123 /Count 3 /Kids [ 6 0 R 9 0 R 10 0 R ] /Type /Pages
131 1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
133 1 0 0 1 62.69291 741.0236 cm
136 BT 1 0 0 1 0 4 Tm /F2 20 Tf 24 TL 3.754882 0 Td (Simple script to create persistent Live USB drive) Tj T* -3.754882 0 Td ET
140 1 0 0 1 62.69291 719.0236 cm
142 BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (Will create a live usb drive with persistence and a mass storage area useable by windows OSs.) Tj T* ET
146 1 0 0 1 62.69291 686.0236 cm
148 BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (Installation) Tj T* ET
152 1 0 0 1 62.69291 668.0236 cm
155 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (Clone this repository, or download the 'disk_creator.sh' file.) Tj T* ET
159 1 0 0 1 62.69291 638.0236 cm
161 BT 1 0 0 1 0 3 Tm 18 TL /F2 15 Tf 0 0 0 rg (Dependencies) Tj T* ET
165 1 0 0 1 62.69291 626.0236 cm
168 1 0 0 1 62.69291 626.0236 cm
171 1 0 0 1 62.69291 614.0236 cm
173 BT /F1 10 Tf 12 TL ET
178 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
185 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (bash) Tj T* ET
192 1 0 0 1 62.69291 608.0236 cm
195 1 0 0 1 62.69291 596.0236 cm
197 BT /F1 10 Tf 12 TL ET
202 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
209 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (sfdisk) Tj T* ET
216 1 0 0 1 62.69291 590.0236 cm
219 1 0 0 1 62.69291 578.0236 cm
221 BT /F1 10 Tf 12 TL ET
226 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
233 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (losetup) Tj T* ET
240 1 0 0 1 62.69291 572.0236 cm
243 1 0 0 1 62.69291 560.0236 cm
245 BT /F1 10 Tf 12 TL ET
250 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
257 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (ntfs3g) Tj T* ET
264 1 0 0 1 62.69291 554.0236 cm
267 1 0 0 1 62.69291 542.0236 cm
269 BT /F1 10 Tf 12 TL ET
274 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
281 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (dosfstools) Tj T* ET
288 1 0 0 1 62.69291 536.0236 cm
291 1 0 0 1 62.69291 524.0236 cm
293 BT /F1 10 Tf 12 TL ET
298 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
305 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (awk) Tj T* ET
312 1 0 0 1 62.69291 518.0236 cm
315 1 0 0 1 62.69291 506.0236 cm
317 BT /F1 10 Tf 12 TL ET
322 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
329 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (bc) Tj T* ET
336 1 0 0 1 62.69291 500.0236 cm
339 1 0 0 1 62.69291 488.0236 cm
341 BT /F1 10 Tf 12 TL ET
346 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
353 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (grub with efi support) Tj T* ET
360 1 0 0 1 62.69291 488.0236 cm
363 1 0 0 1 62.69291 470.0236 cm
366 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (The linux kernel must be compiled with support for iso9660 file systems.) Tj T* ET
370 1 0 0 1 62.69291 440.0236 cm
373 BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL 1.124987 Tw (On debian based distributions most of these will be installed already, just in case here is how to install) Tj T* 0 Tw (them:) Tj T* ET
377 1 0 0 1 62.69291 394.8236 cm
384 .662745 .662745 .662745 RG
386 .960784 .960784 .862745 rg
390 .960784 .960784 .862745 rg
392 .960784 .960784 .862745 rg
394 BT 1 0 0 1 0 14 Tm 12 TL /F3 10 Tf 0 0 .501961 rg ($) Tj /F4 10 Tf 0 0 0 rg ( sudo apt update) Tj T* /F3 10 Tf 0 0 .501961 rg ($) Tj /F4 10 Tf 0 0 0 rg ( sudo apt install ntfs-3g util-linux dosfstools bash gawk bc grub-efi-amd64-bin) Tj T* ET
401 1 0 0 1 62.69291 361.8236 cm
403 BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (Usage) Tj T* ET
407 1 0 0 1 62.69291 331.8236 cm
409 BT 1 0 0 1 0 3 Tm 18 TL /F2 15 Tf 0 0 0 rg (Identify USB device) Tj T* ET
413 1 0 0 1 62.69291 313.8236 cm
416 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (List all currently plugged in block devices, you might see something like this:) Tj T* ET
420 1 0 0 1 62.69291 88.62362 cm
427 .662745 .662745 .662745 RG
429 .960784 .960784 .862745 rg
430 n -6 -6 468.6898 216 re B*
433 .960784 .960784 .862745 rg
435 .960784 .960784 .862745 rg
437 .960784 .960784 .862745 rg
439 .960784 .960784 .862745 rg
441 .960784 .960784 .862745 rg
443 .960784 .960784 .862745 rg
445 .960784 .960784 .862745 rg
447 .960784 .960784 .862745 rg
449 .960784 .960784 .862745 rg
451 .960784 .960784 .862745 rg
453 .960784 .960784 .862745 rg
455 .960784 .960784 .862745 rg
457 .960784 .960784 .862745 rg
459 .960784 .960784 .862745 rg
461 .960784 .960784 .862745 rg
463 .960784 .960784 .862745 rg
465 .960784 .960784 .862745 rg
467 BT 1 0 0 1 0 194 Tm 12 TL /F3 10 Tf 0 0 .501961 rg ($) Tj /F4 10 Tf 0 0 0 rg ( lsblk) Tj T* .501961 .501961 .501961 rg (loop0 7:0 0 54.4M 1 loop /snap/core18/1055) Tj T* (loop1 7:1 0 4M 1 loop /snap/gnome-calculator/352) Tj T* (loop2 7:2 0 1008K 1 loop /snap/gnome-logs/57) Tj T* (loop3 7:3 0 140.7M 1 loop /snap/gnome-3-26-1604/90) Tj T* (loop4 7:4 0 35.3M 1 loop /snap/gtk-common-themes/1198) Tj T* (loop5 7:5 0 14.8M 1 loop /snap/gnome-characters/292) Tj T* (loop6 7:6 0 88.4M 1 loop /snap/core/7169) Tj T* (loop7 7:7 0 54.4M 1 loop /snap/core18/1049) Tj T* (loop8 7:8 0 149.9M 1 loop /snap/gnome-3-28-1804/67) Tj T* (loop9 7:9 0 149.9M 1 loop /snap/gnome-3-28-1804/63) Tj T* (loop10 7:10 0 3.7M 1 loop /snap/gnome-system-monitor/100) Tj T* (loop11 7:11 0 14.8M 1 loop /snap/gnome-characters/296) Tj T* (loop12 7:12 0 3.7M 1 loop /snap/gnome-system-monitor/95) Tj T* (loop13 7:13 0 2.3M 1 loop /snap/gnome-calculator/260) Tj T* (loop14 7:14 0 1008K 1 loop /snap/gnome-logs/61) Tj T* (loop15 7:15 0 88.5M 1 loop /snap/core/7270) Tj T* ET
481 1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
483 1 0 0 1 62.69291 547.8236 cm
490 .662745 .662745 .662745 RG
492 .960784 .960784 .862745 rg
493 n -6 -6 468.6898 216 re B*
496 .960784 .960784 .862745 rg
498 .960784 .960784 .862745 rg
500 .960784 .960784 .862745 rg
502 .960784 .960784 .862745 rg
504 .960784 .960784 .862745 rg
506 .960784 .960784 .862745 rg
507 n 0 132 255.22 12 re f*
508 .960784 .960784 .862745 rg
509 n 0 120 255.22 12 re f*
510 .960784 .960784 .862745 rg
512 .960784 .960784 .862745 rg
513 n 0 96 255.22 12 re f*
514 .960784 .960784 .862745 rg
515 n 0 84 297.22 12 re f*
516 .960784 .960784 .862745 rg
517 n 0 72 363.22 12 re f*
518 .960784 .960784 .862745 rg
520 .960784 .960784 .862745 rg
521 n 0 48 255.22 12 re f*
522 .960784 .960784 .862745 rg
523 n 0 36 363.22 12 re f*
524 .960784 .960784 .862745 rg
526 .960784 .960784 .862745 rg
527 n 0 12 315.22 12 re f*
528 .960784 .960784 .862745 rg
529 n 0 0 267.22 12 re f*
530 BT 1 0 0 1 0 194 Tm 12 TL /F4 10 Tf .501961 .501961 .501961 rg (loop16 7:16 0 14.5M 1 loop /snap/gnome-logs/45) Tj T* (loop17 7:17 0 4M 1 loop /snap/gnome-calculator/406) Tj T* (loop18 7:18 0 42.8M 1 loop /snap/gtk-common-themes/1313) Tj T* (loop19 7:19 0 140.7M 1 loop /snap/gnome-3-26-1604/88) Tj T* (sda 8:0 0 7.3T 0 disk) Tj T* /F5 10 Tf 12 TL (nn) Tj /F4 10 Tf 12 TL (sda1 8:1 0 128M 0 part) Tj T* /F5 10 Tf 12 TL (nn) Tj /F4 10 Tf 12 TL (sda2 8:2 0 7.3T 0 part) Tj T* (sdb 8:16 0 9.1T 0 disk) Tj T* /F5 10 Tf 12 TL (nn) Tj /F4 10 Tf 12 TL (sdb1 8:17 0 9.1T 0 part) Tj T* ( ) Tj /F5 10 Tf 12 TL (nn) Tj /F4 10 Tf 12 TL (mass-swap 253:0 0 128G 0 lvm [SWAP]) Tj T* ( ) Tj /F5 10 Tf 12 TL (nn) Tj /F4 10 Tf 12 TL (mass-storage 253:1 0 8T 0 lvm /mnt/mass/storage) Tj T* (sdc 8:32 0 9.1T 0 disk) Tj T* /F5 10 Tf 12 TL (nn) Tj /F4 10 Tf 12 TL (sdc1 8:33 0 9.1T 0 part) Tj T* ( ) Tj /F5 10 Tf 12 TL (nn) Tj /F4 10 Tf 12 TL (mass-scratch 253:2 0 2T 0 lvm /mnt/mass/scratch) Tj T* (nvme0n1 259:0 0 238.5G 0 disk) Tj T* /F5 10 Tf 12 TL (nn) Tj /F4 10 Tf 12 TL (nvme0n1p1 259:1 0 512M 0 part /boot/efi) Tj T* /F5 10 Tf 12 TL (nn) Tj /F4 10 Tf 12 TL (nvme0n1p2 259:2 0 238G 0 part /) Tj T* ET
537 1 0 0 1 62.69291 527.8236 cm
540 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (Plug in your usb drive and list all block devices again:) Tj T* ET
544 1 0 0 1 62.69291 410.6236 cm
551 .662745 .662745 .662745 RG
553 .960784 .960784 .862745 rg
554 n -6 -6 468.6898 108 re B*
557 .960784 .960784 .862745 rg
559 .960784 .960784 .862745 rg
561 .960784 .960784 .862745 rg
563 .960784 .960784 .862745 rg
565 .960784 .960784 .862745 rg
567 .960784 .960784 .862745 rg
568 n 0 24 315.22 12 re f*
569 .960784 .960784 .862745 rg
570 n 0 12 267.22 12 re f*
571 .960784 .960784 .862745 rg
573 BT 1 0 0 1 0 86 Tm 12 TL /F3 10 Tf 0 0 .501961 rg ($) Tj /F4 10 Tf 0 0 0 rg ( lsblk) Tj T* .501961 .501961 .501961 rg (.) Tj T* (.) Tj T* (.) Tj T* (nvme0n1 259:0 0 238.5G 0 disk) Tj T* /F5 10 Tf 12 TL (nn) Tj /F4 10 Tf 12 TL (nvme0n1p1 259:1 0 512M 0 part /boot/efi) Tj T* /F5 10 Tf 12 TL (nn) Tj /F4 10 Tf 12 TL (nvme0n1p2 259:2 0 238G 0 part /) Tj T* (sdd 8:48 1 7.5G 0 disk) Tj T* ET
580 1 0 0 1 62.69291 378.6236 cm
582 BT 1 0 0 1 0 14 Tm 1.310542 Tw 12 TL /F1 10 Tf 0 0 0 rg (Notice the new device, ) Tj /F6 10 Tf 0 0 0 rg (sdd) Tj /F1 10 Tf 0 0 0 rg (. It may be called differently on your machine, but will likely be named ) Tj /F6 10 Tf 0 0 0 rg (sdX) Tj /F1 10 Tf 0 0 0 rg T* 0 Tw (where ) Tj /F6 10 Tf 0 0 0 rg (X) Tj /F1 10 Tf 0 0 0 rg ( is a letter. The full name of your usb device is ) Tj /F6 10 Tf 0 0 0 rg (/dev/sdX) Tj /F1 10 Tf 0 0 0 rg (.) Tj T* ET
586 1 0 0 1 62.69291 348.6236 cm
589 BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL 3.17436 Tw (Be absolutely certain that you have correctly identified the USB device at this point. If you have) Tj T* 0 Tw (misidentified it, you will cause irreparable loss of data.) Tj T* ET
593 1 0 0 1 62.69291 330.6236 cm
596 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (Once identified, make sure you unmount or eject all partitions on the usb device.) Tj T* ET
600 1 0 0 1 62.69291 300.6236 cm
602 BT 1 0 0 1 0 3 Tm 18 TL /F2 15 Tf 0 0 0 rg (Linux install image) Tj T* ET
606 1 0 0 1 62.69291 234.6236 cm
608 BT 1 0 0 1 0 50 Tm .32686 Tw 12 TL /F1 10 Tf 0 0 0 rg (Find the installer image for your favourite debian based distribution. You can typically find these things by) Tj T* 0 Tw 1.16622 Tw (searching 'get <) Tj (distribution_name) Tj (>) Tj (', 'download <) Tj (distribution_name) Tj (>) Tj (' or 'install <) Tj (distribution_name) Tj (>) Tj (' with) Tj T* 0 Tw .209986 Tw (your favourite search engine. You can also look for tutorials about how to install that distribution. They will) Tj T* 0 Tw .97186 Tw (likely include instructions about getting the installer image. Download the image and make a note of it's) Tj T* 0 Tw (location.) Tj T* ET
612 1 0 0 1 62.69291 201.6236 cm
614 BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (Running disk_creator) Tj T* ET
618 1 0 0 1 62.69291 183.6236 cm
621 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (Run 'disk_creator.sh' with root privileges:) Tj T* ET
625 1 0 0 1 62.69291 150.4236 cm
632 .662745 .662745 .662745 RG
634 .960784 .960784 .862745 rg
635 n -6 -6 468.6898 24 re B*
638 .960784 .960784 .862745 rg
640 BT 1 0 0 1 0 2 Tm 12 TL /F3 10 Tf 0 0 .501961 rg ($) Tj /F4 10 Tf 0 0 0 rg ( sudo /path/to/disk_creator.sh /path/to/installer/image.iso /dev/sdX) Tj T* ET
647 1 0 0 1 62.69291 118.4236 cm
650 BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL 8.002126 Tw (For instance, if your usb device is '/dev/sdd' and your installer image is located at) Tj T* 0 Tw ('/home/user/Downloads/ubuntu-18.04-amd64.iso' run:) Tj T* ET
661 1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
663 1 0 0 1 62.69291 715.8236 cm
670 .662745 .662745 .662745 RG
672 .960784 .960784 .862745 rg
673 n -6 -6 468.6898 48 re B*
676 .960784 .960784 .862745 rg
678 .960784 .960784 .862745 rg
680 .960784 .960784 .862745 rg
682 BT 1 0 0 1 0 26 Tm 12 TL /F3 10 Tf 0 0 .501961 rg ($) Tj /F4 10 Tf 0 0 0 rg ( sudo /path/to/disk_creator.sh ) Tj /F3 10 Tf .733333 .4 .133333 rg (\\) Tj T* /F4 10 Tf 0 0 0 rg (>) Tj ( /home/user/Downloads/ubuntu-18.04-amd64.iso ) Tj /F3 10 Tf .733333 .4 .133333 rg (\\) Tj T* /F4 10 Tf 0 0 0 rg (>) Tj ( /dev/sdd) Tj T* ET
689 1 0 0 1 62.69291 671.8236 cm
692 BT 1 0 0 1 0 26 Tm /F1 10 Tf 12 TL .679988 Tw (The disk_creator will now run for some time while it copies things to the usb drive. Once it is done, read) Tj T* 0 Tw 2.866651 Tw (through the output it produced. If there are no obvious error messages, it should have completed) Tj T* 0 Tw (successfully.) Tj T* ET
696 1 0 0 1 62.69291 638.8236 cm
698 BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (Testing it worked) Tj T* ET
702 1 0 0 1 62.69291 608.8236 cm
705 BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL .20881 Tw (The USB drive should now have three partitions. One each of NTFS, ext4 and FAT32. When plugged into) Tj T* 0 Tw (a windows machine, one of them should appear as a large empty partition labeled 'usbdata'.) Tj T* ET
709 1 0 0 1 62.69291 578.8236 cm
712 BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL .625777 Tw (You should be able to boot from the USB drive, into whatever installer image you provided. If it does so,) Tj T* 0 Tw (test that a test file created on the desktop remains there after a reboot.) Tj T* ET
716 1 0 0 1 62.69291 560.8236 cm
719 BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (If all these tests are successful, everything should have worked.) Tj T* ET
723 1 0 0 1 62.69291 530.8236 cm
726 BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL .775251 Tw (If not, read the contents of the 'disk_creator.sh' script and try to understand what it is doing. It is heavily) Tj T* 0 Tw (commented.) Tj T* ET
734 /Nums [ 0 26 0 R 1 27 0 R 2 28 0 R ]
786 [<ea3341b450a1aab5e58aec3fbbc4efb6><ea3341b450a1aab5e58aec3fbbc4efb6>]
787 % ReportLab generated PDF document -- digest (http://www.reportlab.com)