Tuesday 30 September 2014

iPad mini and iOS 8.0.2

Yesterday I tried upgrading the iOS version to 8.0.2 trough iTunes. After this my device was bricked. However the good thing is that recovering the device was quite simple. You can read the full instructions in the references. Or read my short version here: 

1. Get the firmware for the specific device. If in doubt and if you still keep the box - have a look I retrieved the exact model from there otherwise there is a Device ID you can probably look up.

2. Press the "home" and "power" buttons together for 10 seconds at which point you must release "power" but continue to hold "home". After about 15 seconds, the device will enter recovery mode.

If anything else is showing on the screen, such as the "connect to iTunes" logo, you got it wrong.

If  I have to compare it is much easier than flashing any Android device.

3. Stop all other services running that you won't need - virtualization software etc.

4. Hold down the shift key (on Windows) or the option key (on OSX) on your keyboard whilst clicking the "Restore" button in iTunes with your mouse. If you do this correctly, an Explorer or Finder window will pop up and allow you to navigate to the firmware 


Monday 8 September 2014

Backing up to FreeNAS with SSH, CIFS share

I wanted to have a backup of some files in our infrastructure on a CIFS share that can be both accessible on Windows and Linux. 

However I had some issues: “cannot chmod target file”. because I used mc on my mounted share. So I used SSH for my first copy, where I had another issue on FreeNAS - the service did not start from the webgui and I started investigating:

[root@itsoft ~]# /usr/sbin/sshd                                                 
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key                              
Could not load host key: /etc/ssh/ssh_host_ecdsa_key                            
Disabling protocol version 2. Could not load host key                           
sshd: no hostkeys available -- exiting.

Well that's not that bad lets generate the keys and then turn on the service:

ssh-keygen -t rsa
ssh-keygen -t dsa
ssh-keygen -t ecdsa

On the host you want to copy from you can execute something similar:

scp -r /some/local/path user1@destination:/some/remote/path

And that's it about the SSH.

Now back to the share on FreeNAS. I had my share configured as this:

On the host you want to copy from (in my case ubuntu server) you will need this:
sudo apt-get install cifs-utils

In fstab add:
//<ip>/directory /mount/point cifs defaults,user=,password= 0 0

Notice here the user and password - I have left it blank so it can write as nobody. So where did the problem with mc come from? Well it is quite simple actually when you press F5, untick the option “Preserve attributes“.