All posts by mauro mascia

Reset MySQL root password

Have you lost your MySQL root password?? Oh… That sucks!

Here his how to change it (on *nix):

# /etc/init.d/mysql stop
# mysqld_safe --skip-grant-tables &;
# mysql -u root mysql
> UPDATE user SET Password=PASSWORD('newrootpassword') WHERE User='root';
> FLUSH PRIVILEGES;
> exit
# /etc/init.d/mysql stop
# /etc/init.d/mysql start

Arti Grafiche Pisano

The website of the printing house “Arti Grafiche Pisano” was done in a customized way (without CMS) and, apart from a few static pages, is mainly made up of quotation forms: once the required fields (the number of prints, paper type, size, etc.) are selected, and the contact form is filled out, an email is sent to the printing house stuff.

Another important part of the site is where files can be exchanged between the client and typography: the customer can load (after authentication) the files to be printed and can later find the receipts / invoices available for download.

Valdes’ Laboratory

The website of the laboratory Valdes has a static structure with three columns and the home page shows information, news and notices. It’s characterized by a section for booking every single test that is performed by the laboratory and a private area where there is a forum created for internal uses.

I’ve also created a plugin for sending newsletters and birthday emails to customers owners of “fidelity card” issued by the laboratory (which allows to have discounts, email/sms alerts, etc).

Faculty of Architecture (Cagliari)

The site presents a standard layout in two columns, with sidebar to the left. Only the home page layout has three columns: the third column contains a news in the foreground and the latest 8 news; the center is the logo of the faculty or alternatively the poster of an event organized by the faculty itself.

This is a “remake” of the previous Architecture’s website: same graphics but different CMS. In fact, it was based on the old version of Drupal 4 and therefore, for a reason of obsolescence and to be integrated with the WordPress multisite of http://people.unica.it/, they have been asked the porting to WordPress.

Apart from the normal static pages, dynamic ones (such as those of the academic program) are made through the WordPress plugin called Pods CMS (http://podsframework.org/) that allows the definition of content types and custom fields, features not found on the WordPress platform as basic feature.

We have integrated, also, the opensource library TCPDF (http://www.tcpdf.org/) with the Pods plugin, so that dynamically generated pages from this plugin could be downloaded as a PDF document.

Some thoughts on the best cross-platform filesystem for external hard drives

It’s not simple to answare the old question: « What is the best cross-platform filesystem for my very very big external hard drive? ». For cross-platform, I’ll limit the platforms number to the most used / the-ones-on-which-I-can-make-some-tests: Windows 7, Ubuntu 12.04 and Mac OSX Snow Leopard (that can be abbreviated with the first letter of each OS: W-U-M).

From the multitude of the FS listed here [1], the ones most used or interesting are:

  • FAT32
  • exFAT
  • NTFS
  • HFS+
  • ext2, ext3, ext4

The simplest way to answare the question is the choiche of FAT32 because it’s one of the oldest FS (designed for Windows 95 to pass over on old FAT16 limitations) in the list and it’s supported on both W-U-M for both read/write operations. The bad old-news are it’s limitations:

  • Maximum file size: 4 GB minus 1 byte (232?1)
  • Maximum partition size: 2 TB
  • No journaling

So, if you have an hard disk in which all files will be always under 4GB size, that’s the choice! Stop reading here.

But if you have some Blu-ray Disc backups or some HD video recordings (and you care about it)… uhm… that’s bad!

ExFAT

Also called FAT64, is a relative new (2006) proprietary file system designed to come through FAT32 limitations and to be used for flash drives (and I haven’t find out many tests on USB external hard drives). It’s developed by Microsoft and due to the restrictive licenses applied, it’s not very simple to use under Linux. We don’t want to spend days and nights to understand how to make it work under our beatiful Ubuntu and FUSE-ing it [2] unless it’s the last choice! It’s also not journaled… so… Next!

NTFS

As the name says it’s a File System designed for the Windows NT series (introduced in the ’93 and evolved in the years) as improvement of the FAT partition/file-size limitation and, among the others, adds the journaling [3] functionality (if an unexpected computer failure leaves the file system in an inconsistent state, the volume can be repaired). But the bad side is that OSX and Ubuntu can only the read operations; for the write ones can be used the NTFS-3G [4] solution and also this one is a FUSE solution [5]. Also Ubuntu uses these drivers but from some time, they are enabled as default.

HFS+

It’s a journaled FS designed by Apple for MacOS/OSX systems. It’s fully compatible with Linux but without journaling. On Windows there is a driver released by Apple but only for read operations; to enable also the write operations can be used something like this: http://www.mediafour.com/store/ for $50/PC. Uhmmm… I don’t know if you like it but I didn’t.

ext2 – ext3 – ext4

“Beep-beep-beeeeeeeeep! Nothing to do here… It’s gone”. These are just Ubuntu/Linux FSs, so for Windows [6] and OSX seems to be more complicated than the inverse research of what works on W/OSX and adapt it to be used on Ubuntu.

Summary & conclusion

  • FAT32 is good only if we was in the end of 2000
  • ExFAT have no journaling and isn’t heavily tested on hard drives
  • NTFS is journaled, robust and is the most tested in other OSs
  • HFS+ can be used on Ubuntu without journaling and on Windows paying
  • ext family it’s designed for the Linux family and are wary of foreigners!

So, the winner is the old and robust NTFS!

Just one note about it: if for some reasons the disk where removed while transferring files under OSX (I think also under Ubuntu), the disk will not be accessible anymore. But don’t worrie! To solve the problem you must make a check disk & fix under Windows (Seven in my case), using the command “CHKDSK /F X:” where X: is the name of the unity to be fixed. The cmd prompt must be executed as administrator.

References

It’s not simple to answare the old question: « What is the best cross-platform filesystem for my very very big external hard drive? ». For cross-platform, I’ll limit the platforms number to the most used / the-ones-on-which-I-can-make-some-tests: Windows 7, Ubuntu 12.04 and Mac OSX Snow Leopard (that can be abbreviated with the first letter of each OS: W-U-M).

From the multitude of the FS listed here [1], the ones most used or interesting are:

  • FAT32
  • exFAT
  • NTFS
  • HFS+
  • ext2, ext3, ext4

The simplest way to answare the question is the choiche of FAT32 because it’s one of the oldest FS (designed for Windows 95 to pass over on old FAT16 limitations) in the list and it’s supported on both W-U-M for both read/write operations. The bad old-news are it’s limitations:

  • Maximum file size: 4 GB minus 1 byte (232?1)
  • Maximum partition size: 2 TB
  • No journaling

So, if you have an hard disk in which all files will be always under 4GB size, that’s the choice! Stop reading here.

But if you have some Blu-ray Disc backups or some HD video recordings (and you care about it)… uhm… that’s bad!

ExFAT

Also called FAT64, is a relative new (2006) proprietary file system designed to come through FAT32 limitations and to be used for flash drives (and I haven’t find out many tests on USB external hard drives). It’s developed by Microsoft and due to the restrictive licenses applied, it’s not very simple to use under Linux. We don’t want to spend days and nights to understand how to make it work under our beatiful Ubuntu and FUSE-ing it [2] unless it’s the last choice! It’s also not journaled… so… Next!

NTFS

As the name says it’s a File System designed for the Windows NT series (introduced in the ’93 and evolved in the years) as improvement of the FAT partition/file-size limitation and, among the others, adds the journaling [3] functionality (if an unexpected computer failure leaves the file system in an inconsistent state, the volume can be repaired). But the bad side is that OSX and Ubuntu can only the read operations; for the write ones can be used the NTFS-3G [4] solution and also this one is a FUSE solution [5]. Also Ubuntu uses these drivers but from some time, they are enabled as default.

HFS+

It’s a journaled FS designed by Apple for MacOS/OSX systems. It’s fully compatible with Linux but without journaling. On Windows there is a driver released by Apple but only for read operations; to enable also the write operations can be used something like this: http://www.mediafour.com/store/ for $50/PC. Uhmmm… I don’t know if you like it but I didn’t.

ext2 – ext3 – ext4

“Beep-beep-beeeeeeeeep! Nothing to do here… It’s gone”. These are just Ubuntu/Linux FSs, so for Windows [6] and OSX seems to be more complicated than the inverse research of what works on W/OSX and adapt it to be used on Ubuntu.

Summary & conclusion

  • FAT32 is good only if we was in the end of 2000
  • ExFAT have no journaling and isn’t heavily tested on hard drives
  • NTFS is journaled, robust and is the most tested in other OSs
  • HFS+ can be used on Ubuntu without journaling and on Windows paying
  • ext family it’s designed for the Linux family and are wary of foreigners!

So, the winner is the old and robust NTFS!

Just one note about it: if for some reasons the disk where removed while transferring files under OSX (I think also under Ubuntu), the disk will not be accessible anymore. But don’t worrie! To solve the problem you must make a check disk & fix under Windows (Seven in my case), using the command “CHKDSK /F X:” where X: is the name of the unity to be fixed. The cmd prompt must be executed as administrator.

References