OpenBSD - Encrypt Thumbdrive
Para criar um thumbdrive com crypto no OpenBSD.
Primeiro coloque o seu drive no seu pc. Use o dmesg para pegar o id do device que voce acabou de colocar, deve ser as ultimas linhas, logo:
dmesg | tail
No meu caso retornou:
sd2 at scsibus4 targ 1 lun 0: <Kingston, DataTraveler 3.0, PMAP> removable serial.09511666E3A08995038B
sd2: 59148MB, 512 bytes/sector, 121135104 sectors
OK, agora eu sei que o device que coloquei esta’ como sd2. Vamos limpar de fato o nosso device.
dd if=/dev/urandom of=/dev/rsd2c bs=1m
Isso vai escrever por todo device random bytes, limpando o que estiver la’ dentro. Isso pode/vai demorar um pouco.
Depois de zerar nosso device, vamos criar o registro MBR nele.
fdisk -iy sd2
Agora podemos criar uma particao com o formato RAID usando o disklabel.
disklabel -E sd2
Agora que criamos nossa particao a do tipo RAID. Vamos criar, um device raidsoft0 usando crypto.
bioctl -c C -l sd2a softraid0
Ele vai te perguntar o passphrase que voce deseja usar.
No final do processo ele vai te indicar o device id que foi gerado. No meu caso foi sd5. Agora podemos organizar o device e criar nossa particao e filesystem.
dd if=/dev/zero of=/dev/rsd5c bs=1m count=1
fdisk -iy sd5
disklabel -E sd5
O processo de criacao da particao e’ o mesmo que o anterior, porem agora vamos deixar o FS type padrao.
Por fim, criando o filesystem…
newfs sd5a
Seu device esta’ pronto para mount e uso.
Lembre-se de utilizar o bioctl depois de usar seu device.
bioctl -d sd5
Articles from blogs I follow around the net
Burnout
It kind of crept up on me. One day, sitting at my workstation, I stopped typing, stared blankly at the screen for a few seconds, and a switch flipped in my head. On the night of New Year’s Eve, my backpack was stolen from me on the train from Berlin to Amste…
via Drew DeVault's blog 2023-05-01 00:00Game of Trees 0.88 released!
Version 0.88 of Game of Trees has been released (and the port updated): * got 0.88; 2023-04-29 see git repository history for per-change authorship information - tog: always use alternate charset for vertical/horizontal line - several tog regression test suite …
via OpenBSD Journal 2023-04-30 10:27Let the charge come back, thinkpad…
So, I have a thinkpad x270 which is pretty good. However, for the past few months, I was having a lot of trouble to charge it. There was a single position and mood for it work charge normally. Well, no more! Let’s face the challenge of fixing it by myself.…
via Lucas E M M. opinions 2023-04-25 22:10Generated by openring
/comments ~umgeher/changelog@lists.sr.ht?Subject=Re: OpenBSD - Encrypt Thumbdrive
/permalink https://umgeher.org/posts/2022/04/openbsd-encrypt-thumbdrive.html