Format a PS4 hard drive for Windows

Recently I upgraded the hard drive of my PS4 to 2TB and was left with the a spare 500GB drive. Sony is using a customized FreeBSD file system for their consoles so there is almost no way to read its contents (and I say almost because a hacking group some claimed access to their file system). So I decided to reformat the spare drive for Windows use

The truth is that when you plugin the hard drive to Windows, Windows don’t automatically “see” the drive because it is not formatted under a file system that Windows can recognize and assign a drive letter for it.

If you run disk management (Run diskmgmt.msc) you can see the following


Windows can see the disk with the 15 partitions in it. You have to delete all partitions and then format it under NTFS (or fat32). Continue reading

Mount a CIFS share to QNAP on reboot

Recently I purchased a qnap TS-251+ mostly for using its applications like photo sharing/QvPC/Qsirch and others. I already have my storage on a raidz array which is hosted on FreeNAS 9.10. FreeNAS then provides the storage through various ways to my pc’s/mac in my house using mostly CIFS and ISCSI. My TS-251+ currently hosts only 1 6TB disk (will purchase another one in the future for a raid mirroring volume) but I don’t care so much because all my storage is on the FreeNAS at the moment.

After purchasing the qnap I found out that there is no way that you can mount external shares automatically from the UI (you can only do it for ISCSI targets). And the worse thing is that if you mount them from command line when you reboot the machine they are not remounted because the /etc/fstab file on the NAS lives in RAM, and therefore does not survive the “reboot”

So after a bit of research here I found out how you can do it.

Continue reading

Deep dream or how Google’s Neural Networks think

Computer Neural networks, inspired by the way our human brain works, are models that try to compute  and estimate things just by having a big number of inputs. Like human brains the more feedback and input they are given the more they are learning of the environment and the better their prediction. They are given only an initial statement and then they try to program themselves. These networks are being used today for image recognition, voice recognition

Google has decided to release the code for their neural networks, named “Deep Dream” and here they explain how it basically works. After you run the code you can understand why it is called that way. The following is a quote from the notes inside google’s code which I must say it is 100% true

Be careful running the above code, it can bring you into very strange realms!


Here are some examples after applying deep dreaming to some of my photos

One of my cats

Theth in Albania

Gull in Reykjavik

Concert Hall in Reykjavik

Monument in Reykjavik

Geyser in Iceland

Icelandic sheep

Next thing to try is deep dreaming in some videos

Raspberry pi

My raspberry pi (model B) arrived yesterday and it is amazing how small it is.

The raspberry pi is trully the hardware hacker’s dream. Small, powerful enough to run small applications or media centers, low powered (can be powered by usb), quiet (no fans), cheap (around 35 euro)  and hackable! It’s main use is of course as a media center but people have been doing a lots of crazy stuff with it. Here are 40 things that you can do with it. What I also like is that its storage is on a SD card, so you can have multiple configurations on different cards or if you mess up with it, you just format the SD and reinstall the OS.

Raspberry Pi is so small that fits into your hand

Raspberry Pi is so small that fits into your hand

Raspberry comes with its own linux distribution, Raspbian, a debian variant but if you are going to use it as a media center I recommend RaspBMC, a xbmc variant. There is also an android port but I am not fond of OS’s, that have been developed for touch screens, being used with mouse/keyboard.

I installed a TP Link wireless N usb that I had and tried RaspBMC. My raspberry could handle all sorts of files (no mpeg2 yet as it needs a small license fee). I had read that playback of big video files from wifi was not ok, but I had tried many different files (even 1080p movies) and I didn’t have a problem. Sometimes the HD video stopped for 1 or 2 secs but it was not that often. RaspBMC also supports AirPlay so you can watch any videos from iphone/ipad. Add a xbmc remote application to your android/ios and then you have the perfect remote control.

I can’t wait to build a LEGO case for it and maybe use it to control LEGO mindstorm sensors. I also want to check how well it can run a MAME for my future arcade cabinet

Raspberry Pi

Raspberry Pi with its case

Raspberry Pi with its case

Building a NAS – Part 2 – Installing ESXi and FreeNAS

In Part 2 I am going to explain how I installed vmware esxi (free version of esx) and then created a virtual machine for freenas using the disks with raw device mapping, which is like freenas having direct access to the disks

Installing ESXi 5.5

I chose to install esxi on a fast class 10 SDHC 32GB which had roughly 10 MB/sec speed

After the installation of esxi was finished, I installed the VMWare Vsphere Client on a Windows machine and created a virtual machine for the FreeNAS with 8GB hd and 8GB RAM. You have to keep in mind that a lot of memory is needed for the zfs volumes – 8GB is the minimum. My esxi has 16GB RAM and I planning to assign the 12 GB to FreeNAS and the rest to the ubuntu server.

Adding the disks as Raw Device Mapping

I found this very good article on how to mount the disks as Raw Devices to esxi

What you basically do is perform a ls -l inside the directory /dev/disks in order to show all the drives (hd’s) – the drives in my case are the ones that start with t10.ATA_____ST (seagate drives) and with the capacity in front. You can also check the serial numbers of the drives from here

Then you cd inside the directory where the esxi volume is – in my case disk0 (cd /vmfs/volumes/disk0)

And the you run the command vmkfstools -z drive drive_name_given.vmdk

 vmkfstools -z /vmfs/devices/disks/t10.ATA_____ST2000DM0012D1CH164__________________________________Z1E1DSBL rdm_Z1E1DSBL.vmdk

This has created the rdm_Z1E1DSBL.vmdk for the disk /vmfs/devices/disks/t10.ATA_____ST2000DM0012D1CH164__________________________________Z1E1DSBL

So now my raw disk mappings are ready and all I have to do is to add the three drives (HD) from vsphere to FreeNAS. I chose the “Use an existing virtual disk”  as type of disk and then I chose the files that I had created

Now you can see the disks mapped as Mapped Raw LUN to FreeNAS – remember to give different SCSI device node numbers for each one

So now we mount the iso of FreeNAS to the CD drive of the virtual machine and start it

I select to install FreeNAS on my virtual hd that I chose to be 8GB large (no need for a big hd as this is used only by FreeNAS and cannot be used for volumes)

freenas install -1

freenas install -2

Finish the install and reboot

freenas install -3

After reboot I can open my browser and type in the url in order to access FreeNAS

freenas install -4

Logging to FreeNAS and going to Storage -> View Disks you can check my drives mounted as raw devices

Testing FreeNAS zfs volumes from ubuntu

Before copying all my data to the FreeNAS, I wanted to check if my writes were readable from a different system

After I created a volume in FreeNAS I removed the hard drive and installed it in a ubuntu 12.04 server which had the zfs installed. You can install zfs in ubuntu by using

 apt-get install ubuntu-zfs

in order to import the volume you can try

 zpool import volume1

where volume1 was the name of the volume I had created in FreeNAS

Importing the volume in ubuntu and viola! I was able to read the files and directories without any problem