Linux User Group of Mauritius Promoting open source software in our beautiful island

18Apr/140

Ubuntu 14.04 LTS, a first impression

Posted by Ish

Ubuntu 14.04 LTS was released yesterday, 17 April 2014. This falls well with perfect timing for LUGM’s event, the Corsair Hackers Reboot. I did not wait much & downloaded the 64-bit image for a trial & to check new features.

ubuntu-14.04-installInstallation was seamlessly easy as usual. On my Acer Aspire 4741 notebook it took the usual 15 mins. Booting up was fast & furious. Improvement? We could say it, though Ubuntu wasn’t known to be slow at boot-ups.

I shot open a few applications & the noticeable improvement to Unity was the menu embedded in the window’s title bar instead of the top-menu-bar. It’s better than what it was previously but not yet the best improvement of Unity. For example, on a re-sized window the close button is shown on the top-right corner of the windows, however, when maximized the button is moved to the left side of the top-menu-bar. To a regular Ubuntu user this might not be a glitch but to someone who just migrated, this could be an awful experience. I have myself several times closed the wrong window by misinterpreting the left & right close buttons.

ubuntu-14.04-window-menu

Menu embedded in window's title bar

The next thing that should catch the eye is the awful invasion of privacy while using Unity Dash search. I would not want online suggestions when searching for an installed application. It’s a pity to see this thing enabled by default. To disable the online suggestion feature, go to Settings > Security & Privacy and under the Search tab simply turn off “Include online search results” feature. To further fine-tune the search results you may also disable a couple of other stuffs under the Files & Applications tab.

ubuntu-14.04-settings

Click the yellow icon (:

ubuntu-14.04-turn-off-online-search-results

Turning off the online suggestion feature

ubuntu-14.04-fine-tune-search

Fine-tuning search results

Lastly, I updated the software repos & installed my favorite applications. To get 3rd-party software, Canonical Partners repos must be enabled. It’s disabled by default. To enable the same go to Settings > Software & Updates, under the Other Software tab select Canonical Partners. Doing so, software like Skype can be downloaded & installed directly through Ubuntu Software Center or through command line.

One tip though, while installing the usual tons of applications don’t look for acroread. Adobe Reader 9.x has reached end-of-life and thus been removed from the repositories. So far Adobe hasn’t found it necessary/wise to release the latest version for the growing Linux community. Nevertheless, Evince remains a nice piece of software for viewing PDF files.

Tagged as: No Comments
31Mar/140

Corsair Hackers Reboot, demo preps

Posted by Ish

We’re approximately 3 weeks away from the Corsair Hackers Reboot. On my end I have so much in the pool. Yup, I know I’ll be hopping around with almost every team that will be cheering for FOSS that day, however, I’ve chosen to dedicate most of my time to the Demo and Talks sections. For the latter I’m yet to come up with some interesting topics. As for the demo, ahaaan … It’s being arranged full-fledged. I’m assuring that no wish shall remain un-fulfilled that day. In my software repository, the following distributions will be made available :

- Arch Linux
- CentOS (32Bit & 64Bit)
- Debian 7.4 (64Bit Full DVD set)
- elementary OS (32Bit & 64Bit)
- Fedora 20 (GNOME, 32Bit & 64Bit)
- Gentoo (32Bit & 64Bit)
- Kali Linux (32Bit & 64Bit)
- Linux Mint (Cinnamon, Mate, Debian Edition, 32Bit & 64Bit)
- Mageia 4 (Full, 64Bit)
- Manjaro Linux (XFCE, OpenBox, 32Bit & 64Bit)
- openSUSE 13.1 (Full, 32Bit & 64Bit)
- PCLinuxOS (KDE, 64Bit)
- Slackware 14.1 (32 Bit & 64Bit)
- Slax 7.0 (32Bit & 64Bit)
- Ubuntu Desktop/Server 12.04/13.10 (32Bit & 64Bit)

linux-distros

... among others!

I can’t guarantee that all the distributions will be running/demo’ed on physical machines but they will nevertheless be freely available to all. You may copy it, burn it & try on your own laptop. We may of course help you in case there are any hiccups booting it up. CD/DVD burning on our end might be difficult, so I’ll suggest folks to bring a pendrive instead if you want a Live Linux. As for those who wish to have their machine Tux’ed (ahaan, that sounds like a nice name for a Linux powered machine), we will handle the installation part. We have set up an Installfest Team dedicated at installing Linux distros (of your choice). We do have a backup mechanism to ensure that your data are safe, however we cannot take full responsibility if something goes wrong. So, if you’re bringing your machine for a Linux installation, you could do a backup on your end too.

nix-pack-1Any other operating system apart from Linux? Yup, indeed, for the more geekies I’m bringing Minix, Debian Hurd, OpenBSD, FreeBSD and NetBSD.

Computer Science students might be interested to have a look at Minix, an open source operating system by Prof. Andrew Tanenbaum. Minix was in fact the inspirational platform for Linus Torvalds to start coding the Linux kernel back in the early 90′s.

Hurd on the other hand is the iconic operating system by the Free Software Foundation. GNU Hurd was expected to be the kernel for the free GNU Operating System. However, development & design of the microkernel has been slow and Linux on the other hand prospered. Linux therefore became the prime choice of kernel.

BSD needs no introduction here ( :

What about Windows users?

Since the event is about promoting FOSS in general, we’re not limiting ourself to operating systems. Our software repository will contain free & open source applications for Microsoft Windows as well. So far my pool has the latest versions of Firefox, Google Chrome, FileZilla, FreeCAD, GIMP, Inkscape, Notepad++, VirtualBox, VLC, LibreOffice, Abiword, ClamWin, Audacity, GanttPV, GnuCash, X-Chat and NASA World Wind.

I’m all set for an awesome FOSS party on Saturday 19th April 2014. Are you?

Tagged as: No Comments
24Mar/140

Linux User Group Meta, Annual General Meeting – 12/04/14 12hr @ Lambic

Posted by Selven

Members,

This is to inform you that we shall have our Annual General Meeting held on the 12th of April 2014 at 12hr to 15hr.

Venue: Lambic Conference Room, 4 St. George Street Port louis

Map:
location-plan-black-big
Agenda:
            1. Reading and Approval of Annual Report by Secretary
            2. Reading of Financial Reports by Treasurer.
            3. President's speech
            3. Payment of membership fees.
            5. AOB
            4. Election of new board members.
ps. Venue is already booked so we cannot cancel this.
pps. A further meeting for executive members to perform handing over, and for executive members to elect office bearers among themselves will be held 3 weeks after this meeting.
ppps: This meeting is Members ONLY.
Sincerely,
Pirabarlen Cheenaramen (Selven)

Secretary of the Linux User Group Meta.

Filed under: Uncategorized No Comments
19Mar/140

Fixing Bittorrent clients crashing on Ubuntu

Posted by Avinash Meetoo

20140319-bittorrent

There are many Bittorrent client in Linux and, under Ubuntu (and this is surely true for other Linux distributions too), most of them depend on a library called libtorrent.

Under Ubuntu 12.04 LTS, libtorrent is buggy and causes Bittorrent clients to crash on a regular basis. The solution is, of course, to upgrade libtorrent from 0.15 to its latest version 0.16. The way to do that is to add the ppa:surfernsk/internet-software PPA and upgrade the whole system:

sudo add-apt-repository ppa:surfernsk/internet-software

sudo apt-get update

sudo apt-get upgrade

Doing that upgrades python-libtorrent to 0.16 and installs libtorrent-rasterbar7. Removing libtorrent-rasterbar6 (which is not needed anymore) is simply a

sudo aptitude remove libtorrent-rasterbar6

Since doing that, Deluge, the Bittorrent client I use, hasn’t crashed at all. Life is cool.

(Solution obtained in the Deluge forum)

16Mar/140

LUGM meetup, Software Licensing

Posted by Ish

Many times on LUGM facebook group we had fierce debates over GPL and BSD-license. Flame-wars sprouted very often, some times even from an innocent status we might have put. Therefore a few weeks ago it was decided that we have a meetup that will ensure clarifying misconceptions regarding software licenses. The date was announced to be 15th March 2014 at the convenience of everybody. Selven & Logan were to talk about Lesser Restrictive Licenses in particular the BSD-license and Ajay volunteered to share his knowledge about the General Public License (GPL), in particular GPLv2.

ebene-acceleratorThe day comes and I reach Ebène around 11h45. While the meetup itself should start at 13h00, I had enough of time ahead to have lunch & chat with UoM Computer Club folks I happened to meet at Ebène InterMart Foodcourt. Around 12h45 I went to Ebène Accelerator where the meetup was hosted. Ronny had reached by that time too, having a cigarette puff in the parking lot. He greeted me & asked about my phone as it seemed Ajay was calling me and I didn’t answer. I checked and yes, I could see the missed-calls from Nadim, Ajay and Ronny. We went inside the Orange Tower. Nitin had reached too. I explained Ronny a little bit about the concept of Ebène Accelerator as a business incubator. We then went to get the meeting room ready. A short while later others came.

Who showed up?

Nitin Mutkawoa, Ronny Reddi, Ajay Ramjatan, Avinash Meetoo, Pravesh Gaonjur, Selven Cheenaramen, Nalinee Rengenchetty, Sherven Chinamoothoo, Yunus Aumeeruddy, Ibraahim Atchia, Saamiyah Peerun, Ubeid Jamal Ahmad, Nadim Attari Bundhoo, Kishan Bhugul, Loganaden Velvindron, A. Jodarsen (Chelon), Pritvi Jheengut and Ish Sookun.

lugm-meetup-software-licensing-6

lugm-meetup-software-licensing-1

Since we didn’t have a projector, which I assumed we would as there always is one at Ebène Accelerator, Selven & Logan tried to arrange for the same. In the meantime Ajay opened discussion about Corsair Hackers Reboot. He went through the tasklist I published on the 1-week brainstorming event I created on facebook. We described the event’s structure & aim, especially to those who didn’t attend earlier meetups and wanted clarifications. Corsair Hackers Reboot was initially proposed by Pritvi while I suggested we have a Linux Installfest beginning 2014. We then blended both and kept the name Corsair Hackers Reboot. The idea behind the event is to introduce hacking (as in White Hat), that’s why the term Corsair is used. Secondly, with support ending for Windows XP we aimed to propose Linux distros and BSD as alternatives, therefore the term reboot is used.

We finalised the date of the event to be 19th April 2014 and divided tasks in four categories :

  • Hacking competition
  • Installation festival
  • Demos
  • Mini talks

I will draft the same and share on the 1-week brainstorming event page.

After this first dicussion, Selven & Logan brought the projector. They set up everything. Unfortunately some folks had to leave early. The rest of us were eager for the licensing talk. It started with Selven’s presentation on Lesser Restrictive Licenses. He went through his slides and gave us an overview of the MIT, Apache and BSD licenses. He laid emphasis mostly on the different versions of BSD licenses, explained the clauses in simple terms and elaborated on the use and inclusion in our code. While going through each license, Selven listed software that are released under those licenses. He stressed much on the simplicity and clarity of the BSD license, to which most of us agreed.

lugm-meetup-software-licensing-7

Selven talking about MIT license

Logan on the other hand presented the Legal Risks of FSF Licenses. His presentation was mainly on the ambiguity of FSF licenses, in particular GPLv3. He quoted the words of various developers and cited cases that involved different interpretations of the GPL clauses.

lugm-meetup-software-licensing-8

Logan talking about legal risks with FSF licenses

At this moment everyone in the audience was involved with questions and especially Ajay with GPL clarifications. We agreed on the fact that GPLv3 is complicated and might not be suitable to a real world. However, GPLv2 seems to be fine so far. No wonder why many stayed on GPLv2. At some point it came to my mind that the Free Software Foundation tried addressing too much through one license, ending up making it complicated. Weeks ago when the discussions started, that was when I peeked into a few clauses of GPLv3 and wrote about Tivoization.

While meetup seemed like never-to-end we had to stop the discussion some time after 16h30. Nadim had done a great job shooting the whole discussion. I copied the video files on my laptop. Ahaan … You guessed right! If you have missed the meetup, you can still watch the whole Software Licensing discussion in the following videos:

I thank everyone for attending the meetup and participating in the discussions. Thanks to Ronny for some of the snaps and Nadim for video-shooting.
16Mar/140

Accessing your web server via IPv6

Posted by Jochen Kirstaetter

Being able to run your systems on IPv6, have automatic address assignment and the ability to resolve host names are the necessary building blocks in your IPv6 network infrastructure. Now, that everything is in place it is about time that we are going to enable another service to respond to IPv6 requests. The following article will guide through the steps on how to enable Apache2 httpd to listen and respond to incoming IPv6 requests.

This is the fourth article in a series on IPv6 configuration:

Piece of advice: This is based on my findings on the internet while reading other people's helpful articles and going through a couple of man-pages on my local system.

Surfing the web - IPv6 style

Enabling IPv6 connections in Apache 2 is fairly simply. But first let's check whether your system has a running instance of Apache2 or not. You can check this like so:

$ service apache2 status
Apache2 is running (pid 2680).

In case that you got a 'service unknown' you have to install Apache to proceed with the following steps:

$ sudo apt-get install apache2

Out of the box, Apache binds to all your available network interfaces and listens to TCP port 80. To check this, run the following command:

$ sudo netstat -lnptu | grep "apache2\W*$"
tcp6       0      0 :::80                   :::*                    LISTEN      28306/apache2

In this case Apache2 is already binding to IPv6 (and implicitly to IPv4). If you only got a tcp output, then your HTTPd is not yet IPv6 enabled.

Check your Listen directive, depending on your system this might be in a different location than the default in Ubuntu.

$ sudo nano /etc/apache2/ports.conf

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

Just in case that you don't have a ports.conf file, look for it like so:

$ cd /etc/apache2/
$ fgrep -r -i 'listen' ./*

And modify the related file instead of the ports.conf. Which most probably might be either apache2.conf or httpd.conf anyways.

Okay, please bear in mind that Apache can only bind once on the same interface and port. So, eventually, you might be interested to add another port which explicitly listens to IPv6 only. In that case, you would add the following in your configuration file:

Listen 80
Listen [2001:db8:bad:a55::2]:8080

But this is completely optional... Anyways, just to complete all steps, you save the file, and then check the syntax like so:

$ sudo apache2ctl configtest
Syntax OK

Ok, now let's apply the modifications to our running Apache2 instances:

$ sudo service apache2 reload
 * Reloading web server config apache2
   ...done.

$ sudo netstat -lnptu | grep "apache2\W*$"                                                                                              
tcp6       0      0 2001:db8:bad:a55:::8080 :::*                    LISTEN      5922/apache2   
tcp6       0      0 :::80                   :::*                    LISTEN      5922/apache2

There we have two daemons running and listening to different TCP ports.

Now, that the basics are in place, it's time to prepare any website to respond to incoming requests on the IPv6 address. Open up any configuration file you have below your sites-enabled folder.

$ ls -al /etc/apache2/sites-enabled/
...

$ sudo nano /etc/apache2/sites-enabled/000-default

<VirtualHost *:80 [2001:db8:bad:a55::2]:8080>
        ServerAdmin webmaster@ios.mu
        ServerName server.ios.mu
        ServerAlias server

Here, we have to check and modify the VirtualHost directive and enable it to respond to the IPv6 address and port our web server is listening to. Save your changes, run the configuration test and reload Apache2 in order to apply your modifications. After successful steps you can launch your favourite browser and navigate to your IPv6 enabled web server.

Accessing an IPv6 address in the browser
Accessing an IPv6 address in the browser

That looks like a successful surgery to me...

Note: In case that you received a timeout, check whether your client is operating on IPv6, too.

Tagged as: No Comments
12Mar/140

Enabling DNS for IPv6 infrastructure

Posted by Jochen Kirstaetter

After successful automatic distribution of IPv6 address information via DHCPv6 in your local network it might be time to start offering some more services. Usually, we would use host names in order to communicate with other machines instead of their bare IPv6 addresses. During the following paragraphs we are going to enable our own DNS name server with IPv6 address resolving.

This is the third article in a series on IPv6 configuration:

Piece of advice: This is based on my findings on the internet while reading other people's helpful articles and going through a couple of man-pages on my local system.

What's your name and your IPv6 address?

$ sudo service bind9 status
 * bind9 is running

If the service is not recognised, you have to install it first on your system. This is done very easy and quickly like so:

$ sudo apt-get install bind9

Once again, there is no specialised package for IPv6. Just the regular application is good to go.

But of course, it is necessary to enable IPv6 binding in the options. Let's fire up a text editor and modify the configuration file.

$ sudo nano /etc/bind/named.conf.options

acl iosnet {
        127.0.0.1;
        192.168.1.0/24;
        ::1/128;
        2001:db8:bad:a55::/64;
};

listen-on { iosnet; };
listen-on-v6 { any; };

allow-query { iosnet; };
allow-transfer { iosnet; };

Most important directive is the listen-on-v6. This will enable your named to bind to your IPv6 addresses specified on your system. Easiest is to specify any as value, and named will bind to all available IPv6 addresses during start. More details and explanations are found in the man-pages of named.conf.

Save the file and restart the named service. As usual, check your log files and correct your configuration in case of any logged error messages. Using the netstat command you can validate whether the service is running and to which IP and IPv6 addresses it is bound to, like so:

$ sudo service bind9 restart

$ sudo netstat -lnptu | grep "named\W*$"
tcp        0      0 192.168.1.2:53        0.0.0.0:*               LISTEN      1734/named     
tcp        0      0 127.0.0.1:53          0.0.0.0:*               LISTEN      1734/named     
tcp6       0      0 :::53                 :::*                    LISTEN      1734/named     
udp        0      0 192.168.1.2:53        0.0.0.0:*                           1734/named     
udp        0      0 127.0.0.1:53          0.0.0.0:*                           1734/named     
udp6       0      0 :::53                 :::*                                1734/named 

 Sweet! Okay, now it's about time to resolve host names and their assigned IPv6 addresses using our own DNS name server.

$ host -t aaaa www.6bone.net 2001:db8:bad:a55::2
Using domain server:
Name: 2001:db8:bad:a55::2
Address: 2001:db8:bad:a55::2#53
Aliases:

www.6bone.net is an alias for 6bone.net.
6bone.net has IPv6 address 2001:5c0:1000:10::2

Alright, our newly configured BIND named is fully operational.

Eventually, you might be more familiar with the dig command. Here is the same kind of IPv6 host name resolve but it will provide more details about that particular host as well as the domain in general.

$ dig @2001:db8:bad:a55::2 www.6bone.net. AAAA

More details on the Berkeley Internet Name Domain (bind) daemon and IPv6 are available in Chapter 22.1 of Peter Bieringer's HOWTO on IPv6.

Setting up your own DNS zone

Now, that we have an operational named in place, it's about time to implement and configure our own host names and IPv6 address resolving. The general approach is to create your own zone database below the bind folder and to add AAAA records for your hosts. In order to achieve this, we have to define the zone first in the configuration file named.conf.local.

$ sudo nano /etc/bind/named.conf.local

//
// Do any local configuration here
//
zone "ios.mu" {
        type master;
        file "/etc/bind/zones/db.ios.mu";
};

Here we specify the location of our zone database file. Next, we are going to create it and add our host names, our IP and our IPv6 addresses.

$ sudo nano /etc/bind/zones/db.ios.mu

$ORIGIN .
$TTL 259200     ; 3 days
ios.mu                  IN SOA  ios.mu. hostmaster.ios.mu. (
                                2014031101 ; serial
                                28800      ; refresh (8 hours)
                                7200       ; retry (2 hours)
                                604800     ; expire (1 week)
                                86400      ; minimum (1 day)
                                )
                        NS      server.ios.mu.
$ORIGIN ios.mu.
server                  A       192.168.1.2
server                  AAAA    2001:db8:bad:a55::2
client1                 A       192.168.1.3
client1                 AAAA    2001:db8:bad:a55::3
client2                 A       192.168.1.4
client2                 AAAA    2001:db8:bad:a55::4

With a couple of machines in place, it's time to reload that new configuration.

Note: Each time you are going to change your zone databases you have to modify the serial information, too. Named loads the plain text zone definitions and converts them into an internal, indexed binary format to improve lookup performance. If you forget to change your serial then named will not use the new records from the text file but the indexed ones. Or you have to flush the index and force a reload of the zone.

This can be done easily by either restarting the named:

$ sudo service bind9 restart

or by reloading the configuration file using the name server control utility - rndc:

$ sudo rndc reconfig

Check your log files for any error messages and whether the new zone database has been accepted. Next, we are going to resolve a host name trying to get its IPv6 address like so:

$ host -t aaaa server.ios.mu. 2001:db8:bad:a55::2
Using domain server:
Name: 2001:db8:bad:a55::2
Address: 2001:db8:bad:a55::2#53
Aliases:

server.ios.mu has IPv6 address 2001:db8:bad:a55::2

Looks good.

Alternatively, you could have just ping'd the system as well using the ping6 command instead of the regular ping:

$ ping6 server
PING server(2001:db8:bad:a55::2) 56 data bytes
64 bytes from 2001:db8:bad:a55::2: icmp_seq=1 ttl=64 time=0.615 ms
64 bytes from 2001:db8:bad:a55::2: icmp_seq=2 ttl=64 time=0.407 ms
^C
--- ios1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.407/0.511/0.615/0.104 ms

That also looks promising to me. How about your configuration?

Next, it might be interesting to extend the range of available services on the network. One essential service would be to have web sites at hand.

Tagged as: No Comments
11Mar/140

DHCPv6: Provide IPv6 information in your local network

Posted by Jochen Kirstaetter

Even though IPv6 might not be that important within your local network it might be good to get yourself into shape, and be able to provide some details of your infrastructure automatically to your network clients.

This is the second article in a series on IPv6 configuration:

Piece of advice: This is based on my findings on the internet while reading other people's helpful articles and going through a couple of man-pages on my local system.

IPv6 addresses for everyone (in your network)

Okay, after setting up the configuration of your local system, it might be interesting to enable all your machines in your network to use IPv6. There are two options to solve this kind of requirement... Either you're busy like a bee and you go around to configure each and every system manually, or you're more the lazy and effective type of network administrator and you prefer to work with Dynamic Host Configuration Protocol (DHCP). Obviously, I'm of the second type.

Enabling dynamic IPv6 address assignments can be done with a new or an existing instance of a DHCPd. In case of Ubuntu-based installation this might be isc-dhcp-server. The isc-dhcp-server allows address pooling for IP and IPv6 within the same package, you just have to run to independent daemons for each protocol version. First, check whether isc-dhcp-server is already installed and maybe running your machine like so:

$ service isc-dhcp-server6 status

In case, that the service is unknown, you have to install it like so:

$ sudo apt-get install isc-dhcp-server

Please bear in mind that there is no designated installation package for IPv6.

Okay, next you have to create a separate configuration file for IPv6 address pooling and network parameters called /etc/dhcp/dhcpd6.conf. This file is not automatically provided by the package, compared to IPv4. Again, use your favourite editor and put the following lines:

$ sudo nano /etc/dhcp/dhcpd6.conf

authoritative;
default-lease-time 14400;
max-lease-time 86400;
log-facility local7;
subnet6 2001:db8:bad:a55::/64 {
    option dhcp6.name-servers 2001:4860:4860::8888, 2001:4860:4860::8844;
    option dhcp6.domain-search "ios.mu";
    range6 2001:db8:bad:a55::100 2001:db8:bad:a55::199;
    range6 2001:db8:bad:a55::/64 temporary;
}

Next, save the file and start the daemon as a foreground process to see whether it is going to listen to requests or not, like so:

$ sudo /usr/sbin/dhcpd -6 -d -cf /etc/dhcp/dhcpd6.conf eth0

The parameters are explained quickly as -6 we want to run as a DHCPv6 server, -d we are sending log messages to the standard error descriptor (so you should monitor your /var/log/syslog file, too), and we explicitely want to use our newly created configuration file (-cf). You might also use the command switch -t to test the configuration file prior to running the server.

In my case, I ended up with a couple of complaints by the server, especially reporting that the necessary lease file wouldn't exist. So, ensure that the lease file for your IPv6 address assignments is present:

$ sudo touch /var/lib/dhcp/dhcpd6.leases
$ sudo chown dhcpd:dhcpd /var/lib/dhcp/dhcpd6.leases

Now, you should be good to go. Stop your foreground process and try to run the DHCPv6 server as a service on your system:

$ sudo service isc-dhcp-server6 start
isc-dhcp-server6 start/running, process 15883

Check your log file /var/log/syslog for any kind of problems. Refer to the man-pages of isc-dhcp-server and you might check out Chapter 22.6 of Peter Bieringer's IPv6 Howto. The instructions regarding DHCPv6 on the Ubuntu Wiki are not as complete as expected and it might not be as helpful as this article or Peter's HOWTO. But see for yourself.

Does the client get an IPv6 address?

Running a DHCPv6 server on your local network surely comes in handy but it has to work properly. The following paragraphs describe briefly how to check the IPv6 configuration of your clients,

Linux - ifconfig or ip command

First, you have enable IPv6 on your Linux by specifying the necessary directives in the /etc/network/interfaces file, like so:

$ sudo nano /etc/network/interfaces

iface eth1 inet6 dhcp

Note: Your network device might be eth0 - please don't just copy my configuration lines.

Then, either restart your network subsystem, or enable the device manually using the dhclient command with IPv6 switch, like so:

$ sudo dhclient -6

You would either use the ifconfig or (if installed) the ip command to check the configuration of your network device like so:

$ sudo ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:1d:09:5d:8d:98 
          inet addr:192.168.160.147  Bcast:192.168.160.255  Mask:255.255.255.0
          inet6 addr: 2001:db8:bad:a55::193/64 Scope:Global
          inet6 addr: fe80::21d:9ff:fe5d:8d98/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

Looks good, the client has an IPv6 assignment. Now, let's see whether DNS information has been provided, too.

$ less /etc/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 2001:4860:4860::8888
nameserver 2001:4860:4860::8844
nameserver 192.168.1.2
nameserver 127.0.1.1

search ios.mu

Nicely done.

Windows - netsh

Per description on TechNet the netsh is defined as following:

"Netsh is a command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a computer that is currently running. Netsh also provides a scripting feature that allows you to run a group of commands in batch mode against a specified computer. Netsh can also save a configuration script in a text file for archival purposes or to help you configure other servers."

And even though TechNet states that it applies to Windows Server (only), it is also available on Windows client operating systems, like Vista, Windows 7 and Windows 8.

In order to get or even set information related to IPv6 protocol, we have to switch the netsh interface context prior to our queries. Open a command prompt in Windows and run the following statements:

C:\Users\joki>netsh
netsh>interface ipv6
netsh interface ipv6>show interfaces
Show IPv6 network interfaces using netsh command on Windows

Select the device index from the Idx column to get more details about the IPv6 address and DNS server information (here: I'm going to use my WiFi device with device index 11), like so:

netsh interface ipv6>show address 11
Show IPv6 address information using netsh command on Windows

Okay, address information has been provided. Now, let's check the details about DNS and resolving host names:

netsh interface ipv6> show dnsservers 11
Show IPv6 DNS server configuration using netsh command on Windows

Okay, that looks good already. Our Windows client has a valid IPv6 address lease with lifetime information and details about the configured DNS servers.

Talking about DNS server...
Your clients should be able to connect to your network servers via IPv6 using hostnames instead of IPv6 addresses. Please read on about how to enable a local named with IPv6.

Tagged as: No Comments
10Mar/140

Configure IPv6 on your Linux system (Ubuntu)

Posted by Jochen Kirstaetter

After the presentation on IPv6 at the first event of the Emtel Knowledge Series and some recent discussion on social media networks with other geeks and Linux interested IT people here in Mauritius, I thought that I should give it a try (finally) and tweak my local network infrastructure. Honestly, I have been to busy with contractual project work and it never really occurred to me to set up IPv6 in my LAN. Well, the following paragraphs are going to shed some light on those aspects of modern computer and network technology.

This is the first article in a series on IPv6 configuration:

Piece of advice: This is based on my findings on the internet while reading other people's helpful articles and going through a couple of man-pages on my local system.

Let's embrace IPv6

The basic configuration on Linux is actually very simple as the kernel, operating system, and user-space programs support that protocol natively. If your system is ready to go for IP (aka: IPv4), then you are good to go for anything else. At least, I didn't have to install any additional packages on my system(s). We are going to assign a static IPv6 address to the system. Hence, we have to modify the definition of interfaces and check whether we have an inet6 entry specified. Open your favourite text editor and check the following entries (it should be at least similar to this):

$ sudo nano /etc/network/interfaces

auto eth0
# IPv4 configuration
iface eth0 inet static
  address 192.168.1.2
  network 192.168.1.0
  netmask 255.255.255.0
  broadcast 192.168.1.255

# IPv6 configuration
iface eth0 inet6 static
  pre-up modprobe ipv6
  address 2001:db8:bad:a55::2
  netmask 64

Of course, you might have to adjust your interface device (eth0) or you might be interested to have multiple directives for additional devices (eth1, eth2, etc.). The auto instruction takes care that your device is enabled and configured during the booting phase. The use of the pre-up directive depends on your kernel configuration but in most scenarios this might be an optional line. Anyways, it doesn't hurt to have it enabled after all - just to be on the safe side.

Next, either restart your network subsystem like so:

$ sudo service networking restart

Or you might prefer to do it manually with identical parameters, like so:

$ sudo ifconfig eth0 inet6 add 2001:db8:bad:a55::2/64

In case that you're logged in remotely into your PC (ie. via ssh), it is highly advised to opt for the second choice and add the device manually.

You can check your configuration afterwards with one of the following commands (depends on whether it is installed):

$ sudo ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:21:5a:50:d7:94 
          inet addr:192.168.160.2  Bcast:192.168.160.255  Mask:255.255.255.0
          inet6 addr: fe80::221:5aff:fe50:d794/64 Scope:Link
          inet6 addr: 2001:db8:bad:a55::2/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

$ sudo ip -6 address show eth0
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 2001:db8:bad:a55::2/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::221:5aff:fe50:d794/64 scope link
       valid_lft forever preferred_lft forever

In both cases, it confirms that our network device has been assigned a valid IPv6 address.

That's it in general for your setup on one system. But of course, you might be interested to enable more services for IPv6, especially if you're already running a couple of them in your IP network. More details are available on the official Ubuntu Wiki.

Continue to configure your network to provide IPv6 address information automatically in your local infrastructure.

Tagged as: No Comments
4Mar/140

How to extend a virtual disk and its logical volume(s) in CentOS

Posted by Jochen Kirstaetter

Lately, I ran into the situation that one of my services which is hosted in a virtual machine stopped working. A quick check revealed that the hard disk ran out of disk space and it was about time to increase the available storage. Don't laugh but the system is running on CentOS 5.x with a mere 13 GB virtual disk - well, since years already. And one golden rule learned from experience: Never touch a running system - kept me away from any modifications. Well, there's always a time that change has more benefits than not touching the system...

Running out of disk space

That is (now: was) the situation before the following steps.

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       12G   12G    0G 100% /
/dev/hdc1              99M   36M   59M  38% /boot
tmpfs                 252M     0  252M   0% /dev/shm

And I can tell you that even a Linux OS doesn't like the lack of space on the system drive at all.

Backup your data and drives

Although, I think it is not necessary to stress the fact that you should (read: have to) backup your data and drives always. Just to be on the safe side, and to revert back to the original state easily and quickly.

Preparing the virtual disk

First, shut down your virtual machine. Even though it is possible to run almost all of the following in a running environment I doubt that for the casual (home) administrator reading this article it might not be necessary to risk your data. Okay next, it would be necessary to expand the size of virtual hard disk, and then afterwards extend the logical volume with the newly created partition.

Converting the disk format from VMDK to VDI

Well, the system has kind of a past and it was originally created on VMware Server 1.0, then upgraded to VMware Server 2.0, and some years back I switched over to SUN, eh Oracle, VirtualBox. So, the original virtual disk was still in VMware's format - vmdk. VirtualBox is not able to expand that type of disk drive (yet):

$ vboxmanage modifyhd virtual-disk1.vmdk --resize 40960
0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage: error: Resize hard disk operation for this format is not implemented yet!

In order to complete this initial task it was necessary to convert the format from VMDK to VDI. This is done by cloning the disk into the new format:

$ vboxmanage clonehd virtual-disk1.vmdk virtual-disk1.vdi --format VDI
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'vdi'. UUID: 37ef6965-0000-4159-861a-d1c64d9c060f

Depending on the actual disk size and your system performance this might take some time. Remain patient and let the system do the job. Meanwhile, you might check your mails or post your intentions on various social media networks. Just kidding! ;-)

Note: Additionally to your backup, it might be interesting to keep an archive of the original VMDK file. Just in case...

Resizing the virtual drive

Now, that we have our drive in VDI format we are able to expand the disk size. Let's try our previous statement again, but this time with the newly created VDI disk:

$ vboxmanage modifyhd virtual-disk1.vdi --resize 40960
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

After successful expansion it is about time to check our disk modifications in the settings of the virtual machine. Launch the Oracle VM VirtualBox Manager, select your virtual machine and either press the Settings button in the toolbar or choose from the menu Machine -- Settings (Ctrl+S). Next, select the Storage entry from the side pane and then the virtual hard disk that we just modified. You should see something similar to the following screenshot.

Settings of virtual disk size and proper assignment
Oracle VM VirtualBox: Settings of virtual disk size and proper assignment

In case that you had to convert an VMDK drive to VDI, please select the newly cloned drive from the dropdown list in the Attributes area. You should have the .VDI disk attached to your virtual machine.

Pro tip: In case that you want to keep the original disk type in VMDK format, do a complete round-trip and clone the extended drive back to VMDK format, like so:

$ vboxmanage clonehd virtual-disk1.vdi virtual-disk1.vmdk --format VMDK
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'vmdk'. UUID: 37ef6965-0000-4159-861a-d1c64d9c060f

Using VMware Player

The above mentioned conversion is not necessary in case that you have an installation of VMware Player or even VMware Workstation at hand. In my case, I didn't. Anyway, VMware Player gives you the ability to expand the disk capacity through the UI directly. Open the Virtual Machine Settings, then select the Hard Disk from the list of devices and below the Disk information you'll have a list of utilities in the dropdown list. Choose "Expand..." in order to change the disk's capacity.

Virtual Machine Settings and ability to expand the disk capacity
VMware Player: Virtual Machine Settings and ability to expand the disk capacity

That's all for the 'physical' expansion of our hard drive. Now, start your virtual machine as we are going to take of the software part.

Preparing the partition

The system in our virtual machine is still out of space and we are going to change this now. Please follow the next steps closely. Accidentally, I trapped myself and had to revert a couple of steps because I didn't pay enough attention to the details. I'll come back to that at the end of this article. Okay, we enlarged the physical drive, and now we have to take care of that unallocated space. Let's check the partition table first like so:

$ sudo fdisk -l

Disk /dev/hdc: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1          13      104391   83  Linux
/dev/hdc2              14        1827    14570955   8e  Linux LVM

This will give us an overview of the existing partitions. The new disk size has been accepted already and it's now time to create a new partition.

Creating a new partition

This article is not about how to use fdisk on the command line. There are other tutorials with more detailed information about the particular steps, and you might have a look at the manual page of fdisk directly. To create a new partition we launch fdisk on our hard drive

# fdisk /dev/hdc

Then we create a new full-size partition at the end of the disk drive with the following sequence of keystrokes:

n - new partition
p - primary partition
3 - next partition number
[Enter] - confirm first cylinder
[Enter] - confirm last cylinder
t - change partition's type or system id
3 - choose newly created partition id
8e - specify hex code of system type (Linux LVM)
w - write partition table to disk

Of course, this might vary depending on your existing partition table. Please, adapt your inputs accordingly.

After completing all steps your hard drive might have a similar output like this one:

# fdisk -l

Disk /dev/hdc: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1          13      104391   83  Linux
/dev/hdc2              14        1827    14570955   8e  Linux LVM
/dev/hdc3            1828        5221    27262305   8e  Linux LVM

Alternative: Extend an existing partition

During my research in preparation of this 'surgery' I also came across a couple of resources online where it is stated that it is also possible to enlarge an existing partition to the full extend of the new capacity of the disk drive. The general recommendation is to use a more sophisticated partitioning tool like the freely available GParted. While using a Windows operating system, I clearly would recommend this approach, too. Mainly because it's your system drive that runs out of space and Windows is hardly capable to span over multiple drives (at least in casual environments like home and office desktops). I already did this in the past to enlarge a Windows Server 2008 R2 system, and it went as smooth as expected.

You can download the GParted LiveCD ISO here.

Expanding the logical volume

Once you understood the necessary steps to extend an existing logical volume it's fairly easy to reproduce. The general concept is well documented in Chapter 4 of the LVM Administrator's Guide for CentOS, and is based on the following procedure. First, you create a physical volume (PV) based on your new partition which is then extended into an existing volume group (VG), and then finally extended into a logical volume (LV) within a volume group. After resizing the logical volume you are ready to go and the new disk space is available in your system.

Creating the physical volume

# pvcreate /dev/hdc3
  Physical volume "/dev/hdc3" successfully created

This will prepare the partition for use in a volume group.

Note: Depending on whether you are going to extend your system with an additional partition or a whole drive, you might even skip the partitioning and create a physical volume using the whole hard disk.

Extending the volume group

Prior to any extension is not too bad to get an overview of the existing volume groups. This can be done like so:

# vgdisplay
  --- Volume group ---
  VG Name               VolGroup00
  System ID            
  ...

With the information of the available name of the volume group, we are now able to extend it with our physical partition:

# vgextend VolGroup00 /dev/hdc3
  Volume group "VolGroup00" successfully extended

Done. Next step is to assign the available space to the logical volume that we would like to expand.

Extending the logical volume, finally

Same procedure here, it's advised to have an overview of the existing logical volume first:

# lvdisplay
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
...
 
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol01
  VG Name                VolGroup00
...

In my case, I'm going to extend the first logical volume with the new physical volume.

# lvextend /dev/VolGroup00/LogVol00 /dev/hdc3
  Extending logical volume root to 37.94 GB
  Logical volume LogVol00 successfully resized

Almost done. After expanding the volume group and the logical volume we only have to populate the information about the new total size of our logical volume.

# resize2fs /dev/VolGroup00/LogVol00

That's it!
Just to complete the whole process check the available disk space:

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       37G   12G   24G  32% /
/dev/hdc1              99M   36M   59M  38% /boot
tmpfs                 252M     0  252M   0% /dev/shm

Okay, my system has now more than triple the original disk size. Let's see how many years it is going to run before I might have to add another partition to the logical volume.

Summary

Once you understood the necessary steps on how to expand a logical volume it's actually very simple to reproduce. You start with the physical preparation of the hard disk, either by adding a new drive or by expanding an existing virtual drive. Then you create a partition of type 8e - Linux LVM - for that new unallocated drive space. And to complete the procedure you have to walk through the LVM handling by creating the physical volume, extending the volume group and finally extending and resizing the logical volume in that volume group.

Even in case of an error it's relatively simple to track down the root cause and take care of it.

Beware of the details... Troubleshooting

As mentioned earlier I got stuck in the process because of two issues.

First, my Linux operating system, here CentOS 5.3, didn't get the new partition table automatically. So when I run the following command I got the response that the specified device isn't available.

# pvcreate /dev/hdc3
  Device /dev/hdc3 not found (or ignored by filtering).

A quick look on the internet revealed that this could happen and the modified partition table can be updated manually like so:

# partprobe -s
/dev/hdc: msdos partitions 1 2 3

# partx -a /dev/hdc

Or to keep things simple, just reboot the system. But that would be too easy and a waste of time...

And second, I mistyped the name of the logical volume - LogVol01 instead of LogVol00 - and added the new partition to the swap area. Well, following are some details on how to detect that kind of issue and how to remove a physical drive from a logical volume and volume group.

I came to an abrupt stop on the very last step, resizing the file system with the newly allocated volume:

# resize2fs /dev/VolGroup00/LogVol01

resize2fs: bad magic number in super-block while trying to open /dev/VolGroup00/LogVol01
couldn’t find valid filesystem superblock

That's kind of bummer. Especially, so close to the finish line. Well, it turned out that volume group had two logical volumes LogVol00 and LogVol01. And the second one is actually used for the swap area. Which easily explains why there is absolutely no valid filesystem superblock to be found - no matter how hard I would try it. First, I thought that it might have been a problem with the filesystem type, as I am using ext2, ext3, ext4, and xfs interchangeable. But a quick check confirmed that I'm using the right command. In case of xfs you might have to work with xfs_grow command instead of resize2fs.

Then I checked the overview output of my logical volumes again and I was kind of lucky that I discovered that I increased the wrong volume:

# lvdisplay
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol01
  VG Name                VolGroup00
...
  LV Size                24.83 GB
  Current LE             891
  Segments               2

The original output stated a LV Size of 1.91 GB. Due to the nature of LVM I couldn't remove the physical hard drive because it is reported to be in use. Therefore, it is first necessary to decrease the volume size to its original value like so:

# lvreduce -L 1.9G /dev/VolGroup00/LogVol01
  Rounding up size to full physical extent 1.91 GB

Eventually, you might have to move all allocated space off the physical volume to other free physical volumes in the same volume group like so:

# pvmove /dev/hdc3

Then it's possible to remove (or better said to reduce) the drive from the volume group like so:

# vgreduce VolGroup00 /dev/hdc3

And then to start over again by adding the fresh physical volume back to the volume group again and then assigning it to the proper logical volume, like so:

# pvcreate /dev/hdc3
# vgextend VolGroup00 /dev/hdc3
# lvextend /dev/VolGroup00/LogVol00 /dev/hdc3
# resize2fs /dev/VolGroup00/LogVol00

Now, everything went smooth and my last system check of the logical volumes looks like so:

# lvdisplay
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
...
  LV Size                37.94 GB
  Current LE             1214
  Segments               2
  
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol01
  VG Name                VolGroup00
...
  LV Size                1.91 GB
  Current LE             61
  Segments               1

As usual, follow administrator's rule number 1: Don't Panic!

Have a look at the history of your inputs, here your commands on the console, and check them entirely with the outputs of the various display commands - pvdisplay to show information about physical volumes, vgdisplay for details about volume groups, and finally lvdisplay to get an overview of your logical volumes.

Good luck with your mission and leave your comments below.

Tagged as: No Comments