Friday, February 7, 2014

Solving "grub-probe: error: cannot find a device for / (is /dev mounted?)"

A few days ago I encountered this error, which caused me a bit of head scratching.

There are a few causes for this; if you have your O/S installed on Btrfs, then the problem is most likely that you're mounting the entire partition (which is correct in case of other FSs, but not Btrfs) instead of the subvolume for the root.

The correct mount option is:

$ sudo mount -o subvol=@  
So if for example you want to recover grub, using chroot from a live cd, a sample sequence is:
$ sudo mount -o subvol=@ /dev/sda1 /mnt
$ sudo mount --bind /dev /mnt/dev
$ sudo mount --bind /proc /mnt/proc
$ sudo mount --bind /sys /mnt/sys
$ sudo chroot /mnt

Saturday, January 25, 2014

Sinclair A-Bike review (don't buy - it's broken and unusable)

I'm writing this review to inform potential a-bike clients to warn them about what they're going to get into.

TL;DR: A-Bike may seem an acceptable bike for people doing very small trips. This is not the case; due to a defective design, after some usage, even for very small trips, the bike will break. The problem is that the company ignores clients, so you will end up with an unusable bike.

I've had several folding bikes in the past, and I used them with different patterns. Currently I live in a big city with an extended metro system, and almost no hills. I currently use the bike to do the "last mile", and to go to shops close to my building.

For the first few months, the abike is adequate for this purpose. The upsides are:

  • it's super light
  • it folds quite easily
  • it's not such a big deal to have such small wheels, if one cycles on cycleways
The downsides are:
  • pedaling is hard (very inefficient)
  • the brakes work, but they're not very good
After a few months though, the chain started to skip, more and more, until the bike became completely unusable.

Bear in mind that I used the bike for short distances, less than 2 km every day, in flat roads.

I've done some research, and I've found that this is due to the fact that the inner gears are put under heavy strain, so they slowly wear down.

Bringing them to a bike shop is useless, since the parts are custom. So I wrote the support. They ignored the email. After a couple of weeks, I call. The woman on support says to open the bike, and send them a picture. I have a look at the bike, but the operation requires lots of screws to be unscrewed, so I send them a video instead. The ignore the email again. So I call again, and the woman says some circumstantial lie, then says a technical will call me shortly. Nobody calls.

So now I have a piece of crap that the company refuses to fix, and that shops can't fix, either.

So, to recap: if you want to buy an A-Bike thinking you can do small trips (I've seen other people with it), expect it to break quite quickly, and to have a unusuable piece of crap that the company refuses to repair.

Fortuna Studio Downtown (Zurich) - WATCH OUT, SCAMMERS!

So, this is a horror story about Fortuna Studio Downtown (Zurich, Switzerland). I apologize for the title of this post, but it's important for client to understand who they're dealing with.

TL;DR: They owners evicted us before the checkout date, without any reason, and without notice, while we weren't in the room, because of an error in their schedule, even if I told them in advance that they had an error (they ignored me). They didn't help at all, and refunded the expenses for a night at another hotel, after a month of complaints. They said plenty of lies to cover their continuous negligence.

--

We (2 people) booked the studio-apartment for a few days (Thursday, checkout on Monday), via booking.com; I had a sports competition, and I wanted a very simple room.

First of all, the advertisement on the booking website is false - it says that there is air conditioning in the room, while there isn't. Good luck when the temperature goes over 30°.

On Friday, I call them asking if I could do a late check out on Monday. They say that would be ok, but that the checkout is on Sunday. I say that they're wrong, but they reply that they have it in their schedule. I explain that I have the booking confirmation in front of me, and it says checkout out on Monday. They say that it's ok and they will check.

During the Sunday I do my competition, early morning to late evening, and come back after midnight. I find everything outside the apartment, and the lock changed. I turn on my mobile, and find that they wrote me several messages, during the day, warning me that they were about to evict me.

I call back and tell them that I've told them already that my booking was until Monday, and I ask them why they didn't listen. They say the would call back in 5 minutes. They call me and they say that they've done a mistake.

They don't come to fix the problem and pay, but they say that they will pay for a taxi and a room in another hotel.

So we carry everything down from the third floor, including a 15 kg 130x95x40 cm box (no elevator, and very narrow staircases), we take a cab, and we move to the other hotel.

All of this took more than a couple of hours, and we were exhausted - I just had a 16 hours-long competition.

After a week, they still didn't refund us. I call, and they lie, saying they would have completed the payment shortly.

After a couple of weeks, they lie again with the same story.

After a month, I ask their legal address, so I can initiate a lawsuit. They say a circumstantial lie, saying there has been a misunderstanding (again!), and that they would have refunded us shortly.

Finally, the payment comes, with a miserable additional refund of around 20€.

Wednesday, February 13, 2013

How to stop processes when a VPN connection drops (on Ubuntu)

A very common concern among VPN users is that processes will switch to the insecure connection when the VPN drops.

Before talking about the solution(s), be aware that VPN connections do drop and will drop - so this problem needs to be tackled, independently of the provider.

I personally endorse the privateinternetaccess provider. Of the three I've tested (the others being BTGuard and TorrentPrivacy), it's been the only one with a working customer support. Other providers just don't have it, or don't reply to the support requests.
Moreover, the company releases an application, on Windows machines, which automatically stops the internet connection when the VPN connection drops.

On a general basis, it's possible to write some scripts on Ubuntu, which solve the problem.

The concept is very simple. In Ubuntu, we can write callbacks which are executed when a given connection drops. At the same time, we can use a background script which notices this and acts accordingly. We're using this structure (callback/listener) because there is a non-trivial problem to solve otherwise, caused by the fact that the root user doesn't have direct access to the VPN password stored by the user.

First script to add (give executable permissions): /etc/NetworkManager/dispatcher.d/90vpnhandletransmission

#!/bin/bash

SIGNAL_FILE=/tmp/start_vpn_operations.tmp
APP_NAME=firefox                                   # app to start/stop
DESKTOP_USER=username                              # name of the user!

if [ "$1" == "tun0" -a "$2" == 'vpn-down' ]
then
  logger -s "NM Script vpn-down triggered"

  pkill -f $APP_NAME

  sudo -u $DESKTOP_USER touch "$SIGNAL_FILE"
fi
The second script to add may reside anywhere. It's a ruby script, so one needs a ruby interpreter (tested on 1.9). Just save it and give executable permissions. There are two ways of operating:
  • Execute the script without options, and leave it running; manually start the VPN and launch the application
  • Execute the script with the '-f' option; it will automatically start the VPN and launch the application
#!/usr/bin/env ruby

require 'fileutils'

SIGNAL_FILE = '/tmp/start_vpn_operations.tmp'
VPN_NAME    = 'Privateinternetaccess'              # this is the name of the VPN connection as created by the user
APP_NAME    = 'firefox'

case ARGV[ 0 ]
when '-f'
  FileUtils.touch( SIGNAL_FILE )
when nil
else
  puts "Usage: #{ $0 } [-f]"
  puts "  [f]orce start"
  exit
end

while true
  if File.exists?( SIGNAL_FILE )
    vpn_connection_started = system( "nmcli con up id '#{ VPN_NAME }'" )

    exit if ! vpn_connection_started

    FileUtils.rm_f SIGNAL_FILE

    fork { 
      `#{ APP_NAME } > /dev/null 2>&1`
    }
  else
    sleep 1
  end
end

Saturday, November 12, 2011

Jungledisk review: a rambling piece of junk

So, I've definitively switched over from Jungledisk to SpiderOak - I can't say the latter is a well-written backup application, but at least it works.

In order to justify the definition of "Rambling piece of junk", here is the overview both of the problems encountered and the lack of professionalism in the development.

Application problems:
- The dialog for choosing what to backup is broken for Natty. In addition to being broken, once it's opened, it will make the JD interface unusable until the next restart.
- Syncing of files with accented characters is broken.
- Syncing of directories with accented characters is broken.
- Because of a bug in the syncing, under some, not rare, conditions, JD will delete files in the sync folders.
- Big files can't be shared, because connection errors will cause the upload to fail. Note that this function works perfectly in Dropbox.
- Internet connection detection doesn't work well. Sometimes JD doesn't detect it (even if the connection works perfectly), so that the program can't be used (for a short time).
- Sometimes JD doesn't connect to the service, so that the program can't be used.
- I can't copy a specific file (video, ~600M) to the remote folder.

Development:
- Until version 3.16, the option 'Backup as soon as possible when backup time is missed' didn't work; this is a core option for backup applications.
- In the timespan between the releases 3.14 and 3.16, which lasted several months, the only things done have been:
- introducing a release with a very serious issue (3.15), which has been been retired after a short time
- "fixing 5 bugs" (none of the above, which still stand) and "addressing two issues".
- At the date of today (November 2011), it's still 6 months that no updates have been released after version 3.16.

You can judge by yourself.

Monday, April 25, 2011

Setting up Voipstunt (and similar) on Linux

I've been spending some time trying all the softphone solutions I could find around, in order to use Voipstunt on Ubuntu.

Most of them were either:
- not working, properly or at all
- had a horrible interface

Ekiga is in the first category; I couldn't make more than one phone call per application run.
Linphone is in both categories.
I tried others that I don't remember.

At the end I found two working ones:
- Qutecom
- Twinkle.

Twinkle has a clunky and outdated interface, with at least one serious bug (segfault when trying to delete one contact). It's simple to configure, though.

Qutecom has a modern interface, and it works reasonably well.
I again found a bug, but minor - if I try to close the application without hanging up a call, it hangs.

At the end, I chose Qutecom.

For people using Qutecom and Voipstunt, the only parameter to configure (aside the obvious login/password) is "sip.voipstunt.com" as SIP Domain/Realm.
Voipbuster, from the same phone company, uses most probably "sip.voipbuster.com".

The package is in the main Ubuntu repository, so users can install it using the GUI application or command line.
login:

Monday, March 28, 2011

Jungledisk deletes your data

Yes, the title is correct. There is a bug in the Jungledisk sync which, in not uncommon conditions, will delete your synchronised data across all the computers.

Specifically, if a machine is downloading the data of a synced folder, and you shut down the machine, on the following startup, JD will think that the data not downloaded has been deleted, and proceed to delete it on the servers, which in cascade, will delete it also on your other synced machines.

This of course make the Jungledisk sync unusable - I'm not going to trust code which deletes my data.

You can still go through past backup, but that's very uncomfortable.

In addition to that, JD sync is remarkably poorly coded:
- it has a very long lag, taking long time before detecting changes.
a real use cases is the one where you made a modification to your data, then turn your computer off. while competitors start the sync upload immediately (e.g. DropBox), JD won't, so either you wait minutes doing nothing in front of the computer, or you can forget your syncing. what also happens, is that you may forget to wait, and change the data on another client - you will have to solve the conflicts when you turn your first machine on.
- it has two separate bugs related to non-ASCII characters. one bug is on the folders, and another one on the files; both cases will cause your sync on the folders/files to fail.

All in all, JD's syncing has always been very poor, while being an important part of the application.

Files deletion support request: http://support.jungledisk.com/requests/55573.
Folder syncing support request: http://support.jungledisk.com/requests/50416

At this point I'm really annoyed by filing bugs, so I didn't file the bug for non-ASCII files.

I'm trying SpiderOak now, and if it works well, I won't hesitate a moment before swithing.

Tuesday, December 28, 2010

Short review: Dell Inspiron Duo

I got the laptop a few days ago. Overall, it's a mixed experience.

Ubuntu compatibility

The touch screen has problems with a clean install of Ubuntu NE 10.10. Some (private) people is working on it - informations here.
Also the function keys have a very annoying problem.

Screen

Disappointing. Although it's "usable" (keeping in mind that as long as one sees something on a screen, it is "usable" by definition), the vertical range is very limited. This prevents the screen to be used in portrait mode, because the right part is darker than the left one, unless you keep the left farther than the right when you read.
10 inches are also a bit narrow, although this is a subjective opinion.

As a matter of fact, when I use it to read on the bed, I use it in landscape mode.

CPU

The N550 Atom platform is not slow itself. On a clean Windows 7 I felt it as responsive and didn't experience lag during regular desktop usage.

The Ubuntu NE 10.10 [Desktop interface] as system instead is slow and unresponsive, although usable.
Always speaking about Ubuntu, the applications theirselves are fast enough - for example I tried some 480p videos in youtube and they were smooth; same thing for common applications like OpenOffice. Firefox is acceptably fast using a few tabs, but no more than around 4.

So it all boils down to the O/S: I would recommend it for Windows users, but absolutely not for linux ones.
Some reviews around describe the machine as slow on Windows 7; keep in mind that they always refer to the pre-installed Windows 7, which I believe is full of junk and, certainly, has a terribly programmed custom interface.

Construction

The construction is cheap.
The fan is noisy.
The lid around the screen is a bit too thick.
If you're used to SSD disks, you will feel the disk rotation.

The weight is reasonable for a hybrid laptop (~1.5 kg): light if compared to full tablet pcs, heavy if compared to tablets.
Objectively speaking, the laptop is a bit heavy for "demanding tablet usages" (ie. bed reading), but I got used to.

I feel that the lid however is robust enough not to break with the usage.
The keyboard is pleasant.

Overall

The laptop makes sense for what is being sold, that is, a cheap tablet with the premium price of an innovation.

I just noticed that Asus is going to produce the Eee Pad EP121, which according to this page, compared to the Inspiron weighs around 70% of it, it has a bigger screen, a more powerful CPU, and an SSD disk. Essentially, price aside, it wins hands off.

I specifically purchased it because I needed a "powerful" tablet without spending too much. Wrapping up, I got what I wanted - it may satisfy your use cases as well.
If the Asus Eee Pad EP121 would have been out though, I would have chosen the latter.