initial commit

This commit is contained in:
Malin Freeborn
2020-01-02 01:04:35 +01:00
commit 6befc5d3c1
162 changed files with 19086 additions and 0 deletions

43
distros/void/autologin Normal file
View File

@@ -0,0 +1,43 @@
# Automatic Login On TTY1
Create a new autologin service:
> cp -R /etc/sv/agetty-tty1 /etc/sv/agetty-autologin-tty1
Note: The name of the custom service file must end with -tty1 (or another valid port). Otherwise the run-script will not work.
> vim /etc/sv/agetty-autologin-tty1/conf:
```
GETTY_ARGS="--autologin yourusernamehere --noclear"
BAUD_RATE=38400
TERM_NAME=linux
```
If you are logged in on tty1 right now, logout, switch to tty2 (with CTRL+ALT+F2) and re-login there.
Disable the regular tty1 service and enable autologin:
> rm /var/service/agetty-tty1
> ln -s /etc/sv/agetty-autologin-tty1 /var/service
Now switch to tty1 and you should already be logged in there automatically.
Autostart Graphical Environment on Login
Add the following to your shell's profile file to start X and lock the tty session:
# Autologin on tty1
In `bashrc`.
```
if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then
exec startx
fi
```

21
distros/void/autologin.md Normal file
View File

@@ -0,0 +1,21 @@
Make the autologin service:
> cp -R /etc/sv/agetty-tty1 /etc/sv/agetty-autologin-tty1
> echo "GETTY_ARGS="--autologin yourusernamehere --noclear"
> BAUD_RATE=38400
> TERM_NAME=linux" > /etc/sv/agetty-autologin-tty1/conf
> rm /var/service/agetty-tty1
> ln -s /etc/sv/agetty-autologin-tty1 /var/service
Then stick this at the end of the bashrc:
```
# autologin on tty1
if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then
exec startx
fi
```

20
distros/void/basics.md Normal file
View File

@@ -0,0 +1,20 @@
# vkpurge
Old Void kernels are left on the boot partition. List them with:
> vkpurge list
Remove one with:
> vkpurge 2.8.2_4
Remove all but the latest with:
> vkpurge rm all
# Brightness
/sys/class/backlight/*/brightness

12
distros/void/extrace.md Normal file
View File

@@ -0,0 +1,12 @@
Monitor all processes:
> extrace
Monitor one process:
> extrace ls
Monitor a script:
> ./script.sh | extrace

20
distros/void/kernels.md Normal file
View File

@@ -0,0 +1,20 @@
# vkpurge
Old Void kernels are left on the boot partition. List them with:
> vkpurge list
Remove one with:
> vkpurge 2.8.2_4
Remove all but the latest with:
> vkpurge rm all
# Troubleshooting
Filled up your /boot? Try reconfiguring and installing the latest:
> xbps-reconfigure -f linux5.2

6
distros/void/keyboard Normal file
View File

@@ -0,0 +1,6 @@
To list keyboard specs:
> locale

64
distros/void/lxc Normal file
View File

@@ -0,0 +1,64 @@
#Intro
Taken from [this](https://r4nd0m6uy.ch/unpriviledged-containers-in-void-linux.html)
Void linux requires additional steps to set up, as Systemd is no present to automatically take care of everything.
> sudo xbps-install cgmanager dbus bridge-utils lxc
Next, startup services:
> sudo ln -s /etc/sv/dbus/ /var/service/
> sudo ln -s /etc/sv/cgmanager/ /var/service/
> sudo sv start dbus
> sudo sv start cgmanager
> sudo sv start dbus
> sudo sv start cgmanager
Maps your user account to the lxc g/u ids:
> sudo usermod --add-subuids 100000-165536 $USER
> sudo usermod --add-subgids 100000-165536 $USER
Then add a bridge interface to connect the container.
> sudo brctl addbr lxbr0
Then add an interface. I have no idea how this is done or what it means, so I tried my wifi 'wlp3s0', and that was refused. I tried the guide's one, which obviously didn't work as I didn't have the same interface as in the guide. Finally, I tried `ip addr show` and noticed other devices 'lo' and 'wwp0s20u4i6'. This gave me:
> sudo brctl addif lxbr0 wwp0s20u4i6
... which worked.
If you don't want to redo this each boot, you can make a runit service for it apparently - more research is required for this. For now, I'm just copy-pasting the guide (almost) and sticking this in ~/.config/lxc/default.conf:
`lxc.network.type = veth`
`lxc.network.link = wwp0s20u4i6`
`lxc.network.flags = up`
`lxc.network.hwaddr = 00:16:3e:BB:CC:DD`
`lxc.id_map = u 0 100000 65536`
`lxc.id_map = g 0 100000 65536`
You can now configure a different bridge each boot to connect with the lxc containers, or ....
Next, do this at *every boot* (or script it):
> sudo cgm create all $USER
> sudo cgm chown all $USER $(id -u) $(id -g)
> cgm movepid all $USER $$

View File

@@ -0,0 +1,34 @@
# Bridged adapters
Virtual machines can use a bridge to connect to the internet. Access the manual with
> man brctl
You can add a new bridge with:
> brctl addbr <name>
... and delete a bridge by pulling it down, then
> brctl delbr <name>
# wpa_supplicant
> scan
> scan_results
> add_network
> set_network 0 ssid "MYSSID"
> set_network 0 psk "passphrase"
OR > set_network 0 key_mgmt NONE
> enable_network 0
> save_config
might want to 'sudo sv restart dhcpcd'

View File

@@ -0,0 +1,20 @@
#!/bin/sh
ln -s /etc/sv/ntpd /var/service
sv start ntpd
sleep 3
ntpd -q
echo 'dtparam=audio=on' >> /boot/config.txt
xbps-install -Syuv
xbps-install -Sy xorg-minimal xf86-video-fbturbo
useradd -m -G wheel,audio,video ghost
xbps-install sc-im vim cowsay lolcat-c ranger lf bash

12
distros/void/sv Normal file
View File

@@ -0,0 +1,12 @@
# Basics
Services display in /var/service
sv up ssh
sv down ssh
sv restart ssh
# Making a Service
Look in the `/etc/sv` directory, then in the existing services' run files.
You'll find a simple dash script (therefore Posix compliant).

115
distros/void/xbps.md Normal file
View File

@@ -0,0 +1,115 @@
Install cowsay
> xbps-install cowsay
Look for cowsay
> xbps-query -Rs cowsay
Upgrade current packages. -R looks at repositories, -s makes things sloppy.
> xbps-install -Suv
Remove cowsay
> xbps-remove cowsay
...and all dependencies
> xbps-remove -R cowsay
Reinstall cowsay
> xbps-install -f
Reconfigure all packages. Useful for breakages.
> xbps-pkgdb -a
Remove all dependencies.
> xbps-remove -o
Show information about cowsay
> xbps-query -RS cowsay
Search for cows
> xbps-query -Rs cows
List packages requiring updates.
> xbps-install -Suvn
List what's required for cowsay
> xbps-query -x cowsay
List what's installed.
> xbps-query -l
Clean.
> xbps-remove -O
apt update
> xbps-install -S
Remove package information.
> xbps-query -R
Display all cowsay files
> xbps-query -Rf cowsay
Do I have cowsay installed?
> xbps-query -s cowsay
What packages are pointless?
> xbps-query -O
> xbps-install -Sn cowsay
A dry-run of installing cowsay, without actually intalling.
# Advanced
> xbps-query -x cowsay
Show cowsay's dependencies. The -R flag's required for a remote package.
> xbps-query -X cowsay
Show the reverse dependencies of a package.
> xbps-query -XR cowsay
Show all reverse dependencies of a package, including repository packages.
> xbps-query -m
List all manually installed software.
# Problems
Look for broken packages.
> sudo xbps-pkgdb -a
And if you've found any, you might try:
> sudo xbps-reconfigure -af
This reconfigures all packages forcefully.
If that doesn't help the issue, try to find the broken package and forcefully reinstall:
> xbps-query -s gnutls
> sudo xbps-install -f gnutls