Compare commits
No commits in common. "0da2b4c7e89c1a4e76fc453686d9cdd1af1d6911" and "ba8026e0c36e99ea4377305d2b98e2a82646059c" have entirely different histories.
0da2b4c7e8
...
ba8026e0c3
38
README.md
38
README.md
@ -26,44 +26,32 @@ The chronology should never branch.
|
||||
If `gitea` can use three different types of database, the documentation should simply pick one and continue instructions from there.
|
||||
Repetition works better than a reference - if a database requires three commands to set up, it's better to repeat those three commands for every program that requires a database than to just link to another file which discusses databases.
|
||||
|
||||
### Closing
|
||||
|
||||
Introductory documents should show anything required to cleanly uninstall a program, without leaving bulky configuration files behind.
|
||||
|
||||
## Three Input Types
|
||||
|
||||
There are three types of examples:
|
||||
|
||||
Fixed input:
|
||||
|
||||
```bash
|
||||
ls
|
||||
> ls
|
||||
|
||||
Arbitrary Input shows the non-fixed input in italics:
|
||||
|
||||
> ls *myFile.txt*
|
||||
|
||||
Output shows as unformatted text:
|
||||
|
||||
```
|
||||
|
||||
Anything with arbitrary input should be shown as a variable.
|
||||
|
||||
```bash
|
||||
ls $FILE
|
||||
LK img
|
||||
Mail kn
|
||||
Projects music
|
||||
```
|
||||
|
||||
Non-commands (e.g. output) should be shown as quoted text:
|
||||
|
||||
> LK img
|
||||
> Mail kn
|
||||
> Projects music
|
||||
|
||||
# Example
|
||||
|
||||
```
|
||||
How to see which websites you're actively accessing:
|
||||
|
||||
` ` `bash
|
||||
ss -tr dst :$PORT
|
||||
` ` `
|
||||
|
||||
> State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
|
||||
> ESTAB 0 0 192.168.0.14:42476 149.154.167.91:https
|
||||
> ESTAB 0 0 192.168.0.14:43644 104.17.90.199:https
|
||||
> ss -tr dst :443
|
||||
|
||||
```
|
||||
|
||||
@ -88,5 +76,5 @@ This started as a few personal notes, and will probably continue to look like th
|
||||
It's a bit of a mess.
|
||||
|
||||
Systemd is taken as a default.
|
||||
Non-systemd commands are mentioned when required for a distro, e.g. runit for Void Linux.
|
||||
Non-systemd commands we relegate to their respective distros, e.g. runit for Void Linux.
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
---
|
||||
title: "Base 16"
|
||||
tags: [ "Documentation", "Data" ]
|
||||
---
|
||||
|
||||
```bash
|
||||
printf "%x" $NUMBER
|
||||
```
|
@ -1,30 +0,0 @@
|
||||
---
|
||||
title: "jenkins"
|
||||
tags: [ "void", "build" ]
|
||||
---
|
||||
# Jenkins on Void
|
||||
|
||||
Jenkins is janky.
|
||||
|
||||
## Start
|
||||
Start the service file.
|
||||
|
||||
```bash
|
||||
sudo ln -s /etc/sv/jenkins /var/service
|
||||
sudo sv start jenkins
|
||||
```
|
||||
|
||||
Then visit the web interface with `$BROWSER localhost:8080`.
|
||||
|
||||
If it's not working, try running the command from the run file the first time:
|
||||
|
||||
```bash
|
||||
chpst -u jenkins java -jar /opt/jenkins/jenkins.war
|
||||
```
|
||||
|
||||
## Updating
|
||||
|
||||
Jenkins will not work if out of date.
|
||||
You will be prompted to update by downloading a `jenkins.war` file.
|
||||
Download it, then stop the service, and move the file to `/opt/jenkins/jenkins.war`, then start the service again.
|
||||
|
@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
# get the void linux logo from wikipedia
|
||||
wget https://upload.wikimedia.org/wikipedia/commons/thumb/0/02/Void_Linux_logo.svg/256px-Void_Linux_logo.svg.png?20170131170632
|
||||
# rename it, and resize it (the standard size is too small for most wallpapers)
|
||||
convert -resize 200% '256px-Void_Linux_logo.svg.png?20170131170632' void-logo.png
|
||||
# download a pretty wallpaper
|
||||
wget http://wallpapercave.com/wp/Wlm9Gv0.jpg
|
||||
|
||||
# put the void logo on all *jpg and *png images
|
||||
for x in *.jpg
|
||||
do
|
||||
composite -compose multiply -gravity Center void-logo.png "$x" "$x"
|
||||
done
|
@ -1,44 +0,0 @@
|
||||
---
|
||||
title: "dns"
|
||||
tags: [ "networking", "host" ]
|
||||
---
|
||||
|
||||
| Record | Type | Example |
|
||||
|:-----------:|:--------------------|:---------------------------------------|
|
||||
| A Record | IPv4 Address | "$domain".com |
|
||||
| AAAA Record | IPv4 Address | "$domain".com |
|
||||
| CNAME | Alternative Address | "$domain".rs, "$subdomain.$domain".com |
|
||||
| NS | Nameserver | ns1.fastname.com |
|
||||
| MX | Email server | "$domain".com |
|
||||
| TXT | Literally anything,including ownership of a domain | |
|
||||
| | | |
|
||||
|
||||
Query a host with the `host` command.
|
||||
|
||||
```bash
|
||||
host $domain.$tld
|
||||
```
|
||||
|
||||
|
||||
```bash
|
||||
host $domain.$tld 9.9.9.9
|
||||
```
|
||||
|
||||
> dmz.rs has address 77.105.27.232
|
||||
> dmz.rs mail is handled by 10 kralizec.dmz.rs.
|
||||
> dmz.rs mail is handled by 20 splint.rs.
|
||||
|
||||
This shows the MX record has a secondary handler, called splint.rs.
|
||||
|
||||
You can also add a specific nameserver:
|
||||
|
||||
Request a specific record type (`CNAME`, `TXT`, et c.):
|
||||
|
||||
```bash
|
||||
torsocks host -T -t $RECORD_TYPE $domain
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
The `host` command uses UDP.
|
||||
You can change to TCP by using `host -T`.
|
@ -4,7 +4,14 @@ tags: [ "Documentation", "Networking", "Torrenting" ]
|
||||
---
|
||||
# Torrench
|
||||
|
||||
Search for a torrent, e.g. 'sita sings the blues'.
|
||||
Torrench searches for torrents.
|
||||
It breaks a lot, so if it's not working, the problem is probably in the program.
|
||||
|
||||
Search for 'sita sings the blues' with:
|
||||
|
||||
```bash
|
||||
torrench 'sita sings the blues'
|
||||
```
|
||||
|
||||
Copy the magnet link.
|
||||
It looks like this:
|
||||
@ -13,7 +20,7 @@ It looks like this:
|
||||
|
||||
But you only need this bit (up until the `&` character):
|
||||
|
||||
> magnet:?xt=urn:btih:05547db7c0c5fbbe50f00212ee43e9cec5b006fa
|
||||
`magnet:?xt=urn:btih:05547db7c0c5fbbe50f00212ee43e9cec5b006fa`
|
||||
|
||||
# Transmission
|
||||
|
||||
@ -86,53 +93,3 @@ Next, find the torrent's number. You can use multiple numbers, separated with a
|
||||
transmission-remote -t 3,5,8 --move /home/alice/music
|
||||
```
|
||||
|
||||
## Change Default Location
|
||||
|
||||
The `transmission` user has a home configuration file, like any other user, with all the transmission settings.
|
||||
|
||||
```bash
|
||||
cd /var/lib/transmission/.config/transmission-daemon/
|
||||
|
||||
$EDITOR settings.json
|
||||
```
|
||||
|
||||
Change the `download-dir` value to wherever you want the torrents to go.
|
||||
|
||||
# Creating Torrents
|
||||
|
||||
Transmission always needs the full path to every file, and the daemon will need permission to view the file.
|
||||
When it doubt, just place the files in `transmission`'s home directory.
|
||||
|
||||
Create a torrent of file or directory `Memes` with:
|
||||
|
||||
```bash
|
||||
sudo chown -R :transmission Memes
|
||||
transmission-create $(pwd)/Memes
|
||||
```
|
||||
|
||||
Add a tracker to the torrent, to make sure others can find you easily:
|
||||
|
||||
```bash
|
||||
transmission-create --comment 'My Memes collection' -t 'udp://tracker.publicbt.com:80' -t 'udp://tracker.openbittorrent.com:80' --anonymize Memes
|
||||
```
|
||||
|
||||
Without the `--anonymize` flag, the torrent file output will have a 'created by' and 'created date'.
|
||||
|
||||
## Open Trackers
|
||||
|
||||
- udp://tracker.opentrackr.org:1337/announce
|
||||
- udp://opentracker.i2p.rocks:6969/announce
|
||||
- https://opentracker.i2p.rocks:443/announce
|
||||
- udp://tracker.openbittorrent.com:6969/announce
|
||||
- http://tracker.openbittorrent.com:80/announce
|
||||
- udp://9.rarbg.com:2810/announce
|
||||
- udp://open.demonii.com:1337/announce
|
||||
- udp://exodus.desync.com:6969/announce
|
||||
- udp://tracker.moeking.me:6969/announce
|
||||
- https://tracker.tamersunion.org:443/announce
|
||||
- udp://tracker1.bt.moack.co.kr:80/announce
|
||||
- udp://tracker.bitsearch.to:1337/announce
|
||||
- udp://p4p.arenabg.com:1337/announce
|
||||
- udp://explodie.org:6969/announce
|
||||
- https://tracker.gbitt.info:443/announce
|
||||
- http://tracker.gbitt.info:80/announce
|
||||
|
27
new.sh
27
new.sh
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo Select a category
|
||||
|
||||
category="$(find . -type d -printf '%P\n' | fzy)"
|
||||
|
||||
[ ! -d "$category" ] && mkdir "$category"
|
||||
|
||||
echo Select a name
|
||||
|
||||
read name
|
||||
|
||||
filePath="$category/$(echo $name | sed 's/ /_/g').md"
|
||||
|
||||
tagsList="$(echo \"$category | sed 's#\/#", "#g')\""
|
||||
|
||||
[ -e "$filePath" ] && $EDITOR $filePath && exit 0
|
||||
|
||||
echo "---
|
||||
title: \"$name\"
|
||||
tags: [ $tagsList ]
|
||||
---
|
||||
|
||||
" > "$filePath"
|
||||
|
||||
$EDITOR "$filePath"
|
||||
|
@ -8,24 +8,22 @@ tags: [ "documentation", "virtualization", "xen" ]
|
||||
xe vm-list
|
||||
```
|
||||
|
||||
Start, stop, et c. with `xe`:
|
||||
Start, stop, et c. all done with `xe`:
|
||||
|
||||
```bash
|
||||
xe vm-start vm=$TARGET_VM
|
||||
xe vm-start vm=*TTS*
|
||||
```
|
||||
|
||||
```bash
|
||||
xe vm-shutdown vm=$TARGET_VM
|
||||
xe vm-shutdown vm=*Bob*
|
||||
```
|
||||
|
||||
Destruction requires the uuid.
|
||||
|
||||
```bash
|
||||
xe vm-destroy uuid=$TARGET_UUID
|
||||
xe vm-destroy uuid=*243b1165-14aa-37f6-496f-44879d05b3f2*
|
||||
```
|
||||
|
||||
Autocompletion works well with all of these commands.
|
||||
|
||||
# Shut Down VM
|
||||
|
||||
List VMs.
|
||||
@ -35,17 +33,17 @@ xe host-list
|
||||
```
|
||||
|
||||
```bash
|
||||
xe vm-list resident-on=$HOST_UUID
|
||||
xe vm-list resident-on=*<uuid_of_host>*
|
||||
```
|
||||
|
||||
```bash
|
||||
xe vm-shutdown uuid=TARGET_VM force=true
|
||||
xe vm-shutdown uuid=*<UUID from step 3>* force=true
|
||||
```
|
||||
|
||||
If this doesn't work, try:
|
||||
|
||||
```bash
|
||||
xe vm-reset-powerstate uuid=TARGET_VM force=true
|
||||
xe vm-reset-powerstate uuid=*<UUID from step 3>* force=true
|
||||
```
|
||||
|
||||
Get the id:
|
||||
@ -57,14 +55,16 @@ list_domains
|
||||
And destroy the domain:
|
||||
|
||||
```bash
|
||||
/opt/xensource/debug/xenops destroy_domain -domid $DOM_ID
|
||||
/opt/xensource/debug/xenops destroy_domain -domid *<DOMID from step 7>*
|
||||
```
|
||||
|
||||
# Problem Solving
|
||||
# Error: `Internal error:xenopsd internal error: Storage_interface.Illegal_transition` in XenServer
|
||||
|
||||
> Error: `Internal error:xenopsd internal error: Storage_interface.Illegal_transition` in XenServer
|
||||
## Symptoms or Error
|
||||
|
||||
After a failed “Move VM”, “Copy VM”, or “Export VM” operation, the Virtual Machine (VM) being operated cannot start.
|
||||
After a failed “Move VM”, “Copy VM”, or “Export VM” operation, the Virtual Machine (VM) being operated cannot start. Following is the error message displayed:
|
||||
|
||||
`User-added image`
|
||||
|
||||
## Solution
|
||||
|
||||
@ -85,34 +85,32 @@ This is the UUID of the Control Domain. The Control Domain is a privileged Virtu
|
||||
Run the following command to obtain the UUID of the VBD (Virtual Block Device) object linking the Control Domain:
|
||||
|
||||
```bash
|
||||
xe vbd-list vm-uuid=$CONTROL_DOMAIN_UUID
|
||||
xe vbd-list vm-uuid=*<uuid of the Control Domain>*
|
||||
```
|
||||
|
||||
Run the following commands to unplug and destroy the VBD:
|
||||
|
||||
```bash
|
||||
xe vbd-unplug uuid=$VBD_UUID
|
||||
xe vbd-unplug uuid=*<uuid of the vbd>*
|
||||
```
|
||||
|
||||
```bash
|
||||
xe vbd-destroy uuid=$VBD_UUID
|
||||
xe vbd-destroy uuid=*<uuid of the vbd>*
|
||||
```
|
||||
|
||||
# Make a local iso repository
|
||||
## Make a local iso repository
|
||||
|
||||
```bash
|
||||
xe sr-create name-label=LocalISO type=iso device-config:location=/var/opt/xen/ISO_Store device-config:legacy_mode=true content-type=iso
|
||||
```
|
||||
|
||||
This creates a UUID for the new directory, e.g.:
|
||||
This creates a UUID for the new directory:
|
||||
|
||||
> e94e25bb-bcdc-801b-b62a-b51b686a3bdc
|
||||
`e94e25bb-bcdc-801b-b62a-b51b686a3bdc`
|
||||
|
||||
# Import
|
||||
|
||||
```bash
|
||||
xe vm-import filename="$FILENAME".xva
|
||||
```
|
||||
xe vm-import filename=*/mnt/blah.xva*
|
||||
|
||||
# USB
|
||||
|
||||
@ -153,10 +151,11 @@ xe sr-list
|
||||
# Exporting and Exporting VMs
|
||||
|
||||
```bash
|
||||
xe vm-export vm=$VM_NAME filename="$FULL_PATH".xva
|
||||
xe vm-export vm=*<Name>* filename=*/full/path.xva*
|
||||
```
|
||||
|
||||
```bash
|
||||
xe vm-import vm=*<Name>* filename="$FULL_PATH".xva
|
||||
xe vm-import vm=*<Name>* filename=*/full/path.xva*
|
||||
```
|
||||
|
||||
|
||||
|
@ -4,22 +4,17 @@ tags: [ "Documentation", "xe", "virtualization", "volume" ]
|
||||
---
|
||||
# Make a local iso repository
|
||||
|
||||
|
||||
```bash
|
||||
STORE_PATH=/var/opt/xen/ISO_Store
|
||||
mkdir -p */var/opt/xen/ISO_Store*
|
||||
```
|
||||
|
||||
```bash
|
||||
mkdir -p $STORE_PATH
|
||||
```
|
||||
|
||||
```bash
|
||||
xe sr-create name-label="$STORAGE_NAME" type=iso device-config:location=$STORE_PATH device-config:legacy_mode=true content-type=iso
|
||||
xe sr-create name-label=*LocalISO* type=iso device-config:location=*/var/opt/xen/ISO_Store* device-config:legacy_mode=true content-type=iso
|
||||
```
|
||||
|
||||
This creates a UUID for the new directory:
|
||||
|
||||
> e94e25bb-bcdc-801b-b62a-b51b686a3bdc
|
||||
`e94e25bb-bcdc-801b-b62a-b51b686a3bdc`
|
||||
|
||||
# Main Console
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user