debian, grub-pc and /usr/sbin/grub-probe: error: unknown filesystem.
apt-get dist-upgrade and… BOOM!!!
Configurazione di grub-pc (1.98~20100128-1)…
/usr/sbin/grub-probe: error: unknown filesystem.
Auto-detection of a filesystem module failed.
Please specify the module with the option `–modules’ explicitly.
Generating grub.cfg …
/usr/sbin/grub-probe: error: unknown filesystem.
dpkg: errore nell’elaborare grub-pc (–configure):
Not good.
Bug Report and my solution, downgrade to 1.98~20100115-1:
apt-get install grub-common= grub-pc=1.98~20100115-1 grub2=1.98~20100115-1
(…)
Installation finished. No error reported.
Have a nice day!
sphinx and WARNING: DOCID_MAX document_id, skipping
This error seems to wake-up with large ids >100.000.000 (like Ruby On Rails fixtures sys does).
Ok, like Piotr Jasiulewicz says this error appears because the sphinx was built without the –enable-id64 option.
Let’s go to solve this problem in Debian (note: I assume you use mysql, if not you have to change some dependencies packages).
Update 2012-05-31: this post refers to Debian Lenny i386. I don’t know if the binary package of Debian Squeeze (other distros, versions, architectures) is compiled with the same compile options at the moment. Anyway this post is intended to solve the specific warning (or to suggest a solution just in case you use another distro/architecture) .
Move to your preferred source folder (for example ~/src) or create it. Move to root user with su.
Download debian’s sphinxsearch sources:
#apt-get source sphinxsearch
Give permissions to your user on sphinxsearch files.
#chown -R youruser:youruser sphinxsearch*
Install mysql dev packages:
#apt-get install libmysqlclient-dev libmysqld-dev
Exit from root and return to your user. Enter in source folder of sphinxsearch (may vary with versions), configure with proper flags and make.
#exit
$cd sphinxsearch-0.9.9
$./configure –enable-id64
$make
Please note that pgsql is disabled by default and you should take a look at configure options (./configure –help) to see if you need others options, I don’t (except for libstemmer but I ignore this here).
Ok. If all was ok at make/compile time you can move on installation.
Move to root user with su (uninstall debian sphinx package if needed) and install.
#apt-get remove sphinxsearch
#make install
That’s all. Happy Sphinx On Ruby On Rails with fixtures 🙂
Sui virus informatici, e sulla sicurezza…
Vengo da una discussione fresca fresca nata a proposito dei classici annunci di nuovi virus in circolazione, pericoli abissali per gli utenti, qualcuno dice addirittura che un virus informatico ha ucciso la sua famiglia…
Quando leggo questo genere di articoli sono pervaso da un senso di nausea, non tanto perchè i virus esistono, ma piuttosto perchè oramai sembra che l’informatica non possa esistere senza di loro. A volte dico che uso lo stesso sistema operativo da 10 anni e non ho mai preso un virus… qualcuno mi guarda come se fossi un alieno, fa un passo indietro e mi dice “allora sei tu che li crei!! sei un hacker!!”, qualcuno ha quasi profetizzato che io fossi il nuovo messia…
Netgear Readynas Duo, NFS and Debian Sid: mount.nfs: Operation not permitted
Today I spend some time to mount one folder on Readynas Duo with NFS. All goes right from server (Debian Lenny) but i can’t mount NFS partitions from my pc (Debian Sid).
Error was “mount.nfs: Operation not permitted “.
Ok, I check my mount options
#cat /etc/fstab <ipaddress>:/c/folder /mnt/folder nfs rw,user,noauto 0 0
Fstab is ok but problem persists.
Request mount to be verbose (from my pc – debian sid)
<myhost>:/home/giulio# mount -v /mnt/folder mount.nfs: timeout set for Sun Jan 17 13:34:47 2010 mount.nfs: trying text-based options 'addr=<readynas-ip-address>,vers=4,clientaddr=<my-pc-address>' mount.nfs: mount(2): Operation not permitted mount.nfs: Operation not permitted
Request mount to be verbose (from my server – debian lenny)
mount.nfs: trying <readynas-ip-address> prog 100003 vers 3 prot TCP port 2049 mount.nfs: trying <readynas-ip-address> prog 100005 vers 3 prot UDP port 3078 <readynas-ip-address>:/c/folder on /mnt/folder type nfs (rw,noexec,nosuid,nodev,noauto,user)
Wow, ok, there is a difference.
My pc try to mount nfs with version 4, my server doesn’t use v4, but it uses v3!
What is strange?
I’ve read a lot of tutorial/faq but my problem remains. So I read man pages but this is what I find, for example in man mount.nfs…
mount.nfs is meant to be used by the mount(8) command for mounting NFS shares. This subcommand, however, can also be used as a standalone command
with limited functionality.mount.nfs4 is used for mounting NFSv4 file system, while mount.nfs is used to mount NFS file systems versions 3 or 2. remotetarget is a server
share usually in the form of servername:/path/to/share. dir is the directory on which the file system is to be mounted.
It seems to be false. On my pc I use mount.nfs and always mount tries with nfs4.
Ok, let’s go to solution..
You can force the NFS version to use with nfsvers=3.
So I change my /etc/fstab like this:
<readynas-ip-address>:/c/folder /mnt/folder nfs rw,user,noauto,nfsvers=3 0 0
Now mount uses the right version and all goes well.
Bye!
wiimote, wiicontrol, DrNokSnes and n900
Install DrNokSnes and wiicontrol.
Edit /usr/bin/wiicontrol to match this configuration (dont copy/paste, on python indentation level of your statements is significant):
mapping={
‘U’: [“a a”],
‘D’: [“a d”],
‘L’: [“a s”],
‘R’: [“a w”],
‘A’: [“a z”],
‘+’: [“a x”],
‘-‘: [“a c”],
‘1’: [“a v”],
‘2’: [“a b”],
‘H’: [“a n”],
‘GU’: [“a u”],
‘GD’: [“a i”],
‘GL’: [“a o”],
‘GR’: [“a p”],
‘Z’: [“a k”],
‘C’: [“a l”]
}
Start Bluetooth (or wiicontrol crashes).
Start wiicontrol (my wiicontrol freeze and I cant select key setup but it still works).
Setup wiimote (press 1+2).
Start DrNokSnes and tap un titlebar to configure keyboard.
Enjoy!
ruby on rails on nokia N900
Yes, we can! ruby on rails works well on nokia n900.
Install ruby from maemo repository (dev).
Download and install rubygems (use –no-rdoc and –no-ri).
Rubygems creates only /usr/bin/gem1.8 so you should create a soft link like this: ln -s /usr/bin/gem1.8 /usr/bin/gem
Type gem install rails -V and wait.
Now you are ready to start your rails app on nokia n900!
Just run ruby script/server in your project folder. To create a project folder use rails my_app as usual.
Your server may not start if you miss libopenssl-ruby. In this case you get an error about net/https: apt-get install libopenssl-ruby.
codice promozione nokia, n900 a 479€!!!
Avete letto bene! Il nuovo dispositivo mobile nokia n900 è acquistabile (pare fino al 12 Dicembre) attraverso lo shop online di nokia a 470€ (prezzo di partenza 599€)!
Per ottenere lo sconto è sufficiente inserire il codice promozione PRWK12 nell’apposito spazio all’interno del carrello. Applicando il codice promozione infatti il prezzo del telefono viene scontato di circa 120€.
La promozione funziona – come potete vedere dalle immagini – e vi consentirà di portare a casa il nuovo gioiellino nokia ad un prezzo veramente interessante, soprattutto se paragonato ad dispositivi simili della concorrenza.
Inoltre va detto che l’n900 non è un “qualsiasi” dispositivo mobile: è una vera rivoluzione perchè basato su Linux! Maemo 5 consentirà finalmente di disporre a pieno delle potenzialità del proprio dispositivo, l’opensource applicato alla telefonia mobile rivoluziona il concetto di telefono. Con l’n900 sai da dove parti (qualità nokia) ma non sai dove arrivi: centinaia di applicazioni liberamente scaricabili, contributi degli utenti, la community opensource produrrà continuamente novità, gratuite e completamente personalizzabili, il tutto sopra un OS linux a base Debian dove ad eccezione di piccole parti di codice nokia, tutto è open. Insomma, una vera svolta di libertà dopo il lungo periodo di prigionia tra le maglie di mr. $ ed la val di non.
rails date validation, rails validate date for date_select
Ok, you are in right place if you need to validate a date from date_select helper.
Expecially if your problem is an invalid date like ’31/02/2009′ that becomes ’02/03/2009′ on rails!
If you don’t want to waste your time read here and don’t go immediatly to rails date validation plugin .
validates_timeliness plugin introduces a lot of great features to validate a date but its documentation is not so cool (this is my absolutely wrong opinion). You have to read it completly or take a look here about 3 important points:
- I18n
if you don’t use :en locale you have to implement validates_timeliness default translation in your translations file (for ex. config/locales/it.yml) or you will waste your time to debug stupid exceptions. Default plugin translation file can be found in vendor/plugin/validates_timeliness/lib/validates_timeliness/locale after installation; - Validate invalid date (like 31/02/2009 becomes 02/03/09) from select helpers
You need to know that validates_timeliness doesn’t fix this problem automatically as you expect!
You have to manually enable validates_timeliness workaround if you need to validate invalid date on rails.
Put ” ValidatesTimeliness.enable_datetime_select_extension! ” your environment.rb (EOF) to enable validate_timeliness workaround and catch bad dates.
Note: Patch to ticket #10556 introduced this problem: rails accepts invalid dates from input (instantiate Time object and convert it back to a date). This problem generates a lot of confusion, checks on controllers, horrible workarounds and so on… A valid reason seems to exist! But WTF!!! People in panic and code with consistency problems…
Any other information (and download) can be find on validates_timeliness at github.
Have a nice day!
validates_timeliness
lighttpd, fcgi, rails and child exited with status 9, 1, 2, 3 or X
Ok, these errors are not good. They didn’t tell much about what happended.
But you can’t do as I did. Don’t wander on the dark side of the system…
Just try to execute your FCGI as your lighttpd did.
Find your lighttpd user in lighttpd configuration file (debian: /etc/lighttpd/lighttpd.conf).
On my configuration I see:
server.username = “www-data”
so…
$ su
# cd /my_rails_root/public
# sudo -u www-data ./dispatch.fcgi
Read what’s happen and solve.
That’s all!