quinta-feira, fevereiro 28, 2013

"The Last Light of the Sun" by Guy Gavriel Kay

The Last Light of the Sun - Guy Gavriel Kay
Guy Gavriel Kay, along with George R. R. Martin, are perhaps the best living writers of epic fantasy, and "The Last Light of the Sun" is up to his usual standards. However, this does mean that one has to be in the mood to read epic fantasy to enjoy it.

This is the sort of book where I think one's enjoyment depends greatly on whether you're in the mood to read what it offers. 

"The Last Light of the Sun" is not a flexible book or one that fits itself to the reader's mood. It's epic fantasy of a particular style, and insists on being read in that mode. I recommend saving it for when that's what you want to read, and avoiding it if you don't like that sort of thing at all. If you haven't liked any of Kay's previous work, this book won't convert you. For the right mood, though, it's magic, unhampered by its few slight flaws.

domingo, fevereiro 24, 2013

"The Official Damn Small Linux Book: The Tiny Adaptable Linux That Runs on Anything" by Robert Shingledecker, Christopher Negus

The Official Damn Small Linux Book: The Tiny Adaptable Linux That Runs on Anything - Robert Shingledecker, Christopher Negus
Worth reading for the projects: Edna music server, digital photo frame, skype via VOIP, etc. As for the rest it's a run-of-mill book.

If you're thinking of learning something worthwhile to implement on a Raspberry Pi Project, look elsewhere.

sábado, fevereiro 23, 2013

Project 10 - Raspberry Pi - Which FS to use with USB drives



Pedro, this is for you...:)

http://www.ntfs.com/ntfs_vs_fat.htm

Sum-Up:


FAT
Does not have the ability to address more than 2TB using traditional 512-byte sectors.
It's its simplicity that makes it attractive for the new generation of storage mediums based on flash memory. Usually, flash memory devices (think SD/memory cards and USB keys) don't have the fastest interfaces to the computer, and any overhead a filesystem introduces simply slows it down. And, because flash storage devices don't often approach the volume of spinning-disk drives, you don't need advanced filesystems to handle them.
FAT32
The inability to handle single files larger than 4GB. As a filesystem it's also not the most efficient, and can slow down dramatically when large volumes of files are stored in a directory.
FAT32 is the de-facto for flash storage, providing the ability to address up to 2TB using traditional 512-byte sectors, while maintaining the simplicity and speed of FAT. Though, of course, it also lacks features that modern filesystems have such as security and journaling - but these aren't often needed for flash storage.
NTFS

exFAT should be a true competitor to NTFS on systems with limited processing power and memory. NTFS on flash memory has been known to be inefficient for quite some time. exFAT’s smaller footprint/overhead makes it ideal for this purpose. Of course, only if your definition of “ideal” allows software to be proprietary and not open source.
EXT3
You can use ext3 partitions under windows with some special drivers/tools.
Ext3 or third extended file system is a file system used by the linux kernel. This is a default file system in linux for many applications and popular linux distributions.
EXFAT
The only drawbacks to exFAT are that Microsoft has not released it into the public, requiring that companies licence it for use on their devices. This is likely more aimed at digital video recorder type devices, home users get a licence to use it with Windows.
Because the inability to handle files larger than 4Gb, Microsoft introduced exFAT in Windows Vista and Windows 7. exFAT is built on the simplicity of FAT but designed specifically for large volume flash media, the type of which we now find in memory cards for cameras, portable USB drives and so on. exFAT is faster than FAT32 and does a better job of maintaining speed with large volumes of files. In other words, if you're carrying around and regularly use USB keys or memory cards, you should be probably be using exFAT to make the most of them. exFAT basically takes the FAT file system to the next level, adding a large amount of long awaited features that the FAT32 system was sorely lacking. One of the key features for people doing video editing is the support for >4Gb files and much larger partition sizes than FAT32 typically supported, making it much easier to work with modern multi-terabyte drives.

exFAT has been around for awhile, but I've never really heard about it. Essentially, it's a file system that's both readable and writable on any modern Mac or Windows machine (sorry, Leopard users). All you need to do is format the drive on a Windows machine and you're good to go. Note that you can't format it on OS X, you have to format it on Windows for it to be compatible with both platforms To do so, just:
1.    Open up Windows Explorer and right-click on your drive in the sidebar. Choose "Format".
2.    In the "File System" dropdown, choose exFAT instead of NTFS.
3.    Click Start and close this window when finished.
From then on, that drive should work fantastically between Mac and Windows machines. It won't work with Linux unless you install Linux's exFAT drivers, but for most people, exFAT is just about perfect.
You need to select a cluster size. The data is not read at the byte level, but rather in blocks. Generally, the smallest unit of storage is a sector (traditionally 512 bytes, 4096 bytes for Advanced Format drives), but even that is not how files are stored in file-systems, but rather sectors are grouped together into clusters.
Raspberry Pi itself doesn’t really have a restriction on cluster size, but the operating system you use may. Usually, any standard size will work, but typically, it depends on what kind of files you will be storing on it.
If you are going to be storing lots of tiny files, then select the smallest cluster size possible (one sector; 512 for memory cards). This way you avoid wasting space by having lots of partially unused clusters. If you are going to be storing lots of giant files, then use the largest clusters size possible (usually 64KB; I’ve never seen 1MB clusters :-o). That way you minimize the file-system’s file-management overhead which frees up a little more space for storage.
When not sure, just use 4KB clusters; that works for most general-purpose usage which is why it is usually the default.

Let«s format the USB drive with exFAT on Windows 7:

Install the exFat-Fuse FS onto the Pi:


Tail -f /var/log/messages before inserting the exFAT-USB-Disk:



Insert the exFAT-USB-Disk and issue the same line command again:

USB detected!!!

Let's confirm with blkid:

/dev/sda1: ....TYPE="exfat" on the picture above. Confirmed!

Let's create the directory on which I'm going to mount the extFAT-USB-Disk, using sudo mkdir /media/usbazul:

 After that let's mount the usb:


Let's chmod the directory with 777 because it was created with sudo:



Let's confirm the creation of the mount point:


Let's confirm it with blkid as well:


Now I want to load something onto the mount point via sftp. I'm going to upload a video (M4O.mp4 ...) and the usual Andreas Scholl folder:


Let's play one of the files (my wife singing at the piano):


After that I wanted to unmout the usb drive. For that I issued the command sudo umount /media/usbazul, but the mount point was still busy. I had to kill it. In order to do that I had to find out what was the mount point process: ps -ef |grep exfat |more:


then I issued the command sudo kill 3260, which was the mount point process I wanted to find out.

I can take the usb out of the hub and confirm that I can still have the files on Windows 7 that I had on the mount point:


There they are: M4O.mp4 and the Andreas Scholl folder!
Forget the NTFS FS. Waste of time...


Happy hacking. You don’t learn to hack – you hack to learn…

MAAntão

quinta-feira, fevereiro 21, 2013

"The Way Home" by George Pelecanos

The Way Home - George Pelecanos
Redemption...A story of love between a father and son, but a sort of a clunker.

Pelecanos’s fiction has for a while now been decidedly more upbeat, less bleak and, I dare say, a little too predictable. 

What's also getting on my nerves is his skewed syntax and more than a few strangely constructed sentences that stand out a mile away. And it's getting more pronounced with each book. Rush jobs for a paycheque?

It was also very preachy (like some of his late books). 

While reading the book, I was expecting something to throw me off. Didn't happen. It also did not succeed in creating a memorable world full of interesting characters and a credible story-line.

It was a bit of a bore for me.

terça-feira, fevereiro 19, 2013

Project 9 - Raspberry Pi - Pi vs Samba

Procedure:

Once its installed – I need another thing installing – so do this

 sudo apt-get install samba-common-bin

And then run this command

 sudo smbpasswd -a pi

You will be asked to enter the pi password twice – use raspberry as the password if you wish. I've chosen something else.

Finally use:

 sudo nano /etc/samba/smb.conf

#======================= Global Settings =======================
[global]
workgroup = WORKGROUP
server string = mypi server
netbios name = mypi

dns proxy = no

#### Debugging/Accounting ####
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
####### Authentication #######
security = user
map to guest = pi
#======================= Share Definitions =======================
[homes]
comment = Home Directories
browseable = yes
guest ok = yes
read only = no
create mask = 0775
directory mask = 0775
writeable = yes
guest account = pi
[public]
path = /
guest ok = yes
guest account = ftp
browseable = yes
read only = no
create mask = 0777
directory mask = 0777
writeable = yes
admin users = everyone

And copy and paste the following to replace the existing file contents (as good practice first copy the file. If something goes wrong, I can always revert to the original version...)

 
Finally issue the following command:

 sudo /etc/init.d/samba restart:


My Pi can now be accessed as "\\mypi" from any windows machine on the same LAN.

Let's verify that. Issue the command /mypi on any explorer windows. It starts by asking for the password that i defined above:

.

After issuing the password, I've now access to the folders that I gave access to in the script above:


Here it is. The folder with the latest Andreas Scholl CD, my favourite Contratenor...lol  


I can use all the information on the Pi as if I'm locally on a windows machine.

And that's that.

I can also access my Pi folders from my Galaxy Tab (Android OS). For that I use the APP AndSMB. It's going to be handy when I create my Pi-NAS...

Happy hacking. You don’t learn to hack – you hack to learn…

MAAntão