📜 ⬆️ ⬇️

Another way to put tails on a USB flash drive (and get your gigabytes back)

Good afternoon, reader!


TAILS is a great live distribution that you can check your laptop before you buy and through which you can safely work on the network and which does not leave a trace on the machine. This case weighs only 1.3 Gb.

Training


We take the usual flash drive,

  Disk / dev / sdb: 14.3 GiB, 15376000000 bytes, 30031250 sectors
 Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical / physical): 512 bytes / 512 bytes
 I / O size (minimum / optimal): 512 bytes / 512 bytes
 Disklabel type: dos 

she is "empty":
')


Download the tails-tails-amd64-3.0.iso image, the tails -amd64-3.0.iso.sig signature and the tails-signing.key key (if you haven’t downloaded yet), which we import into keyring gpg2 --import tails-signing.key (if you have gpg , and no gpg2 , then use gpg ).

Then we check the image:

gpg2 --keyid-format 0xlong --verify tails-amd64-3.0.iso.sig tails-amd64-3.0.iso

In case of failure:

  gpg: Signature made Sat Jun 10th 2017 05:37:05 PM CEST
 gpg: using RSA key 0x3C83DCB52F699C56
 gpg: BAD signature from "Tails developers (offline long-term identity key) <tails@boum.org>" [unknown] 


In case of success:

  gpg: Signature made Sat Jun 10th 2017 05:37:05 PM CEST
 gpg: using RSA key 0x3C83DCB52F699C56
 gpg: Good signature from "Tails developers (offline long-term identity key) <tails@boum.org>" [unknown]
 gpg: aka "Tails developers <tails@boum.org>" [unknown]
 gpg: WARNING: this key is not certified with a trusted signature!
 gpg: There is no indication that the signature belongs to the owner.
 Primary key fingerprint: A490 D0F4 D311 A415 3E2B B7CA DBB8 02B2 58AC D84F
 Subkey fingerprint: A509 1F72 C746 BA6B 163D 1C18 3C83 DCB5 2F69 9C56 



"Installation"


Next, we write through dd image on the USB flash drive:

dd bs=4M if=tails-amd64-3.0.iso of=/dev/sdb && sync
  288 + 1 records in
 288 + 1 records out
 1209116672 bytes (1.2 GB) copied, 83.0623 s, 14.6 MB / s 

From this point on, we can insert this flash drive into the computer or laptop and we will have TAILS \ 0 / loaded.

Continuation


For those to whom this seemed too simple, as well as too distrustful, this chapter and the following are prepared.

This is what our “flash drive” looks like now:

  Disk / dev / sdb: 14.3 GiB, 15376000000 bytes, 30031250 sectors
 Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical / physical): 512 bytes / 512 bytes
 I / O size (minimum / optimal): 512 bytes / 512 bytes
 Disklabel type: dos
 Disk identifier: 0x0000002a

 Device Boot Start End Sectors Size Id Type
 / dev / sdb1 * 0 2361554 2361555 1.1G 17 Hidden HPFS / NTFS 


And lsblk -f returns:

  sdb iso9660 TAILS 3.0 - 20170610 2017-06-10-14-06-10-00
 S─sdb1 iso9660 TAILS 3.0 - 20170610 2017-06-10-14-06-10-00 


Disorder!

e2label /dev/sdb "mydiskname"
  e2label bad badge in super-block while trying to open / dev / sdb 

e2label /dev/sdb1 "mydiskname"
  e2label bad badge in super-block while trying to open / dev / sdb1
 Couldn't find valid filesystem superblock. 

You see, “forgive 16GB ..” and hello, “I am TAILS 3.0 - 20170610 2017-06-10-14-06-10-00 !! 1” .

Advanced installation


Labels in the image (see sha1 & sha256!) Are in positions 32808 & 36904. Dates come out at 33581 & 37676. Data can be corrected with pens via bless (hex-editor for debian) or through any other editor or ... through dd, go to in the folder with the image and ..:

  echo -ne \\ x53 \\ x41 \\ x4E \\ x44 \\ x49 \\ x53 \\ x4B \\ x20 \\ x55 \\ x4C \\ x54 \\ x52 \ x41 \\ x46 \\ x49 \\ x54 \\ x20 \\ x20 \\ x20 \\ x20 \\ x20 \\ x20 \\ x20 \\ x20 \\ x20 \\ x20 | dd conv = notrunc bs = 1 seek = 32808 of = tails-amd64-3.0. iso 

  26 + 0 records in
 26 + 0 records out
 26 bytes (26 B) copied, 6.9594e-05s, 374 kB / s 

  echo -ne \\ x31 \\ x39 \\ x37 \\ x39 \\ x30 \\ x31 \\ x30 \\ x31 \\ x30 \\ x30 \\ x30 \\ x30 \\ x30 \\ x30 \\ x30 \\ x30 \ x00 \ x31 \ x39 \ x37 \ x39 \ x30 \ x31 \ x30 \ x31 \ x30 \ x30 \ x30 \ x30 \ x30 \ x30 \ x30 \ \ x30 | dd conv = notrunc bs = 1 seek = 33581 of = tails-amd64-3.0.iso 

  33 + 0 records in
 33 + 0 records out
 33 bytes (33 B) copied, 6.7797e-05 s, 487 kB / s 

Replaces the label and the date at the beginning (for the final SANDISK ULTRAFIT & 1979-01-01-00-00-00-00 )
  echo -ne \\ x00 \\ x53 \\ x00 \\ x41 \\ x00 \\ x4E \\ x00 \\ x44 \\ x00 \\ x49 \\ x00 \\ x53 \\ x00 \\ x4B \\ x00 \\ x20 \\ x00 \\ x55 \\ x00 \\ x4C \\ x00 \\ x54 \\ x00 \\ x52 \\ x00 \\ x41 \\ x00 \\ x46 \\ x00 \\ x49 \\ x00 \\ x54 | dd conv = notrunc bs = 1 seek = 36904 of = tails-amd64-3.0.iso 

  32 + 0 records in
 32 + 0 records out
 32 bytes (32 B) copied, 6.8662e-05s, 466 kB / s 

  echo -ne \\ x00 \\ x31 \\ x39 \\ x37 \\ x39 \\ x30 \\ x31 \\ x30 \\ x31 \\ x30 \\ x30 \\ x30 \\ x30 \\ x30 \\ x30 \\ x30 \ x30 \ x00 \ x31 \ x39 \ x37 \ x39 \ x30 \ x31 \ x30 \ x31 \ x30 \ x30 \ x30 \ x30 \ x30 \ x30 \ \ x30 \\ x30 | dd conv = notrunc bs = 1 seek = 37676 of = tails-amd64-3.0.iso 

  34 + 0 records in
 34 + 0 records out
 34 bytes (34 B) copied, 0.000132513 s, 257 kB / s 

labels and tags with the next entry.

Following the "boo" this image on our flash drive:

dd bs=4M if=tails-amd64-3.0.iso of=/dev/sdb && sync
  288 + 1 records in
 288 + 1 records out
 1209116672 bytes (1.2 GB) copied, 89.9522 s, 13.4 MB / s 

(bs = 8M did not add speed, I'm afraid to put more, since the animal is not heated as a child ... USB3.0 facepalm Karl!)

fdisk -l /dev/sdb
  Disk / dev / sdb: 14.3 GiB, 15376000000 bytes, 30031250 sectors
 Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical / physical): 512 bytes / 512 bytes
 I / O size (minimum / optimal): 512 bytes / 512 bytes
 Disklabel type: dos
 Disk identifier: 0x0000002a

 Device Boot Start End Sectors Size Id Type
 / dev / sdb1 * 0 2361554 2361555 1.1G 17 Hidden HPFS / NTFS 

And lsblk -f returns:

  sdb iso9660 SANDISK ULTRAFIT 1979-01-01-00-00-00-00
 S─sdb1 iso9660 SANDISK ULTRAFIT 1979-01-01-00-00-00-00 


We return gigabytes


2361555512 = 1209116160 bytes or 1153Mb. Open our gparted:



We ignore and select (in my case / dev / sdb):



Create a partition, I chose ntfs, so that it can be typed into Windows computers:



Since our image ate out 1.2 gig from the beginning, we leave (a beautiful number) 1536 MB from the beginning unused and give everything else to our / your section.



Let's ignore again. And voilĂ , ready:



Perform a flash drive (for this you need to plug it out of USB and plug it back in):

fdisk -l /dev/sdb issues
  Disk / dev / sdb: 14.3 GiB, 15376000000 bytes, 30031250 sectors
 Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical / physical): 512 bytes / 512 bytes
 I / O size (minimum / optimal): 512 bytes / 512 bytes
 Disklabel type: dos
 Disk identifier: 0x0000002a

 Device Boot Start End Sectors Size Id Type
 / dev / sdb1 3145728 30029823 26884096 12.8G 7 HPFS / NTFS / exFAT 


lsblk -f issues

  sdb iso9660 SANDISK ULTRAFIT 1979-01-01-00-00-00-00
 S─sdb1 ntfs SANDISK ULTRAFIT 733D430C617B2382 

USB flash drive works:



And tails loaded!



The crocodile is caught, and the coconut grows!

Have a nice job, safe surfing, may the power of 0 /

ZY, of course, anyone who uses lsblk can pay attention to iso9660 ... let another installation method be in another article!

Source: https://habr.com/ru/post/332032/


All Articles