Resolving network connection issues on Linux Mint (Ubuntu)

So several years after purchasing my smallest form-factor netbook Aspire One I have stumbled upon issue that I couldn’t explain myself. Hopefully this would help somebody and save time it took me to figure out.

Background

The Aspire One was the only netbook with descent (2GB RAM at that time) amount of memory and Linux installation out of box (=minimal support guaranteed). I have used for some time, but than gave up for a while since keyboard proved to be a bit too cramped for my palms and fingers, so extensive use caused some pain. Still it is a nice little piece of hardware that is easy to transport, not expensive (meaning if gets stolen or broken I won’t cry over it :)) and, finally, it is a full-fledged Linux-powered thing with real (althoguh small) keyboard large enough hard disk to host my music collection. All in all, after some time I decided to give it a try.

Continue reading “Resolving network connection issues on Linux Mint (Ubuntu)”

Manipulating files with @ sign in a subversion repository

Apparently it was a while ago since I had troubles with infrastructure :), but this time it took too long to leave it unnoticed. Quite some time ago I have created several files in the subversion repository with the ‘|’ character in them, which gave problems checking them out on a Windows… ehm… box (if you can call Surface a box :)).

Continue reading “Manipulating files with @ sign in a subversion repository”

Syntax highlight in vim

Although not being addicted to vim I do happen to use it on a regular basis as it is available on virtually all environments I do meaningful work with :). To get it a bit fancier you can add the following to your ~/.vimrc.

vim python coloring

syntax enable
set background=dark
colorscheme solarized 
set tabstop=4 
set shiftwidth=4 
set expandtab

Download and copy corresponding theme like solarized.vim to ~/.vim/colors

:wq

Small update
If you get annoying A/B/C/D characters when pressing arrow buttons either change .vimrc to get

set nocp

or type it in the vim prompt

:set nocp

Enjoy!

Upgrade Ubuntu server with boot partition full

At certain point my small silent server needed an extra package, but running apt-get only gave me errors. Digging further I found that my /boot partition (default Ubuntu server setup) was running out of disk space. After manually deleting old versions of images I finally got space, but that didn’t fix broken packages, e.g.:

$ sudo apt-get -f install
dpkg: dependency problems prevent configuration of linux-server:
linux-server depends on linux-image-server (= 3.2.0.53.63); however:
Version of linux-image-server on system is 3.2.0.58.69.
linux-server depends on linux-headers-server (= 3.2.0.53.63); however:
Version of linux-headers-server on system is 3.2.0.58.69.
dpkg: error processing linux-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

The only fix I have found was downloading and installing the missing package manually:

$ wget https://launchpad.net/ubuntu/+archive/primary/+files/linux-server_3.2.0.58.69_amd64.deb
$ sudo dpkg -i linux-server_3.2.0.58.69_amd64.deb

Enjoy!

(Re-)configuring Apache SSL on Ubuntu server

Since my old server died there were many things waiting to happen. First of all the main ‘carrier’ for my project information was located on a webserver obviously hosted on the dead server. For security reasons it only serves HTTPS, so, guess what, I needed to setup it up again.
The very first thing I found that my SSL certificates were no longer valid as the key used to generate them was happily buried on (both) dead hard disks. Arrrgghhh. OK, luckily it takes only few mouse clicks on GoDaddy site to re-generate the certificates. You perform

openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr

on the server where the domain is to be hosted (in my case my smallish-greenish server) and copy/paste the content of the .csr file to the GoDaddy’s interface. Viola! You can download your certificates now and put them under e.g. the corresponding VirtualHost:


SSLEngine on
SSLCertificateFile /etc/apache2/certificates/watchitforme/watchitfor.me.crt
SSLCertificateKeyFile /etc/apache2/certificates/watchitforme/watchitfor.me.key
SSLCertificateChainFile /etc/apache2/certificates/watchitforme/gd_bundle.crt
ServerSignature Off

Good. Restart Apache using e.g.

sudo /etc/init.d/apache2 restart

…browse to your https://domain.tld and WTF-WTF-WTF…

Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.

Watta… well, this is something new apparently, but you are also required to edit the Apache ports.conf file, and add

Listen 443
NameVirtualHost *:443

and then in your virtual host setup you need to say instead of

<VirtualHost domain.tld:443>

put

<VirtualHost *:443>

Restart Apache again and you get your pages nicely served through HTTPS. C’mon, why so much trouble each time?..

p.s. There are a lot of posts about Chrome, IE, etc settings, but check the root cause first!

FreeBSD vs Ubuntu server

Some frustration from installing FreeBSD on a Foxconn A3550 with a Realtek 8168B/8111 card and Ubuntu saving my day (again).

After a pretty sad death of both harddisks in RAID1 setup on my old server that was sucking a lot of electricity and making pretty annoying level of noise for several years (don’t ask when the last backup was performed) I was obviously up to another setup. This time I decided to go for a ‘greenish’ setup without unnecessary redundancy and splitting the concerns of large storage and running all kinds of things like Apache, MySQL, etc for private projects data.

After some small research I settled down on Foxconn nT-A3550 E-350. Dropped some 4Gb of memory and 64 Gb SDD gave me a tiny silent box that can be used to exercise all kinds of things. There was only one small thing left… Installing an OS.
Somehow I had a FreeBSD as the first candidate when thinking of a server. Previous server had a rather old Ubuntu server version, but this time I was up to something new. Except… well, one by one.

My first idea was getting recent version of FreeBSD, which is at the time of writing was 9.0. Few minutes of download, dd’ing a spare USB stick and we’re done. Installation went smooth, although I’ve only realized later that it was due to the fact that 9.0 recognized the Intel wireless card in the little Foxconn and downloaded everything using wireless connection. The problem started when I’ve tried to setup wired connection (preferred for stability, as wireless may drop once in a while). Well, there was no luck for two sleepless nights and a lot of digesting of forums. I’ve tried many things and narrowed the problem down to the driver of the Realtek 8168B/8111 under FreeBSD. While it was recognized there was no luck in getting either DHCP acknowledgement or getting connection using static IP configuration. Symptoms: card fires up, link is detected, DCHP client tries to get IP, but does not “see” the DHCP offer from the router. Checking the logs of the router show that the offer is sent, but apparently never received/understood by the client. Apparently Realtek did release a driver version for FreeBSD 8.0 and some people claim that there was better support after 9.0 release this didn’t really help. I’ve tried the Realtek version, but it didn’t compile under 9.0 due to cleanup of the internal software interface. The version in 9.0 looked like a more advanced version apparently it didn’t work with my card. Bad luck…

Next trying FreeBSD 8.3 The idea was that the drivers are further developed since the 9.0 release. Well, I haven’t even got to the drivers. The Intel wireless card was not recognized and the wired Realtek still didn’t work with the same symptoms. That was it for FreeBSD.

And then Ubuntu (12.01 LTS server to be specific). Creating a bootable USB stick involved just another conversion step (from .iso to .img) as nicely described on the Ubuntu site and off we go. Guess what, the installation went smooth and all hardware detected at once. About 30 minutes later I had a fully functioning system with the software installed. So after all I am back to Ubuntu again.

Second though on FreeBSD. I may give it a chance later on when 9.1 comes out. Having manually built driver that relies on a (apparently deprecated) interface just asks for a trouble with the next update (which may be needed due to e.g. security reasons).