You are not logged in.

#1 2019-01-13 09:18:43

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,292
Website

Useful links to docs and tutorials

This thread is for those online docs that you've found useful or enlightening, or that explained something you didn't previously understand properly, or anyway that you think is worth preserving for others, or possibly might want to refer to in the future without having to search the whole forum for a certain link you found a year ago...

Please add a bit of info about why it's so useful, not just a plain link!

Anyway, here's one I've just read about mounting permissions and polkit, which goes in to the whole topic quite thoroughly:
http://smcv.pseudorandom.co.uk/2015/why_polkit/

Summary

   

  • Kernel-based permission checks are not sufficiently fine-grained to be able to express some quite reasonable security policies

  • Fine-grained access control needs domain-specific understanding

  • The kernel doesn't have that information (and neither does dbus-daemon)

  • The privileged service that does the domain-specific thing can provide the domain-specific understanding to turn the request into an action

  • polkit evaluates a configurable policy to determine whether privileged services should carry out requested actions

Last edited by johnraff (2019-01-13 09:20:13)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#2 2019-01-13 13:23:52

S7.L
Member
Registered: 2018-09-16
Posts: 338

Re: Useful links to docs and tutorials

I cant remember the exact place that got me out of trouble on the internet now but i had used cfdisk from a live session to resize a multiboot partition, bad idea. So it involved booting to the live session again and using learning various fsck tools in linux because the partition sda5 now had inconsistency in the block sectors and it would not boot.

The only method that fixed this was to use resize2fs.

First search for a backup block with maybe this ..

dumpe2fs /dev/sda5 | grep -i superblock

Not really a how to this thread so i will end it there, it pays to read up on file system recovery methods such as fsck, mke2fs, dumpe2fs, resize2fs etc..

https://www.systutorials.com/docs/linux … resize2fs/

Offline

#3 2019-01-13 17:14:41

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 730

Re: Useful links to docs and tutorials

When troubleshooting old, oddball, and otherwise cranky hardware that's refusing to boot properly, and you want to find the kernel parameter to get shot of the error:

This is the resource:
https://www.kernel.org/doc/html/v4.15/a … eters.html

Also useful to get rid of errors that go past but don't stop you booting, but still annoy you.

Rest of the document is also very useful, especially if you ever have a need to compile a custom or really new kernel.


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#4 2019-01-13 17:22:32

ohnonot
...again
Registered: 2015-09-29
Posts: 4,877
Website

Re: Useful links to docs and tutorials

^ choose your kernel version here: https://www.kernel.org/doc/html/
one can also use this: https://github.com/torvalds/linux/blob/ … meters.txt - apparently always the current, newest git version.


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

#5 2019-04-28 07:56:13

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,292
Website

Re: Useful links to docs and tutorials

An overview of Secure Boot in Debian
https://debamax.com/blog/2019/04/19/an- … in-debian/

(Put here so I can read it later.)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#6 2019-05-21 04:03:50

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,292
Website

Re: Useful links to docs and tutorials

Upgrades from Debian 9 (stretch)

A guide to upgrading from Stretch to Buster, from the work-in-progress Buster release notes:
https://www.debian.org/releases/buster/ … ng.en.html

This might be useful soon.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#7 2019-06-29 12:20:39

clusterF
Member
Registered: 2019-05-07
Posts: 539

Re: Useful links to docs and tutorials

https://wiki.archlinux.org/index.php/Ex … encryption

Im using this on archlinux and it is a very ingenious EXT4 file based encryption method.

Im not sure what kernel this was introduced in, having a look see now as it might not be relevant to debian stable.

Introduced in kernel 4.1 so all good.

https://blog.quarkslab.com/a-glimpse-of … ption.html

Last edited by clusterF (2019-06-29 12:29:27)

Offline

#8 2019-06-30 06:25:18

ohnonot
...again
Registered: 2015-09-29
Posts: 4,877
Website

Re: Useful links to docs and tutorials

^ very nice feature.
It means I'll be needing one less software soon.


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

#9 2019-10-27 11:27:07

clusterF
Member
Registered: 2019-05-07
Posts: 539

Re: Useful links to docs and tutorials

This is a good resource on shell scripting. Really goes into great detail with examples and practical lessons. I found the whole section on writing shell scripts enlightening, however the section on Keyboard Input and Arithmetic was an eye opener.

http://linuxcommand.org/index.php

Last edited by clusterF (2019-10-27 11:39:20)

Offline

#10 2019-10-27 12:21:32

ohnonot
...again
Registered: 2015-09-29
Posts: 4,877
Website

Re: Useful links to docs and tutorials

clusterF wrote:

https://wiki.archlinux.org/index.php/Ex … encryption

Im using this on archlinux and it is a very ingenious EXT4 file based encryption method.

Im not sure what kernel this was introduced in, having a look see now as it might not be relevant to debian stable.

Introduced in kernel 4.1 so all good.

https://blog.quarkslab.com/a-glimpse-of … ption.html

I totally forgot about this!
https://wiki.archlinux.org/index.php/Fscrypt
Seems a little complex - I hope I won't forget about it again - it's not a high priority.


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

#11 2019-10-27 13:11:32

clusterF
Member
Registered: 2019-05-07
Posts: 539

Re: Useful links to docs and tutorials

^ That looks like a new entry in the arch wiki? Covers f2fs file system too. Interesting, thanks for sharing.

Offline

#12 2019-12-18 10:11:38

clusterF
Member
Registered: 2019-05-07
Posts: 539

Re: Useful links to docs and tutorials

I just came across a program called gocryptfs and found this tutorial or sorts.

https://sudomakemeablog.wordpress.com/2 … eat-sheet/

This is perfect (imo) if you dont want whole system encryption and just file/directory encryption.

You could fire off a startup script like so to automate things a little better from either openbox/autostart or .xinitrc or whatever you use to autostart programs.

call it gocrypt.sh or something that doesn't clash with gocryptfs.

#!/usr/bin/env bash
echo "Enter your gocryptfs password"
if      mkdir /tmp/decrypted; then
        xterm -e "bash -c 'gocryptfs encrypted /tmp/decrypted;$SHELL'"
fi

or just a one liner.

xterm -e "bash -c 'echo Enter your gocryptfs password && mkdir /tmp/decrypted && gocryptfs encrypted /tmp/decrypted;$SHELL'"

Last edited by clusterF (2019-12-18 11:56:59)

Offline

#13 2020-07-23 05:11:25

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,292
Website

Re: Useful links to docs and tutorials

Trying to figure out why a script running on dash wasn't running an EXIT trap on Ctrl+C (not an unreasonable thing to want). Much internet searching, finally found a workaround, but in the process ran into a couple of deep, deep webpages with huge amounts of info about systems and shells I'd had no idea even existed.

A humbling experience.

Portable Shell Programming
For userland utilities on BunsenLabs, or anyway Debian, bash is much more writer-friendly than a basic POSIX shell. Arrays, process substitution and feature after feature...
But if you're writing a system script, quite likely going to be run as root, then it had better be reliable and predictable, and not change its behaviour if someone runs it on a different system, or after a package upgrade. For that, you're better off with a #!/bin/sh shebang and trying to make the whole thing as POSIX-compliant as you can. Not always that easy (shellcheck and checkbashisms can help), but this page has a huge amount of things you can do to make your scripts as shell-friendly as possible: https://www.gnu.org/software/autoconf/m … Shell.html
Written in 2012, and some of it we can thankfully forget about in 2020, but still monumental.
Example sub-page: https://www.gnu.org/software/autoconf/m … ltins.html

arbitrary unix stuff
I haven't even begun to read this yet, but it looks to be in the same league (and written in 2009).
Good read for a Sunday afternoon. https://www.in-ulm.de/~mascheck/various/

Example hint on Useful use of cat:

create text files without editor

  cat > textfile

then typing plain text and closing with EOF (aka <ctrl-d>) was the quickest way for me to create text files on systems running in some rescue mode.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#14 2020-09-19 07:14:05

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,292
Website

Re: Useful links to docs and tutorials

Debian Installer Components

This is quite a good description of the different parts of the Debian Installer:
https://www.debian.org/releases/stable/ … 03.en.html


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

Board footer

Powered by FluxBB