I can never figure out why Apple has to be different, and especially why the change (break) stuff that already works fine. Today’s example: flushing the DNS cache.
From terminal, these are the commands to flush the cache on several (relatively) recent versions of OSX:
Leopard / Snow Leopard
Lion / Mountain Lion
sudo killall -HUP mDNSResponder
From the Apple discussion groups, drm31078 says:
Received another reply from synology pointing to Lion as the problem…
Here is what I received from my engineers.
This problem seems to have happened since OSX 10.7.
We use the open source – netatalk to support AFP and
it summarized that this problem also exists on Apple Time Capsule too.
For the Macs that doesn’t trigger “Start New Backup” YET,
users may use the following method to try and fix the verification flag and avoid wiping out all old backup history.
Hey Apple are you seeing this?!?!
I use a Debian 6.0 box running Netatalk to backup my Mac using Timemachine. This all worked nicely until recently upgrading to Mountain Lion when, big surprise, Timemachine/Netatalk became unreliable. This seems to happen pretty much every time Apple bumps OSX – for reasons know only to them, all sorts of breaking changes are required to change from one feline to another, while providing minimal value to users.
Some research later, it became clear that Mountain Lion needs Netatalk 3.1 (post 12/8/22) to run reliably.
The instructions here worked well: https://gist.github.com/2856490
Note: do not forget the “./bootstrap”. Also, missing from the requirements are autotools (automake) and libtool.
Quoted from github:
$ sudo apt-get install build-essential pkg-config checkinstall git-core avahi-daemon libavahi-client-dev
$ cd /usr/local/src
$ git clone git://netatalk.git.sourceforge.net/gitroot/netatalk/netatalk
$ cd netatalk
Find current version of Berkeley DB available
$ apt-cache search libdb
Mine was 5.1, so I'll install that
$ sudo apt-get install libdb5.1-dev db-util db5.1-util
Same for libgcrypt:
$ apt-cache search libgcrypt
$ sudo apt-get install libgcrypt11 libgcrypt11-dev
$ ./configure --with-init-style=debian --with-zeroconf
$ sudo checkinstall
Config is in /usr/local/etc/afp.conf
Due to a faulty backup, recent (2012) posts are missing but will be restored as soon as I have a moment.
Since minidlna doesn’t serve external subtitle files properly, merge the .srt and .avi files into an mkv file as follows:
mkvmerge -v -o movie.mkv movie.avi --sub-charset 0:UTF8 -s 0 -D -A movie.srt
A more general purpose script:
INPUT=$(basename $1 .avi)
SRT=$(ls | grep $INPUT.srt)
SUB=$(ls | grep $INPUT.sub)
SSA=$(ls | grep $INPUT.ssa)
if [ "$SRT" != "" ]; then
# mkvmerge -v -o $INPUT.mkv $1 $INPUT.srt
mkvmerge -v -o $INPUT.mkv $1 --sub-charset 0:UTF8 -s 0 -D -A $INPUT.srt
# mkvmerge -v -o $INPUT.mkv $1 $INPUT.eng.srt --sub-charset 0:UTF8 -s 0 -D -A $INPUT.spa.srt
elif [ "$SUB" != "" ]; then
mkvmerge -v -o $INPUT.mkv $1 $INPUT.sub
elif [ "$SSA" != "" ]; then
mkvmerge -v -o $INPUT.mkv $1 $INPUT.ssa
mkvmerge -v -o $INPUT.mkv $1
Unfortunately, this still doesn’t help for PS3, which doesn’t yet understand mkv.
??Here handy trick I didn’t know about launching OCaml:
$ cat >> .ocamlinit
.ocamlinit is sourced from the current directory, falling back to
/home/user/.ocamlinit. you can explicitly override it via
ocaml -init <filename>
Google did a data mining exercise to uncover what makes a good Google manager. and the 8 habits are:
Be a good coach
Empower your team, don’t micromanage
Express interest in team members’ success and personal wellbeing
Don’t be a sissy: Be productive and results-oriented
Be a good communicator and listen to your team
Help your employees with career development
Have a clear vision and strategy for the team
Have key technical skills so you can help the team
Have trouble making a transition to the team
Lack a consistent approach to performance management and career development
Spend too little time managing and communicating
The SystemRescueCd has all sorts of useful tools to restore ailing Linux systems.
Check it out at: https://www.sysresccd.org
Categories: Uncategorized boot, centos, grub, grub2, linux, lvm, lvm2, raid, recover, redhat, rescue, restore, rhel, system, ubuntu
I recently replaced the RAID 1 drives in my CentOS 5 box and had to reinstall the grub MBR. As the drives are a couple of TB each, I thought I’d try GPT instead of the old MBR partitioning, since soon all drives will exceed MBR’s 2TB limit. Luckily GPT is baked into RH/CentOS kernels (unlike many others).
Restoring the MBR was trickier than I expected and I made a couple of mistakes along the way – wish I had found the following description sooner:
In a nutshell run grub interactively and do the following:
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded.
Running "install /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/grub.conf"... succeeded
As I install most Linux/BSD software on Mac via Macports, I figured I’d forgo GODI and try to install OCaml the Macports way.
Everything went mostly smoothly except for ocamlnet which is installed as a dependency of batteries. By default, to avoid installing GPL software, Macports doesn’t build nethttpd and related modules. To work around this, perform the install as usual:
sudo port install caml-batteries
but this won’t install the httpd files. To the ocamlnet Portfile I had to add:
after configure.pre_args. Also, for ocamlnet 2.2.9, I had to patch src/batCamomile.ml as follows:
-module CDC = CamomileLibrary.CamomileDefaultConfig
+module CDC = CamomileLibraryDefault.Config
then port uninstall batteries (and ocamlnet), then reinstall.