more cleanup
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "X"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
X is a server which listens to requests for display.
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "android"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
# mtpfs
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "awk"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
# Basics
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "bash_tricks"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
# Automatic mp3 Tagging
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "character-encoding"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
Convert a text file from one encoding type to another with:
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "compression"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
# Tar
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "cronie"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
|
||||
Various services from cron exist, e.g.
|
||||
@@ -9,7 +9,7 @@ Various services from cron exist, e.g.
|
||||
|
||||
start the cronie with
|
||||
|
||||
> sudo systemctl start cronie
|
||||
> sudo Systemctl start cronie
|
||||
|
||||
start a cron with
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "e-mail"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
# Terminology
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: "editors"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
The system's default text editor can be defined within /etc/profile. It's given the variable `EDITOR`.
|
||||
The System's default text editor can be defined within /etc/profile. It's given the variable `EDITOR`.
|
||||
|
||||
Add these lines to /etc/profile:
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "elvish"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
# Setup
|
||||
To run a shell as non-root, the shell must be listed in /etc/shells.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "kernel"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
Check which kernet modules are loaded into memory
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "logs"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
|
||||
# Basic
|
||||
|
33
system/mdadm.md
Normal file
33
system/mdadm.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: "mdadm"
|
||||
tags: [ "Documentation", "RAID" ]
|
||||
---
|
||||
# RAID5
|
||||
|
||||
You will need 4 disks and the `mdadm` package.
|
||||
The total size will be equal to the disks x 3, because one will be used for redundancy.
|
||||
|
||||
> sudo mdadm --create --verbose /dev/*md127* --level=5 --raid-devices=*4* */dev/sdb /dev/sdc /dev/sdd /dev/sde*
|
||||
|
||||
Note the variable parts:
|
||||
|
||||
- The name of the device could be `/dev/md12` or whatever
|
||||
- The number of devices could be larger, but must be at least 4 for raid 5
|
||||
- We end by listing all devices in the new `md` device.
|
||||
|
||||
Now look at how the raid status:
|
||||
|
||||
> cat /proc/mdstat
|
||||
|
||||
This will increase until the entire thing is fine.
|
||||
|
||||
Check the health of your `mdadm` array:
|
||||
|
||||
> sudo mdadm --detail /dev/md127
|
||||
|
||||
You should see `State : clean`. If you see it is `degraded`, then a disk has broken.
|
||||
|
||||
## Replacing a Disk
|
||||
|
||||
> sudo mdadm --add /dev/md127 /dev/sdb1
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "partitions"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
# FDisk Basics
|
||||
|
||||
@@ -27,7 +27,7 @@ Note the asterisk marking the boot partition.
|
||||
|
||||
fdisk will not help with a GPT formatted drive. For this, use gdisk, which is mostly the same.
|
||||
|
||||
Now that we have a partition, we can make it into a filesystem. Most will use:
|
||||
Now that we have a partition, we can make it into a fileSystem. Most will use:
|
||||
|
||||
> sudo mkfs -t ext4 /dev/sdc1
|
||||
|
||||
@@ -35,7 +35,7 @@ or if you're making a swap partition, you can use:
|
||||
|
||||
> sudo mkswap /dev/sdb2
|
||||
|
||||
or for the reiser filesystem, we can use:
|
||||
or for the reiser fileSystem, we can use:
|
||||
|
||||
> sudo mkreiserfs /dev/sdc2
|
||||
|
||||
@@ -65,7 +65,7 @@ or divide things by inode - the thing which records where files are?
|
||||
|
||||
> df -i
|
||||
|
||||
Examine a filesystem with:
|
||||
Examine a fileSystem with:
|
||||
|
||||
> sudo dumpe2fs /dev/sda1 | less
|
||||
|
||||
@@ -78,12 +78,12 @@ This will check sda1 every 30 boots. It can also be checked every month.
|
||||
|
||||
> sudo tune2fs -i 1m /dev/sda1
|
||||
|
||||
This thing can also make a new label for the system:
|
||||
This thing can also make a new label for the System:
|
||||
|
||||
> sudo tune2fs -L new_name /dev/sdb3
|
||||
|
||||
# Repair
|
||||
Start by unmounting the filesystem.
|
||||
Start by unmounting the fileSystem.
|
||||
|
||||
> sudo umount /dev/sdc1
|
||||
|
||||
@@ -112,15 +112,15 @@ or if you don't know the type, just try the lot:
|
||||
# File Systems
|
||||
xfs and zfs can only be expanded.
|
||||
|
||||
# Shrink Filesystem
|
||||
# Shrink FileSystem
|
||||
|
||||
NB: When I followed these instructions, the process destroyed my data. Seemed fine on the YouTube video.
|
||||
|
||||
Check the filesystem's health:
|
||||
Check the fileSystem's health:
|
||||
|
||||
> sudo e2fsck -f /dev/sdb1
|
||||
|
||||
Resize the file system to something smaller than what you want, so here I want 500G and so I resize to 450 G.
|
||||
Resize the file System to something smaller than what you want, so here I want 500G and so I resize to 450 G.
|
||||
|
||||
> resize2fs /dev/sdb1 450G
|
||||
|
||||
@@ -130,7 +130,7 @@ Then delete the partition with either gdisk or fdisk, depending upon the layout.
|
||||
|
||||
> d
|
||||
|
||||
Then make a new filesystem of the desired type with:
|
||||
Then make a new fileSystem of the desired type with:
|
||||
|
||||
> n
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "snaps"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
> sudo apt-get purge -y snapd
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "journal"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "systemd" ]
|
||||
---
|
||||
|
||||
Find errors since November
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Making Services"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "systemd" ]
|
||||
---
|
||||
# Basics
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "users"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "systemd" ]
|
||||
---
|
||||
# Automatic Login
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "tmux"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
Start with:
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "upx"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
upx compresses binaries, so they take up less disk space, but take longer to start.
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "urxvt"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
Perl scripts typically kept in /usr/lib/urxvt/perl
|
||||
|
@@ -1,61 +0,0 @@
|
||||
---
|
||||
title: "virtualbox"
|
||||
tags: [ "Documentation", "system" ]
|
||||
---
|
||||
# Setup
|
||||
|
||||
## Arch Linux
|
||||
|
||||
> sudo pacman -S virtualbox-host-modules-arch virtualbox-guest-iso
|
||||
|
||||
> sudo modprobe vboxdrv
|
||||
|
||||
> # vboxreload
|
||||
|
||||
Make dd image into vdi
|
||||
|
||||
> VBoxManage convertdd base.dd output.vdi --format VDI
|
||||
|
||||
If this doesn't work, try to make a new bite size with just
|
||||
|
||||
> sudo dd if=image.dd of=image2.dd bs=512 conv=sync
|
||||
|
||||
## CLI Management
|
||||
|
||||
List boxes:
|
||||
|
||||
> VBoxManage list vms
|
||||
|
||||
Start a headless instance
|
||||
|
||||
> VBoxManage startvm "rata" --type headless
|
||||
|
||||
To pause the machine:
|
||||
|
||||
> VBoxManage controlvm "rata" pause --type headless
|
||||
|
||||
You can do a number of things to virtualboxes this way:
|
||||
|
||||
- startvm
|
||||
|
||||
- pause
|
||||
|
||||
- resume
|
||||
|
||||
- poweroff
|
||||
|
||||
## Creating Disks
|
||||
|
||||
Creating a VM requires registering it:
|
||||
|
||||
> VBoxManage createvm --name Ubuntu19.04 --register --ostype Ubuntu
|
||||
|
||||
> VBoxManage modifyvm Ubuntu19.04 --memory 1042
|
||||
|
||||
> VBoxManage storagectl Ubuntu19.04 -name IDE --add ide --controller PIIX4 --bootable on
|
||||
|
||||
Create just a disk with:
|
||||
|
||||
VBoxManageg createhd --filename Ubuntu16.04 --size 5120
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "wine"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
maybe run \n> sudo dpkg --add-architecture i386
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "xdg"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
|
||||
What filetype is this file?
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "xkbmap"
|
||||
tags: [ "Documentation", "system" ]
|
||||
tags: [ "Documentation", "System" ]
|
||||
---
|
||||
# Language Layouts
|
||||
|
||||
|
Reference in New Issue
Block a user