Making a bootable usb stick …

diskutil list
diskutil eraseDisk <filesystemtype> <partitionname> <diskidentifier>
diskutil unmountDisk <diskidentifier>

Examples

sudo dd if=/Volumes/Cave/Users/axes/Desktop/lubuntu.iso of=/dev/disk4 bs=1m
sudo dd if=/Users/me/tails-i386-1.3.iso of=/dev/rdisk9 bs=16m && sync

Insert USB drive into PPC Mac of choice, depress command-option-o-f (open firmware) try usb0, usb1, usb2, etc. until it works and finds the port you used for the img

probe-usb
boot usb0/disk@1:2,\\yaboot
boot usb1/disk@1:2,\\yaboot 

once inside the yaboot shell, some common examples are:

install url=mintppc.org
install
cli  
cli-expert
cli64
cli64-expert

#wireless hardware drivers, b43 cutter +


deb http://httpredir.debian.org/debian/ wheezy main contrib non-free
deb http://http.debian.net/debian/ jessie main contrib non-free
apt-get update
sudo lspci
apt-get install firmware-b43-installer
apt-get install firmware-b43-lpphy-installer
apt-get install firmware-b43legacy-installer

use lspci above and then visit https://wiki.debian.org/bcm43xx#supported-b43


32bit EFI 64bit .iso notes for GNU/Linux installs

hdiutil convert -format UDRW -o destination_file.img source_file.iso
diskutil list
diskutil partitionDisk /dev/disk1 1 "Free Space" "unused" "100%"

Particularly helpful is partitioning as GPT from command line in macOS:

diskutil partitionDisk /dev/disk2 GPT JHFS+ New 0b

Back to writing the image to the partition with dd:

dd if=[Directory/to/udrw/img] of=/dev/disk1 bs=1m
diskutil eject /dev/disk2

First, disable Gatekeeper because it is stupid - use Terminal

sudo spctl --master-disable

Second, disable System Integrity Protection (SIP) because it is stupid and won't let you dual boot properly. Reboot your Mac, holding down command + r, and once in the recovery OS, open a Terminal and enter:

csrutil disable

Now, reboot your Mac normally and enter a Terminal.

cd ~
wget https://sourceforge.net/projects/refind/files/0.11.2/refind-bin-0.11.2.zip
unzip refind-bin-0.11.2.zip
cd refind-bin-0.11.2
sudo ./refind-install
sudo reboot

——————————————-

PATH Location on macOS

/Sometimes they are installed by default in opt

#(although this can be changed by an –option)etc/paths (location of PATH on Mac)

/etc/man.path (man page paths)

Force Empty Trashes

sudo rm -rf ~/.Trash/*
sudo rm -rf /Volumes/*/.Trashes

Showing hidden items in Finder

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

Hiding Users in macOS. First, create an admin user in System Preferences.

sudo dscl . create /Users/shortnameofuser IsHidden 1
sudo mv /Users/shortnameofuser /var/shortnameofuser
sudo dscl . -create /Users/shortnameofuser NSFHomeDirectory /var/shortnameofuser
sudo dscl . -delete "/SharePoints/shortnameofuser's Public Folder"
sudo reboot

Locate bitcoin wallet private key from Bitcoin-qt console:

walletpassphrase [enterpassword]
dumprivkey [enter public address from gui]

To add shell scripts to Terminal command, open bash.rc, and add this to the fields (first create a directory for your scripts):

export PATH="/path/to/dir:$PATH"

#Then, restart Terminal by:

source .bashrc

#I also added the directory of my shell scripts to the path directory

cd Volumes/Cave/etc/
nano edit paths 

#Then add a line to the scripts folder:

/Volumes/Cave/Users/axes/Scripts

#To make a script executable (not tested yet - old commands in fodler)

chmod +x yourshellscript.sh

#El Capitan Boot Volume command - presuming it is in the Applications directory and is the GM Candidate version … if not, substitute in version / title of the one you have:

sudo /Applications/Install\ OS\ X\ El\ Capitan\ GM\ Candidate.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\ Capitan\ GM\ Candidate.app --nointeraction

#OS X Server Settings

#To require binding

sudo slapconfig -setmacosxodpolicy -binding required

#To rebuild an Open Directory if nothing else works (Quit Server, Run Command, Restart CPU)

sudo slapconfig -destroyldapserver

#Making an alias called “fix_brew”

alias fix_brew='sudo chown -R $USER /usr/local/'

#preferred way of re-owning homebrew is to use this command below

sudo chown -R `whoami` /usr/local/

#or

sudo chown -R $USER /usr/local/

#disable System Integrity Protection

csrutil disable
csrutil enable
csrutil status

#change gatekeeper settings or disable entirely or re-enable

spctl --status
sudo spctl --master-enable
spctl --add /Path/To/Application.app

#Making a shell script executable

sudo chmod 700 file.sh

#verifying checksum

shasum /path/to/file.extension

#make tarball dokuwiki

tar zcpfv dokuwiki-backup.tar.gz /path/to/dokuwiki

#ssh key pair … later

ssh 

#disable ssh on *nix machines

su - root
cd /etc/ssh/
nano sshd_config

#change the following lines and make sure to remove comment (#) …

ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no

#restart ssh - which on linux is below … macOS uses launchd so not sure yet

/etc/init.d/sshd restart

#add user from command line - should prompt for password

sudo sysadminctl -addUser <exampleuser> -password - -admin

#Changing tempermental host name

sudo scutil --set ComputerName "newname"
sudo scutil --set LocalHostName "newname"
sudo scutil --set HostName "newname"
dscacheutil -flushcache

#pimp bash profile

nano ~/.bash_profile
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
#alias ls='ls -GFh'
alias l='ls'
alias ll='ls -lah'

#sfcc server - use for thunderbird on macOS and on gnulinux

https://archimedes.sfcc.edu/EWS/Exchange.asmx

#homebrew changed path … add sbin to default PATH …

echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile

#homebrew remove shallow

  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Apache password protect directory:

sudo htpasswd -c .htpasswd username1
sudo htpasswd .htpasswd username2  

syntax for BSD, macOS, and Red Hat:

AuthUserFile /private/etc/httpd/.htpasswd 
AuthGroupFile /dev/null
AuthName "Members Only"
AuthType Basic

syntax for Debian:

AuthType Basic
AuthUserFile /etc/apache2/.htpasswd
AuthName "Please Authenticate"
Require valid-user

If you have an SMC based Mac, make sure to install macfanctl when installing GNU/Linux on the device:

apt-get update
apt-get install macfanctld
/etc/macfanctl.conf
<set desired values>
service macfanctld restart

Chromium API - Q5 - add to ~/.profile

export GOOGLE_API_KEY="AIzaSyAz932CQ2FD3654AKxq3GCE4voQ3eBPuR"
export GOOGLE_DEFAULT_CLIENT_ID="702748309358-4f29qgd9h1qgla7l0l4sh15lrj1livs0.apps.googleusercontent.com"
export GOOGLE_DEFAULT_CLIENT_SECRET="OZ3G8hpcHiw77l_Jh_IDJuz"

To run the program, you must make a shell script that does:

/Applications/Chromium.app/Contents/MacOS/Chromium

Remove the annoying Gatekeeper ban on open source apps like GIMP

xattr -d com.apple.quarantine /Volumes/macos/Applications/GIMP-2.10.app

This tutorial is a designated “Invariant Section” of the “Technotronic” section of Haack's Wiki as described on the Start Page.

oemb1905 2020/02/11 17:59