Mounting ext4 partitions in Debian

As of Debian 5.04 (Lenny), Debian doesn’t support mounting ext4 partitions out of the box, or rather, we should say, using conventional methods.

Trying to mount an ext4 partition using the mount directive yields the error :

mount: unknown filesystem type 'ext4'

The roundabout way of doing it is setting a test_fs flag on the partition using the tune2fs utility.

su -
tune2fs -E test_fs /dev/hda1
mount -t ext4dev /dev/hda1 /place/to/mount/

Replace hda1 with the name of the ext4 partition you want to mount.

I’ve had some (Pulse)Audio problems

Like many others, my speakers stopped working after I upgraded to Lucid Lynx. The usual solution of purging, reinstalling PulseAudio didn’t work for me, nor was my volume muted.

I finally got it working by removing PulseAudio and not installing it afterwards. AlsaMixer works just fine for me. However, I some times get the feeling that the sound quality might have deteriorated a bit, but it might just be me worrying too much.

This post is for those with a similar problem. If the usual solutions don’t work for you, try removing PulseAudio. That just may be it.

How to download a file concurrently/simultaneously from different sources in Ubuntu

In order to achieve this, you need to download an install Aria2, a lightweight, multi-source download utility. It can be installed from it’s package ‘aria2′ from the universe repositories.

sudo apt-get install aria2

Now we need to create a file containing the source URLs for the file(s) we need to download. The source/mirror URLs should be separated by a tab or newline. The mirrors can also be used directly as a command line argument, but that would just make things clumsy.

I’m using Lucid Netbook Edition as an example here. My sources.txt contains the following :

http://mirror.uoregon.edu/ubuntu-releases/lucid/ubuntu-10.04-netbook-i386.iso     http://mirrors.us.kernel.org/ubuntu-releases/lucid/ubuntu-10.04-netbook-i386.iso     http://ubuntu.mirrors.hoobly.com/lucid/ubuntu-10.04-netbook-i386.iso     http://mirrors.pavlovmedia.net/ubuntu-releases/lucid/ubuntu-10.04-netbook-i386.iso     ftp://mirror.vcu.edu//pub/gnu+linux/ubuntu-releases/lucid/ubuntu-10.04-netbook-i386.iso     ftp://ftp.gtlib.gatech.edu/pub/ubuntu-releases/lucid/ubuntu-10.04-netbook-i386.iso     http://ftp.chg.ru/pub/Linux/ubuntu/releases/lucid/ubuntu-10.04-netbook-i386.iso     http://mirror.yandex.ru/ubuntu-releases/lucid/ubuntu-10.04-netbook-i386.iso     http://ubuntu.mirror.ac.za/ubuntu-release/lucid/ubuntu-10.04-netbook-i386.iso     http://ubuntu.hugi.is/releases/lucid/ubuntu-10.04-netbook-i386.iso     http://mz.releases.ubuntu.com/lucid/ubuntu-10.04-netbook-i386.iso     http://releases.ubuntu.nautile.nc/lucid/ubuntu-10.04-netbook-i386.iso


Now we need to start the download using Aria2. Type this in the terminal.

aria2c -i /path/to/sources.txt -s 12

The -i argument specifies the input file and -s argument specifies how many connections will be used to simultaneously download the file. Here, we have 12 mirrors for the .iso file, so I used 12 in the argument. According to the aria2c man page, if the value specified in the -s argument (say, N) is less than the number of mirror URLs, the first N URLs will be used and the rest will be used as backup. Otherwise, if the number of mirrors is less, a single source is used more then once, so that N connections can be made.

Aria2 is a wonderful download utility that support Metalinks and BitTorrent other than the usual http, ftp. It can be used to do a whole range of things, but we will keep ourselves limited to the topic at hand. Maybe we will try out those possibilities in an other post.

Stop applications from auto starting in Ubuntu

If you don’t want an application to auto start in Ubuntu, you can use the instructions in this blog post. There are many ways to go about doing this. It can be performed from the terminal or you can use the BUM GUI (Boot-Up Manager) to remove auto-starting applications.

For example, say, we want to prevent the MySQL server from auto-starting. We need to remove the symlink(s) in /etc/rc2.d directory that cause it to auto start. We can manually go to the directory and delete them. Or we can run this command from the terminal :

sudo update-rc.d -f mysql remove

You will get a message saying :

 Removing any system startup links for /etc/init.d/mysql ...

And any symlinks pertaining to MySQL will be deleted.

Another alternative is to use the Boot-Up Manager GUI. Install it by writing :

sudo apt-get install bum

After installation, start the application by going to Applications-> System->BootUp-Manager in Xubuntu. (In Ubuntu, the location may be slightly different). Find “Fast and stable SQL database server”, right-click on it and select “Deactivate and apply now”.

Boot-Up Manager

You are done and good to go. MySQL server will not auto-start now.

Resolving the Network Manager bug in Ubuntu 9.10

Due to a bug in Network Manager, establishing PPPoE connections is not possible on a new installation of Ubuntu 9.10 (Karmic Koala).

It is possible to resolve this bug by downloading and installing Network Manager from the Network Manager Team Launchpad Personal Package Archive (PPA). But you need to connect to the internet first, for which you can use pppoeconf.

sudo pppoeconf

Follow the instructions that appear and set up your PPPoE connection. After it is set up, you can start your internet connection by typing in :

sudo pon dsl-provider

And you can terminate your connection by using :

sudo poff dsl-provider

Now that we are connected to the internet, we need to add the Launchpad PPA URL to the sources list :

gksudo gedit /etc/apt/sources.list

For Kubuntu and Xubuntu, you will need to use kdesu kate and gksudo mousepad in place of gksudo gedit respectively.

Add these lines to the end and save the file.

deb http://ppa.launchpad.net/network-manager/trunk/ubuntu karmic main
deb-src http://ppa.launchpad.net/network-manager/trunk/ubuntu karmic main

Now update the source list :

sudo apt-get update

Now install Network manager using apt-get :

sudo apt-get install network-manager

We now need to disable the “pppoe on boot” setting which is configured by pppoeconf.

gksudo gedit /etc/ppp/pppoe_on_boot

Comment out the exec pppd call dsl-provider by adding a leading #.

We now need to rename /etc/network/interfaces to backup file. Deleting it is also an option, but keeping a backup is always recommended.

sudo mv /etc/network/interfaces /etc/network/interfaces.bak

Edit /usr/share/polkit-1/actions/org.freedesktop.network-manager-settings.system.policy :

gksudo gedit /usr/share/polkit-1/actions/org.freedesktop.network-manager-settings.system.policy

Find out the line that contains :

<message xml:lang="en_GB">System policy prevents modification of system settings</message>

Find this line after it :

      <allow_active>auth_admin_keep</allow_active>

Above it, find :

      <allow_inactive>no</allow_inactive>

Change it to :

      <allow_inactive>yes</allow_inactive>

You may revert back this change after your connections are set up.
Restart your computer after doing this. Network manager will work right after this.