The officially official Devuan Forum!

You are not logged in.

#26 2021-06-29 14:15:26

starbreaker
Member
From: United States
Registered: 2021-06-03
Posts: 23  
Website

Re: Today I Learned

TIL that cpupower-gui is a handy way to throttle clock speeds on my machines so that they aren't running quite as hot in the summer (they make good space heaters in the winter).

Last edited by starbreaker (2021-06-29 14:15:46)


"Out of order? [BLEEP!] Even in the future nothing works."
desktop: refurbished ThinkCentre M92p (i7, 32GB RAM, 1TB SSD, 2TB HDD)
laptop: refurbished Thinkpad T60 (Core 2 Duo, 3GB RAM, 1TB SSD)
gemini capsule: starbreaker.org

Offline

#27 2021-06-30 14:43:58

dice
Member
Registered: 2020-11-22
Posts: 559  
Website

Re: Today I Learned

starbreaker wrote:

TIL that cpupower-gui is a handy way to throttle clock speeds on my machines so that they aren't running quite as hot in the summer (they make good space heaters in the winter).

Nice gui utility that one. So many hidden gems inside debian.

Today i learnt about cryfs.

https://www.cryfs.org/tutorial

cryfs - cryptographic filesystem for the cloud

CryFS encrypts your files, so you can safely store them anywhere.

       The  goal  of  CryFS is not only to keep file contents, but also file sizes, metadata and directory structure confidential.  CryFS uses en‐
       crypted same-size blocks to store both the files themselves and the block's relations to another.  These blocks are  stored  as  individual
       files in the base directory, which can then be synchronized with cloud services such as Dropbox.

       The  blocks  are  encrypted using a random key, which is stored in a configuration file encrypted by the user's passphrase.  By default, it
       will be stored together with the data in the base directory, but you can choose a different location if you do not want it in your cloud or
       when using a weak passphrase.

Offline

#28 2021-07-01 01:42:22

Tatwi
Member
From: Canada
Registered: 2018-10-24
Posts: 71  
Website

Re: Today I Learned

TIL how to mount the disk image file I use as a hard drive in DOS with PCem. This is one of those things that I used to know at one point, but suffered from the o'l "use it or lose it" problem.

Beforehand: Run PCem, configure the machine, make a new hard drive image, run the machine, configure the drive in the BIOS, install DOS on it (using floppy disk images), exit PCem.

These commands must be run with root privilages (I use sudo).

# Attach the hard drive image file as a loopback device
losetup -f -P /home/rob/.pcem/disks/dos_622_62mb.img

# Verify the loopback device is the expected number and has the expected partition
losetup -l

# Mount the partition and open in the file explorer
mount /dev/loop0p1 /mnt
caja /mnt

Copy files to/from the DOS hard drive.

# Disconnect and unmount the hard drive image file
umount /dev/loop0p1
losetup -d /dev/loop0

# Verify loopback is cleared (shouldn't output anything)
losetup -l

It's still way less of a hassle to use DOSBox, as it uses files directly on your normal file system, but each emulator has its use cases.

Offline

#29 2021-07-01 05:05:25

ralph.ronnquist
Administrator
From: Clifton Hill, Victoria, AUS
Registered: 2016-11-30
Posts: 1,106  

Re: Today I Learned

Note that recently the kernel's loop module has max_part=0 by default, which means that the partitions (eg /dev/loop0p1) will not be set up. Many strands of hair have been lost due to this.

To get the good  behaviour, I've added a file /etc/modprobe.d/loop.conf with the following line:

options loop max_part=15

before the loading of the loop module. Almost any number other than 15, within bounds, is also fine.

Offline

#30 2021-07-01 06:47:25

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Today I Learned

Disk images can be mounted directly if the partition offset is known:

$ gdisk -l disk.img
[...]
Number  Start (sector)    End (sector)  Size       Code  Name
   1              34            2047   1007.0 KiB  EF02  BIOS boot partition
   2            2048        20971486   10.0 GiB    8300  Linux filesystem
$ sudo mount -o offset=$((2048*512)) disk.img /mnt
$ ls /mnt
bin   dev  home  lost+found  mnt  proc  run   srv  tmp  var
boot  etc  lib   media       opt  root  sbin  sys  usr
$

Brianna Ghey — Rest In Power

Offline

#31 2021-07-04 12:26:44

dice
Member
Registered: 2020-11-22
Posts: 559  
Website

Re: Today I Learned

Yesterday really but playing around with it some more today. I seem to be gravitating towards encryption, fascinating stuff imo, especially this post quantum computing cryptography.

https://gitea.blesmrt.net/exa/codecrypt

its in the repos - do a # apt install codecrypt

Codecrypt - ccr

The post-quantum cryptography tool.

Codecrypt is currently unmaintained, although I still successfully use it. If you are interested in developing/maintaining it, ping me.
About

This is a GnuPG-like unix program for encryption and signing that uses only quantum-computer-resistant algorithms:

    McEliece cryptosystem (compact QC-MDPC variant) for encryption
    Hash-based Merkle tree algorithm (FMTSeq variant) for digital signatures

Codecrypt is free software. The code is licensed under terms of LGPL3 in a good hope that it will make combinations with other tools easier.
Why this?

Go read http://pqcrypto.org/

Last edited by dice (2021-07-04 12:31:16)

Offline

Board footer