Skip to content

u/Fearless_Process

In this archive from Apr 2020 to Oct 2022

5
posts
254
comments
0
media
1.4k
score

Top posts

Unable to restore system from image created with 'e2image'. Any chance of recovering my system?

So I wanted to try a new distro out, so I figured I would create an image of my system and store it on an external SSD that I just bought. I've had great success restoring systems from images before, though normally I just imaged the entire devices or partitions with cat or dd, piped it through lz4,...

1 points2 comments
Open on Reddit

Networking: Isolate qemu VM from host network without completely disabling internet access to the guest

This question is pretty hard to google and find any information about.. My goal is to have a VM that has internet access, but is able to be filtered in some way from accessing any servers listening on the host. For example, I have a webserver binded to port 8080 on the host, I would like a way to pr...

1 points8 comments
Open on Reddit

Top comments

Malware can just create a service to start itself upon boot via systemd or inject itself into one of the existing services that are required for a functional system. There are tons of other ways it can become persistent as well, that's just an example I thought of quickly.

Secure boot provides zero protection from malware that already has RCE as root. It does protect against someone physically tampering with your bootloader though, but only provides extra security if you use full disk encryption and hopefully some sort of verification scheme such as dm-integrity (encryption is not authentication!).

I guess if you somehow acquired malware and reinstalled the system but not the bootloader it would protect against this, but I don't really understand why you wouldn't reinstall the bootloader along with the rest of the system in this case.

82 points

I think systemd is much more powerful than you seem to be aware of, I don't mean that in a mean way.

Systemd has a lot of features rather than just starting services and keeping them running. You should checkout the different targets, and more importantly some of the options like Wants, WantedBy, After, Before, Conflicts, etc. You can for example tell a service to run during poweroff but before the filesytems get mounted read only, just as an example. It's also convenient that systemd is responsible for monitoring when to sleep, hibernate, reboot, sleep when the laptop lid closes, and all of that good stuff.

Can you give me an example of what exactly you want to implement? I may be able to help a little bit more if given some specifics. You should def check out some of systemd's documentation though, it's a complicated but very powerful piece of software :) (and really good at what it does despite the controversy).

77 points

Text does not take up very much space, when compiled to machine code it may even take less, especially after optimization passes by the compiler. The kernel is actually massive from a programming standpoint.

Remember that you can fit a dictionary worth of text in like a few mb, and all of wikipedia's text is a only a few dozen GB.

Also like others have said most drivers can be compiled as modules that are loaded as needed rather than baked directly into the kernel itself. On gentoo the total size of my kernel + modules was like 300-400mb iirc, which is really quite large considering that it's all just binary executable data and not pictures or videos or anything like that.

57 points

Bubblewrap is a nice lightweight wrapper around namespaces that can totally disable all network access, among other things.

bwrap --bind / / --unshare-net firefox

Firejail and bubblewrap are similar but bwrap is much more simple and a bit lower level, it also provides lots of flexibility.

You can use namespaces directly with the unshare command as well. I don't remember the exact flags but you need to unshare user and network namespaces.

49 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.