UPDATE4: Kubuntu/Ubuntu: OCZ SSD, swap, memory, 64 bit, or how to pimp your life with a Panasonic CF-R8...

23:59 / Comments (0) / by pan1nx

Here is some overview on how to get a new Panasonic CF-R8 to work with Ubuntu and an OCZ-Vertex SSD...

First, you need to open up your laptop in order to change the drive. I will come back on this pictures in another article later...

Then, you need to make sure that the OCZ partitions are aligned properly (that is before you install the Ubuntu/Kubuntu). Before you start, make sure that you have backed up all the partition (i.e., use rsync -ax / /mnt/USB) and  then, in a console/shell with fdisk:
fdisk -H 32 -S 32 /dev/sda

And of course, the creation of the partition (use :
Command (m for help): o
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-15711, default 1): 2
Be sure to start from cylinder 2 (to have it aligned) as discussed also in some forums.

Another good tip is to create the filesystem with the extended options for the RAID strip of 64k. Here is the command for it (assuming that you have the sda1 as the partiotion):
mkfs.ext4 -E stripe-width=128 /dev/sda1

Since the SSD is fast enough, you can also tweak the /etc/fstab for better through output and make the logs go to memory (volatile):
/dev/sda1       /               ext4 noload,noatime,nodiratime,data=writeback,nobh,commit=100,barrier=0 0       1
tmpfs           /tmp            tmpfs defaults,noatime,mode=1777 0 0
none            /var/tmp        aufs noatime,br:/tmp=rw:/var/tmp=ro 0 0
none            /var/log        aufs noatime,br:/tmp=rw:/var/log=ro 0 0
none            /var/cache      aufs noatime,br:/tmp=rw:/var/cache=ro 0 0
Though, make sure that every now and then, you rebuild the cache...

Other optimizations for boot time can be committed via /etc/default/grub (to run update-grub after) to speed up also the kernel loading, with some nice tweaks:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash=silent resume=/dev/sda2 fastboot elevator=deadline raid=noautodetect rootflags=noload,data=writeback,nobh,commit=100,barrier=0"
You will need to update the grub via update-grub command...

Add swappiness to fix some default behavior, and switch back now from noop to deadline that is more cpu/write friendly-with fifo_batch option for io scheduller:
cat << EOF| sudo tee -a /etc/sysctl.conf
# Peter added swapiness...
vm.swappiness = 0
vm.laptop_mode = 5
vm.dirty_writeback_centisecs = 1500
vm.vfs_cache_pressure = 50
EOF

And last, we need some optimizations after booting:
cat << EOF| sudo tee /etc/init/ssd-optimizations.conf
# ssd-optimizations - Set the parameters

description     "Set required ssd parameters"

start on starting dm

script
#       echo deadline > /sys/block/sda/queue/scheduler
        echo 1 > /sys/block/sda/queue/iosched/fifo_batch
        echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
end script
EOF

Well, believe it or not, but with these settings, I got X starting at sec. 2, so, it is pretty fast (no initrd!)...

Some good links:
  1. OCZ Firmware update
  2. Ted Tso guide to partitioning...
  3. http://www.ocztechnologyforum.com/forum/showthread.php?t=54379&page=17
  4. http://www.ocztechnologyforum.com/forum/showpost.php?p=373226&postcount=98
  5. http://ata.wiki.kernel.org/index.php/ATA_Secure_Erase

My Linux life is completed by the N900 mobile phone...

14:34 / Comments (0) / by pan1nx

Well, the N900 is not quite a mobile phone. Saying that is an understatement. It is more like a mini laptop with a phone added as feature. Anyway, as of last weekend, I am using the Maemo Linux based Internet Tablet... Costs around 600€ but is worthy for those working and demanding a mobile development platform. Highly recommended...and here are the reasons:
  • WiFi
  • 3G
  • SIP
  • Full browser (Fennec)
  • GTK/Open source/Debian
Well, you do the math... meanwhile, I enjoy it...

Found my router, and bought it in Europe...

20:00 / Comments (0) / by pan1nx

Remember my old post about SOHO router with low power and available in European shops (2009/05/where-is-my-router)? Guess what, I found one. It is not from Billion and it does not have that much as 4 GigaEthernet ports, but still it is full of features, and based on some reviews, it is even more stable (although I will soon give feedback if that is not true). So, to remind you, my requirements where:
  1. ADSL2+
  2. Firewall with VPN
  3. VoIP (SIP)
  4. WLan (802.11N draft a bonus)
  5. Giga Ethernet
  6. 3G/UMTS/EDGE backup a (another bonus)
This new pick it has even more:
  1. Torrent client for the USB disk that you can attach
  2. SSH/Telnet
  3. Multiple SIP accounts
  4. Second WAN port (meaning 3 possible routings, with ballance)
  5. VPN with 32 (Billions has only 16)
  6. Printer support (not seen in Billions version)
Interesting, is it not? Even better than the previous hit! And, another extra bonus: you can buy it Europe? Me so happy. Not to mention that it has a quite decent price, somehow lower than what was estimated for Billions. I found it from British BroadbandBuyer and it is a DrayTek Vigor 2820Vn. It took 7 days to get it and the shipping was quite inexpensive. So, I am a happy low power router with lots of features owner now...