Mobile internet broadband in Latvia

When I travel abroad I need to stay connected to the Internet, not just for fun but I have to be connected for my work. Relying only on Wifi is not a solution as I recently discovered the hard way on a trip to France. The Hotel advertised "WiFi internet" but this however, turned out to be a connection limited to only web and mail (all traffic forced through a proxy). I needed VPN to work.

The most convenient and cost effective solution is to purchase a prepaid mobile broadband from a local provider. That way I will have 3G Internet connection during my stay.

To not be forced to buy a USB modem with every prepaid mobile Internet, I purchased a Huawei E585 3G/WiFi pocket router which is not SIM locked (works with any provider). This little thing has a battery that last for a couple of hours and I only need to buy prepaid SIM-cards in the countries I visit.

I went on a trip to Latvia and my choice fell on Okarte Internet via computer. They are covering 92% of Latvia for the moment.

There are two choises – a SIM card bundled with a USB modem for Ls 9 or just the SIM card for Ls 4. It includes one week of surf (up to 50 GB) and can then be refilled. According to Okarte’s website it could be purchased on many sales points, for example Narvesen or Plus Punkt kiosks.

The first store I stopped by could only sell refills. The second store didn’t have the SIM card only so I actually bought the package with a USB modem for Ls 9, figuring Ls 5 was a cheap price for not having to run around more stores. The modem was never used, instead I put the SIM card in my pocket router.

Even though Okarte’s website is in Latvian, Russian and English nothing in the package speaks any English, only Latvian and Russian which is of little help for me.

The major problem I encountered was that there was no technical information in the package, especially regarding APN which is crucial. I looked at my network manager in Ubuntu which actually has preconfigured choises for Okarte and found out that the APN is open.lmt.lv.

With this APN set I could surf away from my resort location in Jurmala enjoying download speed at around 4-7 Mbps and upload 0,45-1 Mbps.

 

Copy large amounts of data between servers

There are several methods of moving data between servers in a UNIX/Linux/BSD environment, for example scp, ftp, SMB-shares, NFS-shares or rsync. My experience is that using netcat is one of the faster methods if you have large amount of data to copy.

On the receiving server:

cd /  (or the base directory under which you want to recieve the data)
nc -l 1234 | tar -zxvf -

This will make netcat listen on port 1234 (don’t forget to open the port in the firewall and/or iptables).

On the transmitting server:

tar -zcvf - /data/ | nc -q 1 targethostname 1234  (replace /data/ with the folder you want to copy and targethostname with the hostname or IP-address of the receiving server)

If you have more bandwidth than computing power (i.e. a slow machine) you might want to consider to leave out the "z" in the tar commands on both sides and transfer the data uncompressed.

If you need to move data between physical locations – never underestimate the bandwith of a car loaded with harddisks (quote from a former collegue :)).

 

Ubuntu boot hangs with black screen and blinking cursor

If this happens, check your BIOS setup device boot order. It is possible that some device has been listed before your real boot device.

In my case, my boot SSD drives had been moved below ALL PCI SCSI and there are other drives in the machine which are not bootable causing this problem for me.

 

BIOS setup device boot order

BIOS setup device boot order

Ubuntu boot hangs with black screen after GRUB

It might actually not be hanged, but instead but you might have been kicked into an initramfs shell but it is not displaying on the screen. 

Try to boot in recovery mode or boot on a install CD or USB stick in rescue mode. Edit /etc/default/grub: 

vi /etc/default/grub

Set the following: 

GRUB_TERMINAL=console
GRUB_GFXPAYLOAD_LINUX=text 

If the GRUB timeout is very short it might be a good idea to set it a bit higher so you have a chance to make a selection: 

GRUB_TIMEOUT=10

Save and then execute: 

update-grub

Then reboot the machine and now you may see the emergency shell you are kicked into. Now you can investigate your boot problems further.