Main Page

From Stormsail
Jump to navigation Jump to search

OpenWrt Notes:

root@openwrtac1:/etc# cat smcroute.conf phyint br-lan enable mrdisc phyint wlan0 enable mrdisc mgroup from wlan0 group mgroup from br-lan group mroute from wlan0 group to br-lan mroute from br-lan group to wlan0








WAV file Sampling frequency 44.1 kHz Bit rate 8, 16, 24 bits

MP3 file Sampling frequency 44.1 kHz Bit rate 64 kbps - –320 kbps

afconvert -d LEI16 -f 'WAVE' file.mp3

ffmpeg -i file.mp3 -ar 44100 file.wav

for i in *.mp3; do baseFilename=`basename "${i}" .mp3` && afconvert -f WAVE -d LEI16@44100 "${i}" "${baseFilename}.wav"; don




PfSense Thin Client

Christmas Lights Stuff


Let's Encrypt

Abel Homework 

Ubuntu thin clients*

Raspberry Pi







Zoneminder Stuff


Abel / Noah Projects


Log Cabins

Active Projects,08,27,169,fix-time-machine-sparsebundle-nas-based-backup-errors.html

== New Freenas Server

Supermicro X9SCL-F ->
Intel Xeon E3-1240 3.30GHz 8M Socket LGA1155 SR00K Quad Core CPU
DDR3-10600, PC3-1333MHz CL9 240pin ECC unbuffered ->





Freenas Stuff

Freenas 10

How to Setup TimeMachine on Freenas,08,27,169,fix-time-machine-sparsebundle-nas-based-backup-errors.html 

Useful commands ->

Howto setup an iscsi lun with Solaris

bash-3.2#  iscsiadm modify discovery --static enable
bash-3.2#  iscsiadm list discovery
       Static: enabled
       Send Targets: disabled
       iSNS: disabled
bash-3.2# iscsiadm add discovery-address
bash-3.2# iscsiadm list discovery-address -v;
Discovery Address:
       Target name:
               Target address:, 1
bash-3.2# iscsiadm add static-config,
bash-3.2# format

Workaround for [[1][Bug #4987]]

add in /etc/hosts

mount -uw /
add to /base/conf/etc/hosts (otherwise it'll disappear on reboot

=== VirtualBox in FreeNAS (now included in
VirtualBox autostart ->

If the gui dies then restart

service django start

Adding a new disk requires partitioning before it can be attached to an existing mirror

  1. gpart create -s gpt /dev/ada0
  2. gpart add -a 4096 -i 1 -s 2g -t freebsd-swap /dev/ada0
  3. gpart add -a 4096 -i 2 -t freebsd-zfs /dev/ada0
  4. glabel status

Getting crashplan to work on freeness

Enabled TCP Forwarding in SSH settings in FreeNAS
Enabled Forwarding in the sshd_config file in the jail
Enabled Root Login in the jail
Created a crashplan user inside the jail and added them to "wheel"
Restarted SEVERAL TIMES, finally getting all java working and expected results in sockstat -4, and netstat.
Created SSH Tunnel from port 4200 to (the jail IP) using Putty, then connected Putty to (jail IP, not the freenas box IP)
Modified file inside Crashplan conf folder so that servicePort=4200 and was uncommented(no # in front of it).
killed all crashplan processes and services, restarted the service (on my PC with the UI) and then restarted the desktop app.

=== Enabling sshd in jail

/etc/rc.conf -> sshd_enable="YES"
service sshd start
enable root in /etc/ssh/sshd_config

Add SMART testing


Plex stuff

Secure SSH


Escape to loader (option 3)
set vfs.zfs.recover=1
boot -s
start /bin/sh
sh /etc/rc.initdiskless

zpool import -f -R /mnt poolname

if that fails

zpool import -f -o readonly=on -R /mnt poolname

zpool recovery (rewinds transactions)

zpool import -f -R /mnt -FX poolname

> You can try to experiment with zpool hidden flags. Look at this command: > > zpool import -N -o readonly=on -f -R /pool <pool> > > It will try to import pool in readonly mode so no data would be written > on it. It also doesn't mount anything on import so if any fs is damaged > you have less chances triggering a coredump. Also zpool import has a > hidden -T switch that gives you ability to select transaction that you > want to try to restore. You'll need a list of available transaction though: > > zdb -ul <vdev> > > This one when given a vdev lists all uberblocks with their respective > transaction ids. You can take the highest one (it's not the last one) > and try to mount pool with: > > zpool import -N -o readonly=on -f -R /pool -F -T <transaction_id> <pool>

I had good luck with ZFS recovery with the following approach:

1) Use zdb to identify a TXG for which the data structures are intact

2) Select recovery mode by loading the ZFS KLD with "vfs.zfs.recover=1"

  set in /boot/loader.conf

3) Import the pool with the above -T option referring to a suitable TXG

  found with the help zdb.

The zdb commands to use are:

  1. zdb -AAA -L -t <TXG> -bcdmu <POOL>

(Both -AAA and -L reduce the amount of consistency checking performed. A pool (at TXG) that needs these options to allow zdb to succeed is damaged, but may still allow recovery of most or all files. Be sure to only import that pool R/O, or your data will probably be lost!)

A list of TXGs to try can be retrieved with "zdb -hh <POOL>".

You may need to add "-e" to the list of zdb options, since the port is exported / not currently mounted).

Useful Links

search MediaWiki:Sidebar

Dataguard ->

 * shower stuff ->
 * extending wireless network ->
 * veggie box recipes ->

Chilli oil recipe ->

Living life to the full ->

Mencoder command line stuff ->

Samsung warrant checker ->

  * - DGTeam Mirror
  * [[2][Righthook IPS repository (OWAN)]]
  * [[3][Exporting iTunes playlists to a non-itunes world]]
  * [[4][One iTunes/Slimserver playlist won't work]]
  * [[5][Setting up a DNS server]]
  * [[6][Extending the netgear wireless network]]
  * [[7][Kata Practice - 2011-05-10 ]]
  * [[8][Transparent Web Proxying Ubuntu DG834G]]
  * [[9][Community Sky DG834GT Updates]]
  * [[10][Netgear DG834GT Router Tweak]]
  * [[11][Netgear DG834GT & DG834 v4- Override Target SNR]]
  * [[12][Netgear Router Firmware Downloads]]
  * [[13][Implementing vscan service with ClamAV on ZFS]]
  * [[14][OpenSolaris 2008.11 ZFS with ‘on access’ virus scan]]
  * [[15][Phoenix Park Terrace Property for Sale]]
  * [[16][Greenhouse we would like]]

Flashing DVD drives

Ubuntu Installation Instructions

Manually installing logitechmediaserver

sudo dpkg --install logitechmediaserver_7.8.0_all.deb
auto eth0
iface eth0 inet static

Setting up a VPN proxy server

Setting up Collectd Collection3 on Ubuntu Lucid 10.04

Setting up iscsi on MacOSX

Installing HandBrakeCLI on ubuntu 12.04

Setting up zoneminder on Ubuntu 12.04

Installing daapd on Ubuntu 12.04

Setting up PLEX on Ubuntu

Installating HandBrakeCLI on Ubuntu

Ubuntu 11.10 webserver - choose OpenSSH + LAMP and then install webalizer + awstats + phpmyadmin

Creating audio from mkv:

First we need to create a WAV with mplayer.

mplayer -vc dummy -vo null -ao pcm:file=output.wav video.mkv

If you find that mplayer is taking its sweet time in outputting the WAV you may have to append the fast option like so:

mplayer -vc dummy -vo null -ao pcm:file=output.wav,fast video.mkv

Then we create an MP3 from the WAV.

lame -h -b128 output.wav output.mp3

To install linux guest additions on Ubuntu, you need to add:

sudo apt-get install dkms

to manually build the vb module:

/etc/init.d/vboxadd setup
  • Joining multiple avis together
sudo apt-get install mencoder mplayer
cat b1.avi b2.avi b3.avi b4.avi b5.avi b6.avi b7.avi > bloodspell.avi
mencoder -forceidx -oac copy -ovc copy bloodspell.avi.avi -o bloodspell_final.avi

Mplayer doesn't like the default video out mode (I suspect due to my Nvidia card) but seems to work ok for -vo gl2. I've therefore added the following to my .mplayer/config:

hippy@monkey:~$ more .mplayer/config 
# Write your default config options here!


hippy@ubuntu:~$ imapsync --host1 --user1 andharr --authmech1 LOGIN --passfile1 sun_pass --ssl1 --host2 --user2 [email protected] --authmech2  
LOGIN --passfile2 oracle_pass --ssl2 --folder ZFS --sep2 / --prefix2 "" --useheader 'Message-ID' --skipsize --regexflag 's/NonJunk//g'
  * Force upgrade to next release -> sudo do-release-upgrade -d
  * fstab entry for vbox mount -> zoneminder /var/cache/zoneminder vboxsf auto,exec,rw,uid=33,gid=33 0 0
  * fix zoneminder ->
  * zoneminder stuff ->

Solaris Installation Instructions

SunRay Setup Instructions

Compiling applications on Solaris

Solaris Tips

Solaris 11 ipfilter ->

SMF autoscrub ->

Creating rawdisk access to VBox guests

VBoxManage internalcommands createrawvmdk -filename /export/virtualbox/sol-11_2-40-vbox/c16t3d0.vmdk -rawdisk /dev/rdsk/c16t3d0s0

su - hippy -c "/usr/bin/screen -dmS newznab /usr/local/newznab/"

To create and send snapshots via zfs use:

zfs snapshot -r rpool@today
zfs send -R rpool@today | zfs receive -F -d rpool2

Adding a zone

root@monkey:~# zonecfg -z dev
Use 'create' to begin configuring a new zone.
zonecfg:dev> create
create: Using system default template 'SYSdefault'
zonecfg:dev> set zonepath=/zones/dev
zonecfg:dev> set autoboot=true
zonecfg:dev> verify
zonecfg:dev> commit
root@monkey:~# zoneadm -z dev install

For fixing zones issues

chmod 666 /dev/ptmx

For Solaris zone webserver

pkg install amp
pkg install webalizer
/usr/mysql/5.1/bin/mysqladmin -u root password 'new-password'
/usr/mysql/5.1/bin/mysqladmin -u root -h dev password 'new-password'

Adding a ZFS filesystem to a zone (no deligation)

# zonecfg -z zion
zonecfg:zion> add dataset
zonecfg:zion:dataset> set name=tank/volumes/vol1
zonecfg:zion:dataset> end

For deligation add

zonecfg:zion:dataset> set alias=tank

For hot plugging a drive

/usr/sbin/cfgadm -cunconfigure sata2/0
/usr/sbin/cfgadm -cconfigure sata2/0

Setting noexec on the fly

echo "noexec_user_stack/W 0x0" | mdb -kw

Correcting quarantined zfs files

hippy@monkey:~$ /usr/bin/ls -/ v  .bashrc
-rw-r--r--   1 hippy    staff       1064 May 10 09:25 .bashrc
hippy@monkey:~$ pfexec /usr/bin/chmod S-a .bashrc
hippy@monkey:~$ /usr/bin/ls -/ v .bashrc
-rw-r--r--   1 hippy    staff       1064 May 10 09:25 .bashrc

Autostarting Virtualbox Machines

sudo mkdir /etc/vbox
svccfg -s svc:/application/virtualbox/autostart:default setprop config/config=/etc/vbox/autostart.cfg
svcadm enable svc:/application/virtualbox/autostart:default
VBoxManage modifyvm <yourvirtualmachinename> --autostart-enabled on
#You can also set a delayed start for the vm using the command: VBoxManage modifyvm <yourvirtualmachinename> --autostart-delay <delayinseconds>
[--autostop-type disabled|savestate|poweroff|acpishutdown]
root@monkey:/etc/vbox# more autostart.cfg

default_policy = allow

vbox = {

       allow = true
       startup_delay = 10



sphinx requires libinconv

pkg install libiconv


House Stuff

Kitchen - replacement seals and handles? - cheaper selex insulation


MaxOSX Tips

turning off macosx indexing

Example: to stop and prohibit indexing on a volume named Backup Drive you would issue one of the following commands:

sudo mdutil -i off /Volumes/Backup\ Drive
sudo mdutil -i off "/Volumes/Backup Drive"

NZB server

select name from releases where name regexp '^[a-zA-Z0-9]{20}$';
delete from releases where name regexp '^[a-zA-Z0-9]{20}$';

binary logs getting too big

PURGE BINARY LOGS TO 'mysql-bin.00003';

mysqldump -u root -p newznab | bzip2 > backup_newznab.sql.bz2


mysqldump -u root -h newznab -p newznab | bzip2 > backup_newznab.sql.bz2



Windoze Stuff