Search This Blog

Showing posts with label Mac. Show all posts
Showing posts with label Mac. Show all posts

Monday, 19 September 2016

Addressing speed issues with new iMac

Having bought a new iMac (well, Apple Store Refurbished) and transferred everything from MacBook (worked very well), I was disappointed to see how slow it was going. Applications took what seemed like an eternity to open, thumbnails were slow to load, numerous swirling balls of death, etc.

After searching, I made a number of changes. I'm not 100% sure which of these (or which combination) did the trick, but it's now considerably snappier.

  • Login items. For some reason, CrashPlan was listed twice. So I removed one instance. I also removed Android File Transfer, which doesn't need to be in place at login time.
  • Based on this post, I ran the command 
rm ~/Library/Caches/CloudKit/CloudKitMetadata*;killall cloudd
  • I contacted CrashPlan, as my backup seemed to be constantly in scan mode. They suggested:
  1. Open the CrashPlan app
  2. Double-click the CrashPlan logo in the upper-right
  3. Copy and paste the following bolded text into the box: java mx 2048, restart
  4. Press enter
CrashPlan will close to apply the change.
To confirm that the setting applied, reopen the CrashPlan application and repeat the steps above. This time type java mx in the command line window.

Wednesday, 24 August 2016

Server issues and exFAT

A side effect of regularly running out of space on my MBP is that I need to archive files over to my Ubuntu server (program files, lossless music, etc), as well as back up others.

This happens through my running cron jobs, alongside SuperDuper!

As I don't generally leave the monitor running on the Ubuntu box, I noticed recently that SuperDuper! wasn't working (it couldn't find a source drive).

Rebooting Ubuntu showed that power commenced, with the fans running, but a black screen (no text appearing at all) and no lights illuminated on keyboard. ssh didn't work either.

There's clearly a larger issue to resolve there (possibly related to graphics card), but before that I wanted to archive some data before my MBP was out of space.

The server has three internal drives, one of which is 120GB and dedicated to Videos, and another is 1TB for backup.

Also, there is an external 2TB WD drive.

I started with the latter, as ease of plugging into MBP made it the best place to start.

Sadly, it was read only. I realised I'd formatted in Ubuntu and couldn't write to it in OSX.

So the plan was to copy files, reformat and then copy back. Fortunately I had another 500GB drive I could use for this purpose.

Copying was easy (albeit slow, as both external drives were USB connected to MBP). Then, to check the contents were correctly copied, I ran

diff -rq folder1 folder2 > ~/Desktop.diffs.txt

Again, very slow output on this.

Now for formatting, Based on this article, I reformatted as exFAT. This should allow readability on Windows, OSX and Linux (with suitable packages installed). Reformat only took a few seconds.

Next stage, copy all files back, then re-run the "diff" command to double-check.

Then, delete the files from the 500GB drive, reformat THAT as exFAT, and then back up as necessary.

Final stage, remove the 120GB and 1TB drives from server, connect via a caddy to MBP, copy, diff, format and repeat...

THEN fix the server issue!

Saturday, 9 July 2016

Yet more power cuts badly affecting external Time Machine drive

Having previously posted about issues with power cuts corrupting Time Machine, it happened again this time, but to the extent that the drive didn't even display in Disk Utility.

I followed the steps here:

diskutil list


So the 2TB drive is clearly there. 

Next step - diskutil unmount /dev/disk2

That didn't work ("disk2 was already unmounted or it has a partitioning scheme so use "diskutil unmountDisk" instead"), had to modify slightly to:

diskutil unmountDisk /dev/disk2

Also didn't work - "Unmount of disk2 failed: at least one volume could not be unmounted"

Therefore referred here and tried instead:

sudo lsof|grep disk2

Running processes were displayed:

fsck_hfs  889            root    4u      CHR                1,7 0x1b0508000      693 /dev/rdisk2s2
fsck_hfs  889            root    5u      CHR                1,7 0x1b0508000      693 /dev/rdisk2s2

So I closed these in Activity Manager

At this point, the Time Machine (albeit greyed out) showed in Disk Utility, so next step is First Aid there.

Having also then tried diskutil mount /dev/disk7s2 and getting the response Volume on disk7s2 timed out waiting to mount

I was about to give up. But then, as a last throw of the dice, I tried connecting to my Ubuntu desktop.

Immediately in Home Folder it showed as a mounted drive! So from there I went to Disk Utility, unmounted the partitions, erased and formatted them and then re-connected to Mac.

A Time Machine backup has now commenced.....

Wednesday, 18 November 2015

Stealth mode for the OS X firewall

In the firewall advanced preferences, you can enable the feature called "Enable Stealth Mode". This will ensure that traffic that you didn't allow won't receive a response, not even an acknowledgment.

Wednesday, 2 September 2015

Having to deal with corrupted Time Machine backups

A consequence of the regular, and as yet unexplained, power cuts we get is that the separate Western Digital 2TB hard disk drive that I have set up for Time Machine backups ultimately gets hacked off and refuses to start again.

Trying to verify and then repair disk doesn't work. So all that can be done is to reformat the disk, and start TM backups again.

Fortunately I have other backup destinations, so this is not as awful as it may sound

Monday, 20 July 2015

BT HomeHub 5 resetting itself

The last time it caught me out, but this time I was more prepared.

A brief power cut meant the HH5 rebooted. And with it, all internet connections lost for devices with static IPs.

And why's that? Because the process of rebooting causes the router to reset! So SSID is changed, and the gateway IP is set to 192.168.1.254 (from the 192.168.2.x range)

At least this time I knew what to do:

  • Go into Network Preferences on Mac. 
  • Change Ethernet connection so IP address is in 192.168.1.x range
  • Change router IP to 192.168.1.254
  • Go into router settings (from 192.168.1.254 now)
  • Amend SSID back to what it should be - save
  • Amend Hub IP Gateway address to 192.168.2.x range - save
  • Amend the DHCP range too
Then...

all (all!!) that's left is to rename the devices in the Home Network table (as they all get lost too) and then reset Access Control to avoid unfettered access. Half an hour or so of work that shouldn't be necessary


Sunday, 12 July 2015

Mac OSX - stop Image Capture opening when SD card inserted

Where device is shown, click on arrow at bottom and choose "No application":


Sunday, 13 April 2014

Cannot restore file from Time Machine

Seems like it's a bug to do with having a second monitor live! Turn that off, and then it works:

https://discussions.apple.com/message/23779022#23779022

Friday, 14 February 2014

Turning off annoying sounds in Mac

The pop pop pop sound when turning volume up or down:
System Preferences > Sound > Play feedback when volume is changed

The scrunch noise when emptying trash:
System Preferences > Sound > Play user interface sound effects

Saturday, 21 December 2013

Fixing duplicate "Open with" entries in Mavericks

Terminal:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch"

As seen on http://www.tuaw.com/2013/03/25/how-to-spring-clean-open-with-duplicates/

Sunday, 21 July 2013

Compression filters in Preview

Followed the guide here - very useful (note, the Filters folder needs to be in /Library, not the "user" library

https://github.com/joshcarr/Apple-Quartz-Filters

Monday, 8 July 2013

Mac OS replace ';' with new line on text file

http://stackoverflow.com/questions/964945/mac-os-replace-with-new-line-on-text-file

Syntax:

cat input | tr ";" "\n"  > output

Saturday, 29 December 2012

Ubuntu fix - an epic

Much as in the "for the want of a nail the battle was lost", with its escalating list of consequences emanating from a minor incident, I decided earlier this week to resolve an issue I'd been experiencing with my Ubuntu server. It turned into a major undertaking.

The issue made itself apparent on (infrequent) reboots, where disk checks would typically advise that the home folder had errors and mount was difficult.

Unlike Windows (not something I thought I would find myself saying), disk checks - fsck - cannot be run when drives are mounted.

That means booting from USB or disk.

My server was not built with an optical drive - I didn't think I'd need one. As it turns out, when my son's Dell finally gave up the ghost, I salvaged its DVD writer and that is now in the caddy.

Problem 1 : There are two SATA data connections on my motherboard. Both of these are taken by existing HDDs. So I cannot connect the DVD drive.

Potential solution 1 : Run from USB. So I downloaded the image (on my Mac) and then followed the instructions to make a bootable USB stick - http://www.ubuntu.com/download/help/create-a-usb-stick-on-ubuntu

Put the USB in, booted. Didn't work.

Potential solution 2 : Copy the image (as downloaded) onto the USB, copy THAT on to the Ubuntu machine and use Start up Disk Creator. Also didn't work.

Potential (and actual) solution 3 : Attach an external disk drive to Ubuntu machine and use that. Using the image I'd already downloaded, I made a boot disk of Ubuntu 12.10 (machine is currently running 12.04). Boot up, hitting F11 to get to boot menu. Choose the optical drive to boot from.

This takes me into the Ubuntu start up disk. Boy is it slow.

Intention at this stage is still to run fsck and avoid the need for a reinstall. So through the drives I go, running fsck on them.

But that doesn't fix the errors. I get new and interesting messages. I search for solutions. I struggle....

Problem 2 : Can't fix the errors

Potential solution 4 : Reinstall.

There are, of course, numerous options when reinstalling. My data is backed up, so easiest is a clean reinstall.

That means a bit of disk partitioning first, as I want to have a separate swap partition and one for /home (concept being that in future I just update the system files). I also have to select a boot installer. I misunderstand this and choose the overall drive, NOT the part where the files reside.

So of course once the install has happened (which takes a LONG time), when I attempt to boot I get error messages from GRUB : Error 15 file not found

Well that shouldn't be too difficult to fix, should it? All I need to do is reboot, get into the GRUB menu and choose the right option.

Nope. This is Grub 2. It doesn't use ESC to skip out to menu. It uses Shift. Except it doesn't. I try both shift buttons, holding them down, pressing repeatedly. No joy.

Fair enough, I'll boot again using install disk, drop to Terminal and make the necessary edits.

So now I wait another eternity for disk boot to start. Then, due to the horrible Unity interface, Terminal is not immediately present as an option. So now the delight of Dashboard and its responsiveness of a glacier.

Into Terminal I go, and then start trying to take on board the logic I can see in numerous posts about Grub 2 and this error, all of which say something slightly different. None work for me.

Potential (and actual) solution 5 : reinstall again, but this time get the boot installer properly specified

Problem 3 : It boots - hooray! But.... it's STILL as slow as hell. This suggests the problems with speed were not related to the optical drive being external, but possibly due to 12.10 itself (and I have seen some posts to that effect)

Potential (and actual) solution 6 : install an earlier version.

I had an earlier disk of 11.04, so decided to start from this point and then update online.

This time, at least, I was aware of the options regarding bootloader. However, despite my best efforts, the installer seemed really keen to install on my 1TB internal drive, which is purely data, rather than my 120GB drive.

Aha, I'll get round that by physically disconnecting those drives and then adding them after and changing mount points if necessary.

We now actually reach a solution! (well, partial). The install worked, boot was speedy and all worked.

Next step - lots of updates, and a system upgrade to 11.10.

End of the story? Nowhere near.

Firstly, I needed to re-attach the drives and mount them. This meant editing my fstab also. Fortunately I'd backed up my old fstab, so could base on this.

The 1TB drive mounted and worked fine with fstab. My "other" 120GB drive (which houses videos), wants to be the same as my "home" and filesystem 120GB drive. I've not yet solved this issue.

There was then the matter of ensuring aspects of my previous install that worked well for me were also in place on my fresh install. And that I removed unnecessary items.

Unnecessary was pretty straightforward as this could all be done via Synaptic. Amongst others I removed Evolution and Thunderbird - I'm running the server for firewall management and for data storage, so much of the superfluous can go.

(Incidentally, I also discovered that "Installed (Residual Config)" applications can all be removed in Synaptic! Didn't realise this before)

As for adding apps, this meant:

  • Bleachbit
  • Calibre
  • GTKOrphan
  • StartUp-manager
  • Locale
  • Gparted

Next step, run Localepurge to clear unnecessary files, then Bleachbit and GTKOrphan to clear other files no longer needed.

See also http://ubuntuforums.org/showthread.php?t=1560872 and http://ubuntuforums.org/showthread.php?t=140920&highlight=deborphan

Then, as I'd saved my previous bash_history, copy this over to my new install so I can refer back to useful previous info.

I'd stated previously that I use the server for firewall management. Fortunately, I'd copied my three sets of iptables rules, so was able to restore them.

Which left backup usage. Connecting via Samba from my Mac was my previous method of access.

Samba is not installed at outset on Ubuntu, so had to install it. But there is Samba4 and Samba.

This may have caused me the problems I next experienced:

Problem 4 : Samba sharing not working

Samba installed and then smb.conf amended. Now, I hadn't made notes of how I'd done this before (nor, sadly, had I copied the config), but I can't remember it being as involved as this.

Essentially, any attempt at starting, restarting or stopping smbd was just not working ("restart: Unknown instance:")

Potential solution (and actual) 7 : completely remove Samba (all / any versions) and then reinstall.

This time I avoided the Samba 4 complications, and now

sudo restart smbd

and

sudo restart nmbd worked

Problem 5 : Back to the Mac, CTRL-K and choose server name. "The server cannot be found"

Potential (and actual) solution 8 : The Mac is looking for a static IP address. I have not yet assigned a static IP to the server. This I now do.

Problem 6 : The Mac is looking for a static IP address that now exists, but still no joy with Samba.

Potential solution 9 : Let's try and see if ssh works instead!

Problem 7 : ssh not installed by default

Potential (and actual) solution 10 : install ssh, and then $ sudo service ssh start.

Problem 8 : Host key verification fails!

Potential (and actual) solution 11 : http://stackoverflow.com/questions/4161548/how-to-establish-ssh-key-pair-when-host-key-verification-failed - ssh-keygen -R hostname

This deletes the offending key from the known_hosts

It works! I am connected on the network. So why not Samba?

Potential (and actual) solution 12 : Reference to https://help.ubuntu.com/12.04/serverguide/samba-fileserver.html finally got Samba working for me - and an rsync worked perfectly for me.

TODO:

  1. Issues with mounting the two 120GB drives
  2. Purchase and install a SATA PCI card to allow use of the optical drive
  3. Map the Ubuntu drives on Mac - http://osxdaily.com/2010/09/20/map-a-network-drive-on-a-mac/
  4. Amend smb.conf to remove duplication of home directories


LESSONS LEARNED:

  1. Backup MANY more of the config files
  2. Keep a full list (regularly updated) of the installed applications
  3. Keep a more recent set of install discs


Thursday, 27 December 2012

Time Machine to the rescue

I'd bought my MacBook Pro less than 10 months ago, but had noticed that performance was incredibly slow. Waking the machine could easily involve applications being sluggish for a good 20 minutes or so, Chrome was forever giving me "Kill page" messages, and if I did take the option to reboot, I could be looking at least half an hour.

I'd read various articles which had not provided the answer, and had been initially reluctant to upgrade memory (as I had with my previous Mac) as it seemed much more inaccessible.

However, on re-checking this option, it looked less onerous, and that memory modules were reached merely by unscrewing the base of the machine. So that I did, armed with two 8GB RAM modules to replace my measly 2GB variants.

One minor issue - the module needs to be pushed in then angled down into its final position. The first module is a bit fiddly in this regard, and in the process I partially broke one of the spongy retainers.

Anyway, machine reassembled, time to boot.

And boot just hung and hung. I left it at 40 minutes and thought this was going to never happen.

So into Recovery mode, with Time Machine attached, and attempt a TM restore. About two hours later, it was complete.

Some adjustments were required - Mail had to be re-synced with the data files, and Super Duper needed an amend (as did Google Drive), but since then the difference has been marked. How much of this is down to the memory, and how much down to a reinstalled system, I don't know!

Friday, 3 February 2012

Guidance on how to check for Power PC applications

Apps > Utilities > System Information

Choose applications from menu, then sort by kind

New Macbook Pro - and implications

I'd previously made some updates to my MBP bought in 2007 - new hard drive, extra RAM, replacement fan (necessary due to the hideous noise it was making). But it was beginning to feel its age.

Combine this with eldest son's PC having what appears to be motherboard problems (http://www.tech-forums.net/pc/f77/dell-desktop-wont-power-up-blinking-orange-light-power-supply-162691/), and his incessant demands for a replacement, I thought laterally - here's an opportunity for me to get a new Mac, give my old one on, and avoid the sunk cost of £300 or more if I bought him a laptop or netbook now.

So that's exactly what I did. This is what I ordered - http://www.amazon.co.uk/Apple-MacBook-Laptop-Quad-Core-Graphics/dp/B006009L5Y/ref=pd_cp_computers_0 - ordered on Friday, arrived Monday - very good!

This Mac comes with Lion installed, which is new to me, particularly the trackpad directions - the exact opposite to my older Snow Leopard Mac.

I set up Migration Assistant via ethernet connection, and a mere 20 odd hours later everything had transferred.

Things I need(ed) to address:

1. IP addresses. I use static IPs and control via iptables on my Ubuntu server
2. Remove Power PC applications
3. Set up DNS servers (initially no access to internet via Ethernet as these weren't set!)
4. Check mappings to server drives
5. Set up Time Machine
6. Set up Crash Plan

I also took the opportunity to port forward Webmin on the server via my router so I can access remotely.

Still to do:

1. Data transfer from Dell PC to my old Mac for son's data
2. Check iTunes Applescripts work OK

Tuesday, 3 January 2012

Encrypted zip files in Mac OS

Enter the command below in the format specified.

zip -e myzipfile.zip file1.txt file2.txt

You will be prompted to type in a password, this is the password used to protect the zip file.

To do this action on a folder

zip -e myzipfile.zip /users//desktop/myfolder/* 


You can also specify where to place the zipfile using the same syntax as you would to specify where the files are. 


zip -e /users//Desktop/myzipfile.zip /users//Documents/file1.txt /users//Desktop/file2.txt

Friday, 23 December 2011

Empty trash - Mac

The dreaded 'The operation cannot be completed because the item "...." is in use' message. This is the remedy (from http://www.lancelhoff.com/cant-empty-trash-on-a-mac/):


  1. Drag the file from your Trash bin to the Desktop.
  2. Launch a Terminal Go > Utilities > Terminal and type the following into the terminal window leaving a space after f:
  3. cd ~/.Trash && sudo rm -rf
  4. Drag the file from your Desktop to the terminal window and then press Enter
  5. Enter your password when prompted and press Enter

Friday, 2 September 2011

Fix for DoubleTwist (Mac) not refreshing libraries


Delete:

YOUR_HOME/Library/Application Support/doubleTwist/Libraries/*

Wednesday, 31 August 2011