domingo, 20 de mayo de 2018

EXT4 virtual disk optimization (2nd edition)


Following the previous post, if you want to create a brand-new ext4 filesystem with most of the performance settings activated, you can do it this way:

# mkfs
mkfs.ext4 -T news -m 1 -I 128 -v -O "^has_journal,^dir_index,^dir_nlink,^huge_file,^metadata_csum,^quota" /dev/sda1
# tune2fs
tune2fs -o "journal_data_writeback,^user_xattr,^acl,nobarrier,discard" /dev/sda1
And then, in the /etc/fstab file you can use the following mount-point parameters:
# /etc/fstab

No implicit nor explicit warranty of any kind is stated here. These commands and/or settings may cause data loss. Use them wisely at your own risk!

lunes, 31 de julio de 2017

EXT4 virtual disk optimization

Hi all,

These are my tweaks in order to squeeze the performance of a EXT4 virtual disk (in example /dev/sdb1).

No implicit nor explicit warranty of any kind is stated here. These commands and/or settings may cause data loss. Use them wisely at your own risk!

tune2fs -o journal_data_writeback /dev/sdb1
tune2fs -O ^has_journal /dev/sdb1
sudo e2fsck -f /dev/sdb1
tune2fs -o ^user_xattr /dev/sdb1
tune2fs -o ^acl /dev/sdb1
tune2fs -o nobarrier /dev/sdb1
tune2fs -o discard /dev/sdb1
tune2fs -O ^dir_index /dev/sdb1
tune2fs -O ^dir_nlink /dev/sdb1
tune2fs -O ^huge_file /dev/sdb1
tune2fs -O ^metadata_csum /dev/sdb1
tune2fs -O ^quota /dev/sdb1
tune2fs -r 0 /dev/sdb1

dumpe2fs /dev/sdb1 | less

References and Kudos:


sábado, 1 de abril de 2017

JSF 2.1 within embedded Tomcat 8 (2017)

This post relates about configuring the following aspects to get a working JSF 2.1 application:
  • Maven 3
  • JSF 2.1.7
  • Embedded Tomcat 8


<project xmlns="" xmlns:xsi=""
 <name>spa-jsf-generator Maven Webapp</name>




  <!-- JSF -->

  <!-- Java standards -->

  <!-- Tomcat -->

  <!-- Testing -->


<?xml version = "1.0" encoding = "UTF-8"?>
<web-app xmlns:xsi=""
 xmlns="" xmlns:web=""
 id="WebApp_ID" version="2.5">




  <servlet-name>Faces Servlet</servlet-name>

  <servlet-name>Faces Servlet</servlet-name>


package eu.altotek.spa_jsf_generator;


import org.apache.catalina.WebResourceRoot;
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.startup.Tomcat;
import org.apache.catalina.webresources.DirResourceSet;
import org.apache.catalina.webresources.StandardRoot;

public class Main {

 public static void main(final String[] args) throws Exception {

  final String webappPath = new File("src/main/webapp").getAbsolutePath();
  final Tomcat tomcat = new Tomcat();

  final StandardContext ctx = (StandardContext) tomcat.addWebapp("/", webappPath);

  // Declare an alternative location for your "WEB-INF/classes" dir
  // Servlet 3.0 annotation will work
  final String targetClassesPath = new File("target/classes").getAbsolutePath();
  final WebResourceRoot resources = new StandardRoot(ctx);
  resources.addPreResources(new DirResourceSet(//
    resources, "/WEB-INF/classes", //
    targetClassesPath, "/"));



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="">
<title>JSF Tutorial!</title>


package eu.altotek.spa_jsf_generator.jsf;

import javax.faces.bean.ManagedBean;

public class HelloWorld {

 public HelloWorld() {
  System.out.println(this + "started!");

 public String getMessage() {
  return "Hello " + this;

References & kudos


viernes, 15 de enero de 2016

Instalación paso a paso de Linux Mint 17 via PXE/Netboot


Después de un breve descanso, he querido instalar un linux en un portátil un poco antiguo, y la distrubución escogida ha sido Linux Mint 17.3 (Rosa).

Aquí están las instrucciones para hacer una instalación desde red (mediante PXE+dnsmasq+TFTP+NFS) :

NOTA: Hay que cambiar la IP por la tuya!!

sudo bash
apt-get install dnsmasq nfs-kernel-server nfs-common syslinux

# archivos
mkdir -p /srv/tftp/pxelinux.cfg
ln -s /cdrom /tmp/cdrom

# dhcp/tftp
cat <<EOF > /srv/tftp/pxelinux.cfg/default
DEFAULT /cdrom/casper/vmlinuz
KERNEL cdrom/casper/vmlinuz
APPEND ip=dhcp netboot=nfs boot=casper root=/dev/nfs nfsroot= initrd=/cdrom/casper/initrd.lz splash --

cat <<EOF >> /etc/dnsmasq.conf

service dnsmasq restart

# nfs
cat <<EOF >> /etc/exports

/tmp/cdrom       *(ro,sync,fsid=0,no_subtree_check)
service nfs-kernel-server restart ; exportfs -a

A disfrutar!

jueves, 28 de febrero de 2013

iPhone Jailbreak + Cydia with Evasi0n: The easy/direct way

After Apple lost most of it's credit and "coolness" caused mainly by the rain of patches for it's iOS 6, I decided to stop (at 6.0.1) and jailbreak-free from this madness.

I consider myself a newcomer to the iPhone world, so I expected waste time (and gallons of sweat) to jailbreak an iPhone 4 but after I tried (and claimed the refund from) I was lucky to find a post at (spanish) site[2], telling that the Evad3rs Team were able to jailbreak iOS up to 6.1.2!

No redsnow, no .IPSW files, I just downloaded the (tiny) package from the main site[3], ran it and voila! Everything worked like a charm. :)

More information:

sábado, 26 de enero de 2013


Gracias por venir!

Aquí encontrarás información y opiniones principalmente de programación y tecnología, experiencias y algún que otro truco.

Espero que disfrutemos y aprendamos todos de esta aventura!