Mac terminal tips

# mount filesystem writeable (single user mode)
fsck -fy
mount -uw /

# install dmg in terminal
hdiutil attach MacOSXxxx.dmg
installer -verbose -target / -pkg /Volumes/*Update*/*.pkg