While working at Savoir-faire Linux (SFL) in Montreal, I was commissioned to perform some Linux experimentation on an old SBC, using Buildroot, the PREEMPT-RT kernel build option, and FTrace. The first two articles have been posted on SFL’s web site – part 1 and part 2.
Although the work dried up and they let me go, I still believe in the folks at SFL and their work.
To do LUKS, you need cryptsetup package. Use apt-get or apt command.
Configure LUKS partition
WARNING! The following command will remove all data on the partition that you are encrypting. You WILL lose all your information! So make sure you backup your data to an external source such as NAS or hard disk before typing any one of the following command.
In this example, I’m going to encrpt /dev/sdj1. Type the following command: # cryptsetup -y -v luksFormat /dev/sdj1
This will overwrite data on /dev/sdj1 irrevocably.
Are you sure? (Type uppercase yes): YES
Enter LUKS passphrase:
This command initializes the volume, and sets an initial key or passphrase. Please note that the passphrase is not recoverable so do not forget it.
Switching to UUID Instead of Block Device Name
At this point, you can switch to using UUID reference, so the mapping won’t change if, say, your block devices show up in a different sequence. To find the UUID for a given partition, do the following:
First, you need to write zeros to /dev/mapper/crypt_drobo2-5 encrypted device. This will allocate block data with zeros. This ensures that outside world will see this as random data i.e. it protect against disclosure of usage patterns: # dd if=/dev/zero of=/dev/mapper/crypt_drobo2-5
The dd command may take many hours to complete. I suggest that you use pv command to monitor the progress: # pv -tpreb /dev/zero | dd of=/dev/mapper/crypt_drobo2-5 bs=128M
dd: error writing '/dev/mapper/crypt_drobo2-5': No space left on device ]
200GiB 0:16:47 [ 203MiB/s] [ <=> ]
1600+1 records in
1599+1 records out
214746267648 bytes (215 GB, 200 GiB) copied, 1008.19 s, 213 MB/s
Yeah, in the machinations around my phones and breaking them, I wanted to put a few files onto the microSD card from the phone. I put it into an adapter, put the adapter into my computer, and… filesystem exFAT not recognized?!? Hmm.
I guess when I loaded up Ubuntu 18.04 onto this computer, I didn’t put the exFAT utilities onto it.
It turns out that it’s as simple as: sudo su -
apt-get install exfat-utils
Of course, you need to enter the root password when you “sudo su”.
It has been a minor annoyance for as long as I can remember. When using LINUX, or more specifically X-Windows on LINUX, clicking the mouse centre button would perform a paste wherever the cursor is right now. When you are using the scroll-wheel to scroll through a document, often the centre button has a hair-trigger and will perform a click (and therefore a paste) without even realizing it – and, boom! You have random (well, arbitrary) text in the middle of your document. Fortunately, if it’s source code, the compile or execution will almost always fail… so you can fix it. But, when it’s a word processing document… ugh! Continue reading “Centre Button BullSomething on LINUX”