├── ALTERNATIVES.md ├── AUDIO.md ├── BOOTLOADER.md ├── CHECKLIST.md ├── COMMUNICATION.md ├── CROSS-COMPILING.md ├── DISTROS.md ├── INSTALLATION.md ├── IRC.md ├── KERNEL.md ├── LICENSE ├── NETWORKING.md ├── PLAYLIST.md ├── README.md ├── SECURITY.md ├── VIDEO.md ├── WATCHLIST.md └── X.md /AUDIO.md: -------------------------------------------------------------------------------- 1 | # AUDIO 2 | 3 | ## PURE ALSA 4 | 5 | Here is how to get sound on a minimal install without the insanity of pulseaudio: 6 | 7 | 1. Erase __.asoundrc__ in your home directory and __asound.conf__ in __/etc__. 8 | 9 | 2. Purge pulseaudio. And when I mean purge, I mean it. 10 | 11 | 3. Identify your available devices in __/proc/asound/modules__, do: 12 | `$ cat /proc/asound/modules` 13 | 14 | Here is an example of what you will see in __/proc/asound/modules__: 15 | ``` 16 | 0 snd_usb_audio 17 | 1 snd_hda_intel 18 | ``` 19 | 20 | 4. Select from the above and put them in the order you want in the file __/etc/modprobe.d/alsa-base.conf__, by assigning an index from -2 to 2, marking the preferred device as the lowest number. 21 | 22 | As an example if you have two devices and want the one that says usb because that is your headphone, on __/etc/modprobe.d/alsa-base.conf__ you will put: 23 | ``` 24 | options snd_usb_audio enable=1 index=0 25 | options snd_hda_intel index=1 26 | ``` 27 | 28 | Notice the index. 29 | 30 | 5. Restart the computer. 31 | 32 | ### Run Firefox without pulseaudio 33 | 34 | 1. Install __[apulse](https://github.com/i-rinat/apulse)__. 35 | * Install _"cmake"_, _"libasound2-dev"_ and _"libglib2.0-dev"_ with your package manager. 36 | * Download _"apulse"_: 37 | `git clone --depth 1 --single-branch https://github.com/i-rinat/apulse.git` 38 | * Change to that directory: 39 | `cd apulse/src` 40 | * Build: 41 | ``` 42 | $ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .. 43 | $ make 44 | # sudo make install 45 | ``` 46 | 47 | 2. On Firefox open __about:config__ and enter "__/dev/snd/__" under __security.sandbox.content.read_path_whitelist__ and __security.sandbox.content.write_path_whitelist;/dev/snd/__, IF they exist. 48 | 49 | 3. Every time you want to use firefox with this setting issue the command: 50 | `$ apulse firefox` 51 | Alternatively save ___"apulse firefox"___ in a script or in a .desktop file for automation. 52 | -------------------------------------------------------------------------------- /BOOTLOADER.md: -------------------------------------------------------------------------------- 1 | # BOOTLOADER 2 | * The drive where bootloaders and OSes are installed on these examples is "_/dev/sda_", but could be anywhere. 3 | * The bootloader installation __IS__ inside chroot AND with drives mounted, so this guide assumes you are inside "_/mnt/drive_". 4 | * "__", "__" and "__" are just the numbers of partitions. 5 | * Specifically, "__" is the partition number of your root partition. 6 | * The "_vmlinuz_" file makes reference to the kernel image, you can rename it or simlink to it in all cases, the only rule is you have to make sure the name is referenced correctly in the bootloader. By default it can have names like "_vmlinuz-linux_", "_vmlinuz-_" and so on. The same with "_initramfs.img_", it can be "_initramfs-.img_" and such. 7 | * All bootloader examples have included other OS inside what is called "_stanzas_". 8 | * FreeDOS and Windows stanzas are __OPTIONAL__. 9 | * If dualbooting with Windows remember that it likes to be in the first partition. 10 | * If on UEFI check if module is loaded by issuing "_modprobe efivars_". 11 | * On __CRUX__ do "_prt-get remove lilo_" if you dont use LILO. 12 | * On __Source Mage GNU/Linux__ do "_cast \_" to install the preferred bootloader. 13 | 14 | Supported filesystems by bootloaders, they will boot the OS only if the "_/boot_" partition has a supported filesystem. If on "_UEFI_" ignore this as it only supports "_FAT_".: 15 | * __LILO__: indifferent (anything?) 16 | * __SYSLINUX__: ext2, ext3, ext4, btrfs, ufs 1/2, FAT16, FAT32, iso9660, udf, NTFS. 17 | * __GRUB Legacy__: FAT16, FAT32, minix, ext2, ext3, ext4, ReiserFS, JFS, XFS, VSTa fs, Btrfs. 18 | * __GRUB 2__: ext2, ext3, ext4, btrfs, zfs, ufs, minix, iso9660, udf, jfs, hfs, hfs+, afs, affs, sfs, xfs, reiserfs, tar, cpio, NTFS, FAT16, FAT32. 19 | 20 | ## LILO 21 | * If on UEFI use __elilo__ and change names to "_/etc/elilo.conf_" instead of "_/etc/lilo.conf_" and "_elilo_" instead of "_lilo_" in commands. 22 | `nano /etc/lilo.conf` 23 | * Inserting "_password=\_" inside an OS stanza will protect with a password that OS, but inserting "_password=\_" just before the stanzas and outside any of them will protect with a password the bootloader itself (notice the space inside stanzas) 24 | ``` 25 | boot = /dev/sda 26 | image = /boot/vmlinuz 27 | Label = 28 | root = /dev/sda 29 | other = /dev/sda 30 | table = /dev/sda 31 | Label = FreeDOS 32 | other = /dev/sda 33 | table = /dev/sda 34 | Label = Windows7 35 | ``` 36 | * Set boot entry 37 | ``` 38 | lilo -A /dev/sda 1 39 | lilo 40 | ``` 41 | * Prevent anyone but root of reading the config file (in case you used a password) 42 | `chmod 600 /etc/lilo.conf` 43 | 44 | ## SYSLINUX 45 | * If on BIOS make directory and copy files accordingly 46 | ``` 47 | mkdir -p /boot/syslinux 48 | cp /usr/lib/syslinux/bios/*.c32 /boot/syslinux/ 49 | ``` 50 | * If on UEFI make directory and copy files accordingly 51 | ``` 52 | mkdir -p /boot/efi/EFI/syslinux 53 | cp -r /usr/lib/syslinux/efi64/* /boot/efi/EFI/syslinux/ 54 | ``` 55 | * If on BIOS set boot entry 56 | ``` 57 | umount /dev/sda1 58 | syslinux --directory syslinux --install /dev/sda1 59 | mount /dev/sda1 /boot 60 | ``` 61 | * If on UEFI set boot entry using "_efibootmgr_" 62 | ``` 63 | umount /dev/sda1 64 | efibootmgr -c -d /dev/sda -p 1 -l /boot/efi/EFI/syslinux/syslinux.efi -L Syslinux 65 | mount /dev/sda1 /boot/efi 66 | ``` 67 | * Edit "_/boot/syslinux/syslinux.cfg_" if on BIOS or "_/boot/efi/EFI/syslinux/syslinux.cfg_" if on UEFI 68 | * "_splash.png_" is the splash screen image located in "_/boot/syslinux/_" if on BIOS or "_/boot/efi/EFI/syslinux/_" if on UEFI 69 | ``` 70 | PROMPT 1 71 | TIMEOUT 50 72 | MENU BACKGROUND splash.png 73 | DEFAULT 74 | LABEL 75 | MENU LABEL 76 | LINUX /boot/vmlinuz 77 | INITRD /boot/initramfs.img 78 | LABEL FreeDOS 79 | MENU LABEL FreeDOS 80 | KERNEL chain.c32 81 | APPEND sda 82 | LABEL Windows7 83 | MENU LABEL Windows7 84 | KERNEL chain.c32 85 | APPEND sda 86 | ``` 87 | 88 | ## GRUB Legacy 89 | * If on BIOS set boot entry (boot partition must be mounted) 90 | ``` 91 | mount /dev/sda1 /boot 92 | grub-install /dev/sda 93 | ``` 94 | * If on UEFI set boot entry (boot partition must be mounted) 95 | ``` 96 | mount /dev/sda1 /boot/efi 97 | grub-install /boot/efi 98 | ``` 99 | * Edit configuration file "_/boot/grub/menu.lst_" 100 | ``` 101 | default=0 102 | timeout=10 103 | splashimage=(hd0,0)/grub/splash.xpm.gz 104 | #hiddenmenu 105 | title () 106 | root (hd0,) 107 | kernel /vmlinuz- ro root=/dev/sda5 rhgb quiet 108 | initrd /initramfs-.img 109 | title () 110 | root (hd0,) 111 | kernel /vmlinuz- ro root=/dev/sda5 rhgb quiet 112 | initrd /initramfs-.img 113 | title FreeDOS 114 | root (hd0,) 115 | kernel /memdisk 116 | initrd (hd0,)/fdboot.img 117 | title Windows 7 118 | root (hd0,) 119 | chainloader /EFI/Microsoft/Boot/bootmgfw.efi 120 | ``` 121 | 122 | ## GRUB 2 123 | * If on BIOS set boot entry (boot partition must be mounted) 124 | ``` 125 | mount /dev/sda1 /boot 126 | grub-install /dev/sda 127 | ``` 128 | * If on UEFI set boot entry (boot partition must be mounted) 129 | ``` 130 | mount /dev/sda1 /boot/efi 131 | grub-install /boot/efi 132 | ``` 133 | * If Grub does not detect your OS run "_os-prober_" followed by "_update-grub_" 134 | * Or add the OS manually to the Grub config file "_/etc/grub.d/40_custom_" 135 | ``` 136 | menuentry "FreeDOS" { 137 | set root='(hd0,msdos2)' 138 | linux16 /memdisk 139 | initrd16 /fdboot.img 140 | chainloader +1 141 | } 142 | menuentry "Windows 7" { 143 | insmod part_msdos 144 | insmod ntfs 145 | insmod search_fs_uuid 146 | insmod ntldr 147 | search --fs-uuid --no-floppy --set=root 3482FBC382FB879E 148 | chainloader +1 149 | ntldr /bootmgr 150 | } 151 | ``` 152 | * Update config file 153 | `grub-mkconfig -o /boot/grub/grub.cfg` 154 | -------------------------------------------------------------------------------- /CHECKLIST.md: -------------------------------------------------------------------------------- 1 | # SECURITY IN ORDERS OF DIFFICULTY 2 | 3 | Not necessarily meant to be followed step by step, although it is recommended. Some steps are valid during all levels, others give way to better alternatives further on. 4 | 5 | --- 6 | ## TOC 7 | 1. [Basic Level Security](#basic-level-security) 8 | 2. [Cautionary Level Security](#cautionary-level-security) 9 | 3. [Medium Level Security](#medium-level-security) 10 | 4. [High Level Security](#high-level-security) 11 | 5. [Physical Access Counter-Measures](#physical-access-counter-measures) 12 | 6. [Costly Counter-Measures](#costly-counter-measures) 13 | 7. [Deterrent Counter-Measures](#deterrent-counter-measures) 14 | 8. [Exit Level Security](#exit-level-security) 15 | 16 | --- 17 | 18 | ## Basic Level Security 19 | * __Level 1__: Don't save your passwords on plaintext or in some "cloud" service like Lastpass and don't save logins on your phone or web browser. Use KeePassX or KeePassXC (and I mean the one with an X) and remember one good main password (must have lowercase, uppercase, numbers and symbols, be longer than 8 characters and be change bimonthly), then use the password manager's option to generate different passwords for each account you have and keep the password database on a USB stick. Other password manager is [kpcli](https://github.com/alecsammon/kpcli) which [works on the command line](https://www.youtube.com/watch?v=M448GtFa5Xs) and is just a minimalist perl script (this is the best option). 20 | * __Level 2__: Remove file extensions from sensitive files such as .kdb for KeePass password databases, rename it, and keep it in encrypted folders to make it hard to sift through your disk. Better yet, keep it all in a USB stick and with backups only to a third drive disconnected from any network. 21 | * __Level 3__: Use [Searx](https://github.com/asciimoo/searx/wiki/Searx-instances) instead of Google when in need to search on the web. You can get search engine plugins for your browser [from here](https://mycroftproject.com/search-engines.html?name=searx). 22 | * __Level 4__: Use your web browser with javascript, cookies and any telemetry (like "pocket", geolocation, and WebRTC) disabled and reduce the browser fingerprinting. Enable javascript and cookies only on selected sites. [GNU IceCat](https://www.gnu.org/software/gnuzilla/) is the best option. 23 | * __Level 5__: Replace your e-mail provider with a more safe, more appropriate provider. A good option is [Tutanota](https://tutanota.com/), another alternative is [cock.li](https://cock.li/). 24 | * __Level 6__: Use an e-mail client that can block web beacons (tracking pixels). Thunderbird is easy and has a plugin for this. Mailx, Mutt or Alpine are better options. 25 | * __Level 7__ Use RSS for news from sites you trust and to order your podcasts instead of Youtube (although Youtube has an RSS feed for their channels too, for now). Liferea is easy and a great application for RSS feeds, newsboat and newsbeuter are command line options. 26 | * __Level 8__ Use [Peertube](https://instances.joinpeertube.org/instances) for podcasts instead of Youtube. 27 | * __Level 9__: Use [Mastodon](https://joinmastodon.org/) or install [Pleroma](https://github.com/wimvanderbauwhede/limited-systems/wiki/Mastodon-and-Pleroma-on-the-Raspberry-Pi-3) (GNU Social) instead of non-publicly auditable social networks known to sell private information. 28 | * __Level 10__: Choose IRC instead of non-publicly auditable chat networks. A good and easy IRC application is Hexchat, other options are irssi and WeeChat. You can use [BitlBee](https://wiki.bitlbee.org/) to access other chat networks through an IRC client if you need. 29 | * __Level 11__: Use GNU/Linux on your computers, preferably free from "systemd". PCLinuxOS is an easy first choice, Devuan is a better option. Stay away from something called BSD. 30 | * __Level 12__: Install LineageOS on your phone and use F-Droid without gapps (Google app store), with IceCatMobile for web browser, KeePassDroid, AFWall+ and Android IMSI-Catcher Detector. Use Yalp Store or Aptoide (or download from apkmirror/apkpure) in combination with microG if you need a gapps app. 31 | 32 | ## Cautionary Level 33 | * __Level 13__: Delete any metadata from files you share on the internet. ExifTool is the best tool. 34 | * __Level 14__: Avoid using your real name online and avoid giving away any personal information, if possible log into sites using donated passwords and accounts from [BugMeNot](http://bugmenot.com). 35 | * __Level 15__: Use [The Random Identity Generator](http://rig.sourceforge.net/) (rig) to generate different online personas when you need to create accounts. Don't reuse usernames, email addresses, etc, for different sites and don't mention your other identities to avoid contamination. 36 | * __Level 16__: Anonymize your writting style for any text and document you upload with anti-stylometry software like [Anonymouth](https://github.com/psal/anonymouth). 37 | * __Level 17__: Encrypt your e-mails with GnuPG when possible. Thunderbird has the Enigmail plugin for this, you can script the use of GPG on Mutt and Mailx. 38 | 39 | ## Medium Level Security 40 | * __Level 18__: Uninstall network facing services like Avahi (Bonjour), CUPS (replace with Line Printer if needed), Telnet, the R-tools (rlogin, rsh, rcp, rwho, rexec), fingerd, RPC services (D-Bus and rpcbind) and uninstall services if unused like ssh/web/ftp/mail. Also disable IPMI on BIOS. 41 | * __Level 19__: Use YaCy with collaborative database disabled when in need to search on the web. 42 | * __Level 20__: Use the Tor Browser to navigate the internet through Tor. 43 | * __Level 21__: Use Firejail or Bubblewrap to sandbox your applications. 44 | * __Level 22__: Use an [OpenNIC provider](https://servers.opennicproject.org/) known to not save logs together with DNSCrypt to prevent DNS Leaking. 45 | * __Level 23__: Use Uncomplicated Firewall ("ufw") to block inbound AND outbound network traffic, permitting only what you need. The graphical version ("Gufw") is beginner-friendly. 46 | * __Level 24__: Use [Bastille Linux](http://bastille-linux.sourceforge.net/source.htm) to harden your system. 47 | * __Level 25__: Use a source based distro, preferably without crypto libraries on its package manager (no Python), and tweak the installation files to use the minimum required dependencies. Gentoo is one option, CRUX is another and it is easy, see [this link](https://github.com/mayfrost/guides/blob/master/INITIATION.md). 48 | 49 | ## High Level Security 50 | * __Level 26__: Use a command line web browser like links2 and only browse web pages without javascript or cookies when possible. 51 | * __Level 27__: Set a tight configuration for iptables on each port open and drop packets for everything. Use nftables on newer kernels. 52 | * __Level 28__: Use [qmail](https://www.schneier.com/blog/archives/2007/11/thoughts_on_the.html) for your own e-mail server. Exim and cmail are other options. 53 | * __Level 29__: Use Squid for caching websites. 54 | * __Level 30__: Set [BIND9](https://unix.stackexchange.com/questions/270716/configure-bind-as-forwarder-only-no-root-hints-encrypted-rpz-blacklist-wh/270796#270796) for caching all DNS queries on your local DNS server. 55 | * __Level 31__: Use port forwarding and a port knocker on your router or server if you have services running, and unregister your reverse dns records. 56 | * __Level 32__: Use Arpalert/ArpON (for Man-In-The-Middle -MITM- Detection), [zapret](https://github.com/bol-van/zapret) (for Deep Packet Inspection -DPI- Block and Circumvention), and Suricata/Snort (for Network Intrusion Detection). 57 | * __Level 33__: Compile the kernel yourself and add only necessary features and selected modules. Enable KASLR and Capabilities on kernel configuration. 58 | * __Level 34__: When possible give your applications a separate user account and use chattr, sudo, chroot, fakeroot, ulimit and quota with them. 59 | * __Level 35__: Use Lynis to audit your system. 60 | * __Level 36__: Use a complete host intrusion detection framework like Tiger, which can work with Samhain (for integrity check), Unhide/Chkrootkit/rkhunter (for rootkit detection), ClamAV/Linux Malware Detect and a system logger like sysklogd. 61 | * __Level 37__: Use [RSBAC](https://www.rsbac.org/) (for RBAC) with AppArmor (for filesystem ACL). 62 | 63 | ## Physical Access Counter-Measures 64 | * __Level 38__: Set a BIOS password (DON'T FORGET THIS PASSWORD!). 65 | * __Level 39__: Use USBGuard (to prevent Juice Jacking). 66 | * __Level 40__: Use disk encryption with cryptsetup (dm-crypt), saving the key on a separate USB that you keep with yourself at all times. 67 | * __Level 41__: Move your boot partition to a USB and encrypt it with cryptboot. Use the option on Libreboot too. 68 | 69 | ## Costly Counter-Measures 70 | * __Level 42__: Buy a separate camera and microphone and physically remove any camera and microphone from your computer. 71 | * __Level 43__: Buy a VPS in a non-extradition, privacy friendly country outside the Five Eyes under a different name and with a good way of not getting traced by payments, set all outgoing traffic through it, then set up your own VPN server so you can audit all the traffic. 72 | * __Level 44__: Buy a phone with Replicant and libre firmware. Tehnoetic sells an S3 phone with Replicant and only libre firmware enabled, so far is the best option. 73 | * __Level 45__: Buy a router compatible with LibreCMC and install LibreCMC, keep it up to date, give it a strong password, set to monitor all traffic, and use previous techniques such as caching, port-forwarding, etc. 74 | * __Level 46__: Buy a computer compatible with the Libreboot firmware and the Linux-libre kernel, then install both or buy it preinstalled. Thinkpads model x200, t400 and t500 are the best options. Remember to check a compatible Wi-Fi card and physically remove cables connecting cameras and microphones. 75 | 76 | ## Deterrent Counter-Measures 77 | * __Level 47__: Learn to hack yourself first. 78 | * __Level 48__: Use only libre software (software "free as in freedom"). 79 | * __Level 49__: Reduce the amount of software installed in your computer. 80 | * __Level 50__: Opt for text-based programs with less library dependencies than their GUI counterparts. 81 | * __Level 51__: Support the GPL license as to prevent proprietary license wrapping (as with BSD/MIT/Apache licenses) by which you would lose critical updates and further features. GPLv3 also prevents tivoization, a hardware level lockout method. 82 | * __Level 52__: Deduplicate efforts and converge strategies to achieve a "tight base system" in common (use the koan "if is not strictly necessary it should be strictly optional, but still optional"), and that means making things modular and avoiding unnecessary dependencies instead of trusting "crypto libraries" like in Python. 83 | 84 | ## Exit Level Security 85 | * __Level 53__: Abandon "cloud computing" and traditional, non-publicly auditable, data mined networks and erase your online persona. Use exclusively peer-to-peer services with specific protocols instead of all-in-one networks. Use IRC for live chat, e-mail for direct contact, and NNTP for newsgroups (per topic forums, what "social media" should be). IRC, e-mail and torrent services are available inside i2p, as it is NNTPChan. Tor can serve as an outproxy for i2p to reach the regular web. 86 | * __Level 54__: Abandon the Internet. Participate in local mesh networks and collaborate with global scale meshnet projects like [gternet](https://mesh.gentoo.today/wiki/Main_Page). 87 | * __Level 55__: [Don't f\*ck it up](https://www.youtube.com/watch?v=J1q4Ir2J8P8). Protip: you can't. 88 | -------------------------------------------------------------------------------- /COMMUNICATION.md: -------------------------------------------------------------------------------- 1 | # COMMUNICATION 2 | Here lies several ways to communicate through different networks. 3 | 4 | 1. [BROWSER](#browser) 5 | 1.1. [GNU ICECAT](#gnu-icecat) 6 | 1.2. [ADDONS](#addons) 7 | 1.3. [ABOUT CONFIG](#about-config) 8 | 2. [E-MAIL](#e\-mail) 9 | 2.1. [E-MAIL STORAGE FORMATS](#gnu-icecat) 10 | 2.2. [MUTTRC](#addons) 11 | 3. [USENET](#usenet) 12 | 4. [I2P](#i2p) 13 | 4.1. [INSTALLATION](#installation) 14 | 4.2. [I2PD](#i2pd) 15 | 4.3. [REMOTE ACCESS](#remote-access) 16 | 4.4. [BASIC COMMANDS](#basic-commands) 17 | 4.5. [BROWSING I2P EEPSITES](#browsing-i2p-eepsites) 18 | 4.6. [YOUR OWN EEPSITE](#your-own-eepsite) 19 | 4.7. [IRC](#irc) 20 | 4.8. [TORRENTS](#torrents) 21 | 4.8.1 [DOWNLOADING](#downloading) 22 | 4.8.2 [CREATING](#creating) 23 | 4.8.3 [CONFIGURATION](#configuration) 24 | 25 | 26 | ## BROWSER 27 | 28 | ### GNU ICECAT 29 | * Download from http://ftpmirror.gnu.org/gnuzilla/ 30 | * Unpack the tarball 31 | * As ROOT, copy and rename the folder as /opt/icecat 32 | * ln -s /opt/icecat/icecat /usr/bin/icecat 33 | 34 | ### ADDONS 35 | These addons worked excellent to cover any fingerprinting, until Mozilla decided to break things since Firefox 52. 36 | * (Cross-)Site Request, Anti-XSS, Trackers, Referer, Cookies: [uMatrix](https://addons.mozilla.org/en-US/firefox/addon/umatrix/) 37 | * Security Settings: [Privacy Settings](https://addons.mozilla.org/en-US/firefox/addon/privacy-settings/) 38 | * User-Agent: [Random Agent Spoofer](https://github.com/dillbyrne/random-agent-spoofer), [User-Agent JS Fixer](http://legacycollector.org/firefox-addons/378075/index.html) 39 | * Plugin Enumeration: [Disable plugin enum](https://github.com/dillbyrne/random-agent-spoofer/issues/283) (see Mechazawa's script, and install with greasemonkey) 40 | * Content Delivery Blocker: [Decentraleyes](https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/) 41 | * URI Leak: [No Resource URI Leak](https://notabug.org/desktopd/no-resource-uri-leak) 42 | * Canvas-Fingerprinting: [Canvas Defender](https://addons.mozilla.org/en-US/firefox/addon/no-canvas-fingerprinting/) 43 | * SSL (strict HTTPS): [HTTPS by default](https://addons.mozilla.org/en-US/firefox/addon/https-by-default/) 44 | * URL Deobfuscator: [Pure URL](https://addons.mozilla.org/en-US/firefox/addon/pure-url/) 45 | * Google Redirection: [Google search link fix](https://addons.mozilla.org/en-US/firefox/addon/google-search-link-fix/) 46 | 47 | ### ABOUT CONFIG 48 | These tips prevent overflow your root directory or getting constantly write and delete to try and kill your drive. 49 | * Go to _about\:config_ 50 | * Put a 0 to everything that can write to the disk. 51 | * Limit ram memory and also turn off syncing ect. 52 | * Make it read only. 53 | * If you need to save things have a seperate chroot with a seperate physical drive and make that your downloads folder. 54 | 55 | ## E-MAIL 56 | TODO: 57 | * Set cock.li 58 | * Configure mutt 59 | * Create account. 60 | * Set mutiple accounts 61 | * Send mail 62 | * Send attachment 63 | * To cancel an action in mutt hit CTRL+g 64 | * Use notmuch 65 | * set i2p-bote 66 | 67 | ### E-MAIL STORAGE FORMATS 68 | * MAILDIR = several files 69 | * MBOX = one file for everything 70 | 71 | ### MUTTRC 72 | Example config with cock.li and gmail. Not quite complete but can work if tweaked. 73 | ``` 74 | #--------------------------------------- 75 | # ~/.mutt/muttrc settings mutt 1.5.20 76 | #--------------------------------------- 77 | # 78 | #--------------------------------------- 79 | # One-Time Previous Steps 80 | #--------------------------------------- 81 | # Generate keys with proper user 82 | # $ gpg --gen-key 83 | # 84 | # Make proper directory with file: 85 | # $ mkdir ~/.mutt && touch ~/.mutt/.passwd 86 | # 87 | # Put the following inside ~/.mutt/.passwd: 88 | # set cock_pass="password" 89 | # set gmail_pass="password" 90 | # 91 | # Encrypt with proper user: 92 | # $ gpg -r USER1 -e ~/.mutt/.passwd 93 | # $ shred ~/.mutt/.passwd 94 | # $ rm -f ~/.mutt/.passwd 95 | # 96 | #--------------------------------------- 97 | # Process the password file first (the "|" pipes to Mutt) 98 | #--------------------------------------- 99 | #source "gpg -d ~/.mutt/.passwd.gpg |" 100 | # 101 | #--------------------------------------- 102 | # Account Hooks 103 | #--------------------------------------- 104 | account-hook . 'unset imap_user imap_pass' # unset first! 105 | account-hook 'imaps://mail.cock.li:993/' "\ 106 | set imap_user=USER1@cock.li imap_pass=`cat ~/.mutt/.cock ` " # imap_pass=$my_cock_pass " 107 | #account-hook 'imaps://USER2@imap.gmail.com/' "\ 108 | # set imap_user=USER2 imap_pass=$my_gmail_pass " 109 | # 110 | #---------------------------------------- 111 | # Folders, mailboxes and folder hooks 112 | #---------------------------------------- 113 | # 114 | # Setup for USER1: 115 | #---------------------------------------- 116 | set folder = imaps://mail.cock.li:993/ 117 | mailboxes =Inbox =Sent =Junk =Trash 118 | folder-hook 'imaps://mail.cock.li:993' " \ 119 | set folder=imaps://mail.cock.li:993/ \ 120 | record=+Sent \ 121 | smtp_url=smtps://$imap_user@mail.cock.li:465 \ 122 | signature=~/.mutt/USER1.sig \ 123 | from='USER1 ' \ 124 | realname='USER1' " 125 | # 126 | #---------------------------------------- 127 | # Setup for USER2: 128 | #---------------------------------------- 129 | #set folder="imaps://USER2@imap.gmail.com/" 130 | #mailboxes =INBOX =[Gmail]/Drafts =[Gmail]/'Sent Mail' =[Gmail]/Spam 131 | #folder-hook 'imaps://USER2@imap.gmail.com' " \ 132 | # set folder=imaps://USER2@imap.gmail.com/ \ 133 | # postponed=+[Gmail]/Drafts \ 134 | # record=+[Gmail]/'Sent Mail' \ 135 | # smtp_url=smtps://USER2@smtp.gmail.com \ 136 | # smtp_pass=$my_gmail_pass \ 137 | # signature=~/.mutt/USER2.sig \ 138 | # from='USER2 ' \ 139 | # realname='USER2' " 140 | # 141 | #---------------------------------------- 142 | # Macros to make life easier 143 | #---------------------------------------- 144 | macro index 1 "y1" # ESC+1 takes to first INBOX 145 | #macro index 2 "y5" # ESC+2 takes to the second 146 | # 147 | #--------------------------------------- 148 | # Mail-check preferences 149 | #--------------------------------------- 150 | set timeout=60 #Check for mail every minute 151 | set mail_check=5 152 | # 153 | #--------------------------------------- 154 | # Set preferred editor 155 | #--------------------------------------- 156 | set editor='vim + -c "set textwidth=72" -c "set wrap" -c "set nocp" -c "?^$"' 157 | # EOF 158 | ``` 159 | 160 | ## USENET 161 | The software used is __slrn__ ( with __slrnpull__ and + __slrnface__). 162 | 163 | * 1. Create slrn.rc: 164 | ``` 165 | set username "desired_username" 166 | set hostname "desired_hostname.invalid" 167 | set replyto "some_name " 168 | charset display utf8 169 | charset outgoing utf8 170 | setkey group "set_prefix_argument(4); () = select_group();" " " 171 | ``` 172 | 173 | * 2. Set $NNTPSERVER to usenet provider (set in config file): 174 | `NNTPSERVER='server_name' && export NNTPSERVER` 175 | 176 | * 3. Set $EDITOR to preferred text editor (set in slrn.rc file): 177 | `set editor_command "vim '+set tw=72' +%d '%s'"` 178 | 179 | * 4. Create .jnewsrc 180 | `touch .jnewsrc` 181 | 182 | * 5. Create configuration 183 | `slrn --create` 184 | 185 | * 6. Download a list of newsgroups 186 | `slrn -d` 187 | 188 | ## I2P 189 | __I2P__ is a darknet like __Tor__ but with more services like e-mail, IRC, torrents, and others. Once you install it you can configure it by its web interface at http://localhost:7657/home. 190 | 191 | 192 | ### INSTALLATION 193 | * Make directory that will contain I2P 194 | `mkdir ~/.i2p` 195 | 196 | * Go to directory 197 | `cd ~/.i2p` 198 | 199 | * Download (replace with the newest version) 200 | `wget -c https://download.i2p2.de/releases//i2pinstall_.jar` 201 | 202 | * Run the installer (and select options like the current path) 203 | `java -jar i2pinstall_.jar -console` 204 | 205 | To uninstall simply delete the directory. 206 | 207 | ### I2PD 208 | __I2PD__ is a version of __I2P__ based on C++ instead of Java. Currently with limited support (no torrents). Therefore is __OPTIONAL__ and its funtion is separated from the rest of the guide. 209 | 210 | * Dependencies: 211 | ``` 212 | libboost 213 | cmake 214 | make 215 | ``` 216 | 217 | * Download. 218 | `git clone https://github.com/PurpleI2P/i2pd.git` 219 | * Go to directory. 220 | `cd i2pd/build` 221 | * Build. 222 | ``` 223 | cmake 224 | make 225 | ``` 226 | * Install 227 | ``` 228 | mkdir $HOME/.i2pd 229 | cp i2pd $HOME/.i2pd 230 | cp -R contrib/certificates $HOME/.i2pd 231 | cp contrib/i2pd.conf $HOME/.i2pd 232 | cd $HOME/.i2pd 233 | ulimit -n 4096 # optional file limit 234 | ``` 235 | * To run: 236 | ``` 237 | cd $HOME/.i2pd 238 | ./i2pd --datadir . 239 | ``` 240 | * To stop: 241 | `kill -INT $( cat /var/run/i2pd/i2pd.pid )` 242 | 243 | 244 | ### REMOTE ACCESS 245 | To access your I2P router from another computer. 246 | 247 | * On ~/.i2p/clients.config replace 248 | `clientApp.0.args=7657 ::1,127.0.0.1 ./webapps/` 249 | * with 250 | `clientApp.0.args=7657 ::1,127.0.0.1, ./webapps/` 251 | * where is the IP of the computer running I2P. 252 | * Restart I2P. 253 | 254 | 255 | ### BASIC COMMANDS 256 | * See status 257 | `~/.i2p/i2prouter status` 258 | 259 | * Start 260 | `~/.i2p/i2prouter start` 261 | 262 | * Stop 263 | `~/.i2p/i2prouter stop` 264 | 265 | * Stop nicely 266 | `~/.i2p/i2prouter graceful` 267 | 268 | * __NOTE__: In case you get an error, instead of all the above commands, you'll be able to start I2P using the next: 269 | `~/.i2p/runplain.sh` 270 | 271 | You can stop the program from inside the [web interface](http://localhost:7657/home). 272 | 273 | ### BROWSING I2P EEPSITES 274 | Configuration to browse I2P eepsites. To be used with GNU IceCat. Make sure your list of peers is seeded on the web interface configuration page. _Address Book_ is a list of eepsites. 275 | 276 | _OPTION A_ 277 | * Go to "Preferences -> Advanced -> Network -> Connection (Settings)". 278 | * Check "Manual proxy configuration". 279 | * Fill with the address: 280 | `127.0.0.1 and port 4444 for HTTP` 281 | `127.0.0.1 and port 4445 for HTTPS` 282 | `127.0.0.1 and port 4444 for FTP` 283 | * In the "No proxy for" add: 284 | `localhost, 127.0.0.1` 285 | * Mark "Proxy DNS when using SOCKS". 286 | 287 | _OPTION B_ 288 | * Download FoxyProxy. 289 | * Click on the FoxyProxy icon. 290 | * Click on "Add New Proxy". 291 | * On the "General" tab add I2P as the name. 292 | * Go to "Proxy Details" tab. 293 | * In "Host or IP Address" field add _127.0.0.1_. 294 | * In the "Port" field _4444_. 295 | * Click on the "URL Patterns" tab. 296 | * In the "Pattern Name" field add as I2P. 297 | * In the "URL pattern" field enter _\*.i2p\*_. 298 | * Click "OK". 299 | * Right click on the FoxyProxy icon. 300 | * Select "Use proxies baed on their predefined patterns". 301 | 302 | ### YOUR OWN EEPSITE 303 | * Your own eepsite is already active but invisible, the directory is located at: 304 | `~/.i2p/eepsite/docroot/` 305 | 306 | * The I2P Tunnel Manager contains the setting of your eepsite. 307 | 308 | ### IRC 309 | * Add the I2P network 310 | `/server add -network i2p localhost 6668` 311 | * Connect 312 | `/connect i2p` 313 | * Save configuration 314 | `/save` 315 | 316 | * From now on, to connect simply type 317 | `/connect i2p` 318 | 319 | ### TORRENTS 320 | Normal torrents and i2p torrents are used with different clients. Can't use a regular torrent from a normal tracker. 321 | 322 | #### DOWNLOADING 323 | * Visit a tracker like http://tracker2.postman.i2p and search for the torrent. 324 | 325 | _OPTION A_: 326 | * Place your mouse cursor over the magnet icon, right click to disply the menu and click “Copy Link Location". 327 | * Go to i2psnark in browser (http://localhost:7657/i2psnark/). 328 | * Paste the magnet URL on the field "From URL" 329 | * Start the torrent. 330 | 331 | _OPTION B_: 332 | * Download the .torrent file. 333 | * Move torrent file it to destination ~/.i2p/i2psnark/. 334 | * Go to i2psnark in browser or refresh page (http://localhost:7657/i2psnark/). 335 | * Start the torrent 336 | 337 | 338 | #### CREATING 339 | * Place data in i2psnark directory. 340 | `mv ~/.i2p/i2psnark/` 341 | * Go to i2psnark in browser or refresh page (http://localhost:7657/i2psnark/). 342 | * Fill in the fields. 343 | `Data to seed: ~/.i2p/i2psnark/` 344 | `Tracker: ` 345 | * Create torrent by clicking on "Create Torrent". 346 | * Start the torrent. 347 | 348 | #### CONFIGURATION 349 | To automatically start torrents once they are added: 350 | * Go to “Configuration”. 351 | * Select “Auto start”. 352 | * Select “Save configuration”. 353 | 354 | To change more settings, like download destination for example: 355 | * Edit configuration file. 356 | `vi ~/.i2p/i2psnark.config.d/i2psnark.config` 357 | * Change field ("i2psnark.dir"). 358 | `i2psnark.dir=` 359 | -------------------------------------------------------------------------------- /CROSS-COMPILING.md: -------------------------------------------------------------------------------- 1 | # CROSS-COMPILING 2 | Installing a distro for ARM. The distro is CRUX, the target is an Odroid C2. The device will appears as "_/dev/mmcblk0_" (with "_/dev/mmcblk0p1_" and "_/dev/mmcblk0p2_" as the partitions) in the target machine, but it can be seen as "_/dev/sdX_" in your x86 computer. The unpacking tool is provided by [Atool](http://www.nongnu.org/atool/). 3 | 4 | 5 | ## TOC 6 | 1. [CROSS COMPILATION TOOLS](#cross-compilation-tools) 7 | 2. [PARTITIONING](#partitioning) 8 | 3. [MOUNTING](#mounting) 9 | 4. [ROOT PARTITION](#root-partition) 10 | 5. [BOOT PARTITION](#boot-partition) 11 | 6. [COMPILING KERNEL](#compiling-kernel) 12 | 7. [BOOTLOADER](#bootloader) 13 | 14 | 15 | ## CROSS COMPILATION TOOLS 16 | Installing GCC cross compilation tools (for the X86 machine, not target ARM). Includes binutils. 17 | 18 | * OPTION 1: Proportioned by [Linaro](https://releases.linaro.org/components/toolchain/binaries/latest/aarch64-linux-gnu/) 19 | ``` 20 | wget -c https://releases.linaro.org/components/toolchain/binaries/latest/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz 21 | aunpack gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz 22 | ``` 23 | 24 | * OPTION 2: From repository (Devuan example) 25 | `sudo apt-get install gcc-arm-none-eabi` 26 | NOTE: Check your tools are up-to-date to prevent errors like the lack of option _"-mgeneral-regs-only"_. 27 | 28 | Name of "_CROSS_COMPILE_" variable will change depending on the choosen option. This guide assumes cross-compilation tools are from Linaro and therefore will equal to "_CROSS\_COMPILE=/bin/aarch64-linux-gnu-_" 29 | 30 | 31 | ## PARTITIONING 32 | * Clear the section for the bootloader 33 | `dd if=/dev/zero of=/dev/sdX bs=1M count=8` 34 | * Enter fdisk 35 | `fdisk /dev/sdX` 36 | * Help 37 | `m` 38 | * Create new MBR partition table 39 | `o` 40 | * Create boot partition 41 | `n` 42 | * Make primary partition 43 | `p` 44 | * Choose partition number 45 | `1` 46 | * Assign start of boot partition at the end of the bootloader space 47 | `3073` 48 | * Assign end of boot partition 49 | `+128M` 50 | * Create root partition 51 | `n` 52 | * Make primary partition 53 | `p` 54 | * Choose partition number 55 | `2` 56 | * Assign start of root partition at the end of the boot partition 57 | `134220802` 58 | * Assign end of root partition (the rest of the drive by default) by pressing ENTER 59 | * Show the partitions 60 | `p` 61 | * If you agree save and exit 62 | `w` 63 | * If you disagree delete a partition and start from that partition 64 | `d` 65 | * or exit without saving 66 | `q` 67 | * Make root filesystem 68 | `mkfs. /dev/sdX2` 69 | * Make boot filesystem according to supported bootloader (only "_mkfs.vfat_") 70 | `mkfs. /dev/sdX1` 71 | 72 | 73 | ## MOUNTING 74 | * Mount root filesystem 75 | `mount /dev/sdX2 /mnt` 76 | * Create boot directory 77 | `mkdir /mnt/boot` 78 | * Mount boot filesystem 79 | `mount /dev/sdX1 /mnt/boot` 80 | 81 | 82 | ## ROOT PARTITION 83 | Can be the rest of the disk. 84 | 85 | * Go to root directory 86 | `cd /mnt/` 87 | * Download CRUX image 88 | `wget -c http://resources.crux-arm.nu/files/devel-test/3.3/crux-arm-rootfs-3.3-64b-RC2.tar.xz` 89 | * Extract CRUX image to root directory 90 | `aunpack crux-arm-rootfs-3.3-64b-RC2.tar.xz --extract-to=/mnt` 91 | * Change network interface with the rules you want (IP, gateway, domain, etc). 92 | `elvis /etc/rc.d/net` 93 | * On the "/etc/resolv.conf.head" file set your preferred DNS provider (this example is from OpenNIC). 94 | `nameserver 185.121.177.177` 95 | * Change the "/etc/fstab" file with appropriate filesystems. 96 | ``` 97 | /dev/sda1 /boot defaults 0 1 98 | /dev/sda2 / errors=remount-ro,noatime 0 1 99 | ``` 100 | * Uncomment the lines referring to "devpts", "tmp", and "shm" as some programs require it (Firefox), also "USB" and or "cdrom" if using those. 101 | * Change the font, keyboard, timezone, hostname and services on the "/etc/rc.conf" file. 102 | `ls /usr/share/kbd/keymaps/` 103 | 104 | 105 | ## BOOT PARTITION 106 | Must be FAT32 and 64 MB minimum. 107 | 108 | * Clone kernel repo to destination "odroidc2-kernel-folder" 109 | `git clone --depth 1 --single-branch https://github.com/hardkernel/linux.git --branch odroidc2-v3.16.y odroidc2-kernel-folder` 110 | * Enter destination folder 111 | `cd odroidc2-kernel-folder` 112 | 113 | * OPTION 1: Make kernel config (oneliner) 114 | `make ARCH=arm64 CROSS_COMPILE=/bin/aarch64-linux-gnu- odroidc2_defconfig` 115 | 116 | * OPTION 2: Make kernel config 117 | ``` 118 | export ARCH=arm64 119 | export CROSS_COMPILE=/bin/aarch64-linux-gnu- 120 | make odroidc2_defconfig 121 | ``` 122 | 123 | * Refine configuration 124 | `make menuconfig` 125 | 126 | 127 | ## COMPILING KERNEL 128 | * Compiling the devicetree blobs 129 | `make -j $(nproc) ARCH=arm64 CROSS_COMPILE=/bin/aarch64-linux-gnu- INSTALL_DTBS_PATH=/mnt/boot/dtbs/ dtbs` 130 | * Compiling the kernel 131 | `make -j $(nproc) ARCH=arm64 CROSS_COMPILE=/bin/aarch64-linux-gnu- INSTALL_PATH=/mnt/boot/ Image` 132 | * Compiling the modules 133 | `make -j $(nproc) ARCH=arm64 CROSS_COMPILE=/bin/aarch64-linux-gnu- INSTALL_MOD_PATH=/mnt/ modules` 134 | * Installing the kernel to destination "/mnt/boot/Image" 135 | `cp arch/arm64/boot/Image /mnt/boot/` 136 | * Creating the devicetree directory 137 | `mkdir /mnt/boot/dtbs/` 138 | * Installing the devicetree blobs to destination "/mnt/boot/dtbs/meson64_odroidc2.dtb" 139 | `cp arch/arm64/boot/dts/meson64_odroidc2.dtb /mnt/boot/dtbs/` 140 | * Installing the modules to destination "INSTALL_MOD_PATH=/mnt/" 141 | `make -j $(nproc) ARCH=arm64 CROSS_COMPILE=/bin/aarch64-linux-gnu- INSTALL_MOD_PATH=/mnt/ modules_install` 142 | * Compiling the firmware to destination "INSTALL_FW_PATH=/mnt/lib/firmware/" 143 | `make -j $(nproc) ARCH=arm64 CROSS_COMPILE=/bin/aarch64-linux-gnu- INSTALL_FW_PATH=/mnt/lib/firmware/ firmware_install` 144 | * Compiling the kernel C headers to destination "INSTALL_HDR_PATH=/mnt/usr/" 145 | `make -j $(nproc) ARCH=arm64 CROSS_COMPILE=/bin/aarch64-linux-gnu- INSTALL_HDR_PATH=/mnt/usr/ headers_install` 146 | 147 | 148 | ## BOOTLOADER 149 | Minimum 3072 bytes free at the start of the drive and before the boot partition. 150 | 151 | * OPTION 1: Download and extract the binary 152 | ``` 153 | wget -c http://mirror.archlinuxarm.org/aarch64/alarm/uboot-odroid-c2-2015.01-17-aarch64.pkg.tar.xz 154 | aunpack uboot-odroid-c2-2015.01-17-aarch64.pkg.tar.xz --extract-to=/mnt/boot 155 | cd /mnt/boot 156 | ``` 157 | 158 | * OPTION 2: Compile the bootloader yourself 159 | ``` 160 | git clone https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 161 | cd u-boot 162 | make ARCH=arm64 CROSS_COMPILE=/bin/aarch64-linux-gnu- odroidc2_defconfig 163 | make -j $(nproc) 164 | cd boot 165 | ``` 166 | 167 | * Flash the bootloader 168 | ``` 169 | chmod +x sd_fusing.sh 170 | ./sd_fusing.sh /dev/sdX 171 | ``` 172 | * Notice the target is the device NOT a partition 173 | * Set resolution by editing file root/boot/boot.ini 174 | * Might want to comment out the display-autodetect option 175 | 176 | 177 | And done. Next follow the distro tweaks: https://github.com/mayfrost/guides/blob/master/DISTROS.md 178 | Also check the list of software alternative to bloatware and support minimalism https://github.com/mayfrost/guides/blob/master/ALTERNATIVES.md 179 | -------------------------------------------------------------------------------- /DISTROS.md: -------------------------------------------------------------------------------- 1 | # DISTROS 2 | 3 | * __[CRUX](https://crux.nu)__: With a ports based system for installing software, BSD style init scripts favoring native configurations over configuration abstraction layers, follows true KISS principles (Keep It Simple) applied to the system and the development process. Simplicity over automation makes it easy to extend the system by yourself. 4 | 5 | * __[Source Mage GNU/Linux](http://sourcemage.org)__: Without 3rd party patches, sensible defaults or masked packages, is free from obfuscated and pre-configured code, using clean dependencies as they came from upstream developers which provides immediate updates, and can also use flags and heal broken installs. With the package manager made in bash doesn't need obfuscated python libraries. Fully committed to GPL, uses only free software (as in freedom) in their main package, with even the documentation licensed as FDL. 6 | 7 | * __[Harvey OS](https://harvey-os.org/)__: Everything is a file, the hardware, environment variables, and settings are presented as "files". And with the Plan 9 file-sharing protocol the name space can mount from one computer to the other and act as a distributed service. Distributed under the GPL, is a member of the [Software Freedom Conservancy](https://sfconservancy.org/). 8 | 9 | * __[FreeDOS](https://www.freedos.org)__: DOS-compatible, can play classic games and run legacy business software. 10 | 11 | 1. [CONFIGURATION ON CRUX](#configuration-on-crux) 12 | 2.1. [ENABLE CONTRIB REPO](#enable-contrib-repo) 13 | 2.2. [ADD EXTERNAL REPOS](#add-external-repos) 14 | 2.3. [FINALIZING REPO CONFIGURATION](#finalizing-repo-configuration) 15 | 3. [CRUX COMMANDS](#crux-commands) 16 | 3.1. [AUTOMATED INSTALLATION OF PORTS](#automated-installation-of-ports) 17 | 3.2. [MANUAL DOWNLOAD AND INSTALLATION](#manual-download-and-installation) 18 | 4. [SOURCE MAGE GNU/LINUX COMMANDS](#source-mage-gnu/linu-commands) 19 | 20 | ## CONFIGURATION ON CRUX 21 | ### ENABLE CONTRIB REPO 22 | * Enable contrib for ports 23 | ``` 24 | cd /etc/ports 25 | mv contrib.rsync.inactive contrib.rsync 26 | ```` 27 | * Enable contrib for prt-get 28 | `nano /etc/prt-get.conf` 29 | * Uncomment line "_prtdir /usr/ports/contrib_" 30 | 31 | ### ADD EXTERNAL REPOS 32 | * Download httpup/rsync file and pub file from https://crux.nu/portdb/index.php?a=index 33 | ``` 34 | cd /etc/ports/ 35 | wget -c 36 | ``` 37 | * Add repo location to "_/etc/prt-get.conf_" (order sets precedence) 38 | `nano /etc/prt-get.conf` 39 | * Add line "_prtdir /usr/ports/\_" 40 | 41 | ### FINALIZING REPO CONFIGURATION 42 | * Enable pre-/post-install scripts in "_/etc/prt-get.conf_" (usually safe to run repeatedly, usually used to rebuild caches and add system users when installing certain software) 43 | `nano /etc/prt-get.conf` 44 | * Uncomment line "_runscripts yes_" 45 | 46 | * Ignore footprint mismatches due to new files (usually not a bad thing) 47 | `nano /etc/pkgmk.conf` 48 | * Set line "_PKGMK_IGNORE_NEW="yes"_" 49 | * Populate ports tree (is empty by default) 50 | `ports -u` 51 | 52 | ## CRUX COMMANDS 53 | ### AUTOMATED INSTALLATION OF PORTS 54 | * Populate ports tree (is empty by default) 55 | `ports -u` 56 | * Populate specific repo 57 | `ports -u ` 58 | * Automatically download and build a package with its required dependencies ignoring signature mismatch 59 | `prt-get -is depinst ` 60 | * Remove a package 61 | `prt-get remove ` 62 | * Search package 63 | `prt-get search ` 64 | * Get info from package 65 | `prt-get info ` 66 | * Get dependency info from package 67 | `prt-get depends ` 68 | * Update all packages 69 | `prt-get sysup` 70 | * List all installed packages 71 | `pkginfo -i` 72 | 73 | ### MANUAL DOWNLOAD AND INSTALLATION 74 | * Go to apropriate directory for all these tasks 75 | `cd to /usr/ports//` 76 | * To download a package 77 | `pkgmk -d ` 78 | * To install a downloaded package 79 | `pkgmk -i ` 80 | * In case of signature mismatch 81 | `pkgadd -f ` 82 | * To clean directory from downloaded package and build 83 | `pkgadd -c ` 84 | * To remove installed package 85 | `pkgrm ` 86 | 87 | ## SOURCE MAGE GNU/LINUX COMMANDS 88 | * To get a manual 89 | ``` 90 | cast smgl-setup 91 | man smgl-setup 92 | ``` 93 | * To change general things like the color scheme 94 | `sorcery` 95 | * To update the package manager 96 | `sorcery update` 97 | * To update the package list 98 | `scribe update` 99 | * To check for any changes in the architecture specs 100 | `cast smgl-archspecs` 101 | * To rebuild everything from source 102 | `sorcery rebuild` 103 | * To recompile the kernel 104 | `cast -r linux` 105 | * To get a list of spells needing upgrade 106 | `sorcery -q` 107 | * To upgrade the spells themselves known to be available for upgrade 108 | `cast --queue` 109 | * To check for broken installations 110 | `cleanse --fix` 111 | * After casting new spells you need this to have apropos, man -k, and whatis 112 | ` makewhatis` 113 | * To install new packages 114 | `cast ` 115 | * To update an existing package 116 | `cast ` 117 | * To search for packages 118 | `gaze search ` 119 | * To search by package name 120 | `gaze search -name ` 121 | * To list installed packages 122 | `gaze installed` 123 | * To remove a spell 124 | `dispel ` 125 | * To delete completely a package 126 | `dispel --nosustain ` 127 | * To list repositories 128 | `scribe index` 129 | * To add a repository 130 | `scribe add ` 131 | * To remove a repository 132 | `scribe remove ` 133 | -------------------------------------------------------------------------------- /INSTALLATION.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | This guide is for those wanting one of the two most beautiful source based distros, either __CRUX__ or __Source Mage GNU/Linux__. It was written so it can be used by both, only diverging on particular details. 4 | * __CRUX__: A ports based, BSD style init scripts, distro following true KISS principles (Keep It Simple). 5 | * __Source Mage GNU/Linux__: Without 3rd party patches, sensible defaults or masked packages, free from obfuscated and pre-configured code, use clean dependencies as they came from upstream developers and can also use flags. 6 | 7 | __NOTE__: 8 | * This guide attempts to describe __UEFI__ in detail side by side with __BIOS__. Also describes dualbooting (and triple booting) with the bootloader. If you feel overwhelmed for the amount of information don't be afraid, most of it is __OPTIONAL__, like password protection of the bootloader and the different filesystems the bootloaders can use. 9 | * For __CRUX__ you should be using their "_iso_". 10 | * For __Source Mage GNU/Linux__ you will be using their "_chroot image_" but __NOT__ the "_iso_", you can use any live CD or USB provided it has the commands here mentioned. 11 | 12 | 13 | ## TOC 14 | 1. [START](#start) 15 | 2. [PARTITIONING](#partitioning) 16 | 3. [FILESYSTEM](#filesystem) 17 | 4. [CREATING (AND MOUNTING) MAIN DIRECTORIES](#creating-and-mounting-main-directories) 18 | 5. [SETUP](#setup) 19 | 5.1. [CHROOT](#chroot) 20 | 5.2. [CHANGE NETWORK INTERFACES](#change-network-interfaces) 21 | 5.3. [EDIT FSTAB](#edit-fstab) 22 | 5.4. [SET THE ENVIRONMENT](#setup-the-environment) 23 | 6. [KERNEL](#kernel) 24 | 7. [BOOTLOADER](#bootloader) 25 | 7.1. [LILO](#lilo) 26 | 8. [THE END](#the-end) 27 | 28 | ## START 29 | Boot in UEFI mode if on UEFI, BIOS if on BIOS, and select installation media. Then once you have a terminal: 30 | * Check which NIC you are using. 31 | `ip addr` 32 | * Make sure your network is up. 33 | ``` 34 | ip link set up 35 | dhcpcd 36 | ``` 37 | 38 | In the case you need Wi-Fi please refer to https://github.com/mayfrost/guides/blob/master/NETWORKING.md 39 | 40 | * Temporarily change keyboard to your mapping (available configurations can be found in the directories "_/usr/share/kbd/keymaps/_" for __CRUX__ and "_/usr/share/keymaps/i386/qwerty_" for __Source Mage GNU/Linux__). 41 | `loadkeys ` 42 | 43 | ## PARTITIONING 44 | 45 | In these examples we make only two partitions but you can extend this if you know how. The partitions are one root partition, later mounted to "_/mnt_" with "_mkfs._" format, and one boot partition, later mounted to "_/mnt/boot_" and with "_mkfs._" format unless is __UEFI__ in which case "_mkfs.vfat_" is the only format available and will be mounted to "_/mnt/boot/efi_" instead. 46 | 47 | * Use parted. 48 | `parted /dev/sda` 49 | * Inside parted, if on UEFI label the disk "_gpt_", but if on BIOS label it "_msdos_". 50 | ``` 51 | mklabel