💾 Archived View for jacksonchen666.com › posts › 2023-08-11 › 07-37-13 › index.gmi captured on 2024-05-12 at 15:15:33. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-11-04)

➡️ Next capture (2024-06-16)

-=-=-=-=-=-=-

Even More Random Qubes OS Nonsense

2023-08-11 07:37:13Z

File compression. Yeah I'm doing that.

So my plan is:

1. Setup a Qube

2. Put files in it

3. Compress the files in the Qube

4. Get the compressed files

While this sounds simple, there are a few issues I had:

So the actual process look something more like this:

1. Create a template Qube based on something like Fedora

It's like creating any other Qube, but you're creating a TemplateVM instead. Don't mess with the network settings, keep it default.

2. Install the software I need in the template Qube

This requires starting the template VM and running the package manager for it. Use the package manager as normal, because Qubes OS already deals with the mess of installing packages in a template VM with no internet access.

After installing the packages, just shutdown the template VM.

3. Create a Qube with a lot of storage space and a lot of memory for compressing, while using my new shiny template Qube

This requires creating *another* Qube, but this time, with a template based on your new and shiny one.

4. Create an SSH key to login to my system

`ssh-keygen` and whatever. Then transfer the public key into the authorized key file onto that computer.

5. Pull the files from my computer with rsync over ssh

You can specify some SSH location thingy as a source, and a destination as your local directory. So you can pull files instead of pushing them (which is much more complicated because of incoming connections and whatever).

6. Create a swap file (just in case)

Using `fallocate`, I made a swap file with quite a bit of space, so that just in case I did need more swap, I would already have them.

7. Shutdown all other Qubes that take up lots of memory for no apparent reason

I don't understand why sys-firewall takes up 4 gigabytes of RAM, but it does, according to `xentop` in dom0.

I basically had to stop all the Qubes, remove network access to the compressor (so that it doesn't start the network and the 4 gigabytes of RAM firewall), and then I can continue.

8. Start compressing the files

This is pretty much the longest part of the process.

If you're interested in the specifics of the command, it's for you if you're trying to do things like compress many likely similar APK and OBB files for some reason:

7z a -t7z -m0=lzma2 -mx=3 -mfb=273 -md=1536m -ms=4g -mmt=off -mmtf=off -mps=on -bt -myx=9 -bb3 output.7z input_folder/

Adapted from this StackOverflow answer

This step took nearly 7 hours for me on this crap laptop. It will also need a lot of RAM (I had about 12 GB/GiB), so reduce the `1536m` if 7z doesn't run well.

9. Push the compressed files to my computer with rsync over ssh

Same thing basically, just rsync your file to your computer, and there you have it.

And that's pretty much it.

public inbox (comments and discussions)

public inbox archives

(mailing list etiquette for public inbox)