Archive for the 'Linux' Category

Getting NetworkManager to send your hostname to DHCP Server in Fedora 13

June 2, 2010

Network Manager in Fedora still ignores the old system wide /etc/dhclient.conf(it’s rude like that), so you would have to create a /etc/dhclient-$IFNAME.conf
to get it to work. The contents will still be the usual:

send host-name "my.little.pony";
request subnet-mask, broadcast-address, time-offset, routers,
domain-search, domain-name, domain-name-servers, host-name;

I don’t request much, but I do make demands. After you may safely right click you’re nm-applet icon and select your current connection, it will re-initialize(I may be phrasing this wrong) you current connection and you’re set!

Ubuntu-ZA Karmic Release Party (Cape Town)

November 9, 2009

I briefly stopped by the Ubuntu-ZA Karmic release party, held at the University of Cape Town. It was quite refreshing to chat to Jonathan Carter(highvoltage) after so long. I also got the chance to meet David Rubin(drubin) and Michael Gorvan(cocooncrash) in person. Although, I had not been there long enough to sit in on any of the talks, the experience was quite pleasant. I hope to manage my time more efficiently for the next release party, so I may participate more.

drubin and cocooncrash


the flyer

Installing Gentoo from a LiveCD or Desktop using LVM

September 14, 2008

Its been a while since I have manually had to install Gentoo on a host, as we use our own custom Gentoo build called “fatboy”. Since I had no cd at the time. I figured I’d give the manual route a go which I haven’t since gentoo’s 2005 release. So I give you a brief description of how to get lvm under a live cd working whilst building gentoo.

If you’re using a live environment you’d probably want to install lvm2, Well if your gonna use it anyway. Once installed run the command “modprobe dm-mod” to load the appropriate kernel module.

modprobe dm-mod

We’ll execute a vgscan to scan all disks for volume groups, rebuild caches and will return to any volume groups found. We then activate any existing volgroups (if any) with vgchange.

vgchange -a y

vgchange activates and makes available “-a” the volume groups. The vgchange tool is commonly used to activate and de-activate volume groups but also yields a plethora of other capabilities. I didn’t have any volume groups since this was a fresh install.

My partition layout looks as follows:

boot	100Mb
root 	900Mb
swap	512Mb
usr	10Gb
tmp	1Gb
var	5Gb
home	5Gb

Use fdisk and create a partition based on what you want, but if you’re gonna use lvm make sure you leave an appropriate segment for your volume group depending on what you’ve chosen.

I created three partitions using fdisk. One for boot, swap and the last to be used for lvm.
So I ended up with the following:

/dev/hda1	boot
/dev/hda2	swap
/dev/hda3	for use by lvm,

To initialize the 3rd partition of this drive for lvm we use the command pvcreate.

pvcreate /dev/hda3

If you intend using more that one partition or drive and you want to extend it over different partitions, you can seperate the arguments with a space and initialize it like so:

pvcreate /dev/firstdevice /dev/seconddevice
vgcreate volgrp /dev/sda3

The vgcreate command will create us a volume group with the name volgrp on our partition we chosen to use for lvm.

So now we create our logical volumes using a tool called lvcreate and name them accordingly.

lvcreate -L900M -nroot volgrp
lvcreate -L10G -nusr volgrp
lvcreate -L1G -ntmp volgrp
lvcreate -L5G -nvar volgrp
lvcreate -L5G -nhome volgrp

As you may notice the -L option takes the size as an argument, the -n option for the name and the last argument being the volume group on which you would like create your logical volume.

If we do a lvscan it’ll now show us the active logical volumes we’ve just created, alternative you could run lvdisplay as it displays the atrributes and various other information about our logical volumes.

Now we’ll have to create our directories to which we’ll build our gentoo environment, The gentoo hand uses /mnt/gentoo, so we’ll use it too. So we create a directory called gentoo in /mnt. Before we continue creating mount points for our logical volumes we’ll need to create filesystems on for our logical volumes and partitions and mount the root partition first. We do this by using the e2fsprogs utilities and since I am going to use ext3 for all my partitions aside from boot I can do the following.

for i in /dev/volgrp/* ; do mke2fs -j $i ; done

This will create ext3 filesystems for all my logical volumes. The only outstanding partitions are swap and boot for which I do the following.

mke2fs /dev/hda1
mkswap /dev/hda2

Now we’re ready to create our mount points and mount our filesytems.
We mount root first then create our mount points of course.

mount /dev/volgrp/root /mnt/gentoo
for i in boot usr tmp var home ; do mkdir /mnt/gentoo/${i} ; done

We mount boot.

mount /dev/hda1 /mnt/gentoo/boot

We mount the rest of our filesytems and activate our swap partition.

for i in usr tmp var home ; do mount /dev/volgrp/${i} /mnt/gentoo/${i}

From here on out its safe to follow the gentoo handbook at chapter 5 and just do the regular download and unpack of stage3 tarballs and the latest portage snapshot which you can find on your local gentoo mirror.

When you mount your /proc filesystem you should rather use the bind option.

mount -o bind /proc /mnt/gentoo/proc

Also, before you reboot you might wana de-activate your volume groups with vgchange.

vgachange -a -n

Make sure that when you compile your kernel you compile it with device mapper support, and edit your fstab correctly.

I forgot to mention that you’ll probably need to create an initrd image if your root partition is an logical volume.
A useful script to do this can be found here.
The syntax for the script is as follows.

sh lvm2create_initrd -M gentoo

or tell it to look for a specific kernel

sh lvm2create_initrd -M gentoo 2.6.25-gentoo-r7


November 30, 2007

I wrote a mencoder script back when I was still running Ubuntu 6.06 Dapper to which I could pass various options in order to convert videos from avi to dvd. Three upgrades later, and I seem to have lost the script. I had two choices; one spend a considerable amount of time remembering and re-writing the script, or two look at at using a gui application. I chowse option two. The one that struck me most (other than the front-end to transcode) was DeVeDe. Its a nice simple application that can encode a number of different video formats to DVD, VCD, sVCD formats suitable for playback on your home dvd player (provided you have the dependencies which are mplayer, mencoder, vcdimager, dvdauthor, mkisofs). It has a really simple interface yet provides a fair amount of options for video conversion . You just tell it what you want it to do and it does the conversion and creates a ready to burn iso for you. I found it quite useful.

One thing to note:

“for Ubuntu Gutsy users: by default (as November 21, 2007) Gutsy comes with Mplayer/Mencoder buggy version 1.0RC1 (like Feisty); but fortunately there’s the version 1.0rc2 avaiblable in the backports repository, which fixes the sound bug.”

So had I found my script, I think I would have run into a problem anyways 😉

Less Interesting things you probably already know about Ubuntu 7.10 Gutsy Gibbon (beta).

October 16, 2007

I thought I’d share some of the more less interesting things about Ubuntu 7.10 Gutsy and Features that everyone probably knows about. Most of these new features are not Ubuntu specific but more so new features of Gnome 2.20.0 release.

I have been running Ubuntu 7.10 Gutsy (beta) for little over a week now. The first thing I noticed was the built-in stock icons were updated so Rhythmbox does not look as ugly as it used to. The lyrics plugin in the new release of Rhythmbox, the default Music Player in Ubuntu, also now allows you to choose where you get you lyrics from which is awesome due to leoslyrics problems recently.

Quite a few extra shortcuts have also been placed under the places menu, such as Video, Music and Pictures have been added.

Tomboy a note taking application in Gnome now allows for synchronization of notes between workstations via ssh or WebDAV, which I think is pretty cool.

Tracker is a deskbar search applet which appears to be lighter and faster than beagle was added to the desktop as well.

Sudo now has a sudo tag infront of sudo’s password request:

me@somehwere:~$ sudo apt-cache show syslinux
[sudo] password for me:

As we all know Gaim has been renamed to Pidgin and newer features such as support for even more IM’s have been added.
We also now have a graphical configuration tool for X which for some reason does not work well with my setup.

The control panels in Gnome have been trimmed down. Compiz-Fusion is available by default in Gutsy. The ‘compizconfig-settings-manager’ package, which is located in the ‘universe’ repository is quite usefull too if you dont want to go about messin round with gconf-editor to tweak your desktop effects.

Amongst other things such as the stock kernel featuring dynticks, the fully automatic printer detection, Profile based authentication configuration, The fast user switching utillity which also alows you to leave a message for users who’ve locked their screens. Users will then be notified upon unlocking. Allot of software was updated such as OpenOffice to 2.3 and GIMP to 2.4. Even Firefox 3 (beta) is available in the repositorie:

me@somehere:~$ sudo apt-cache search firefox-granparadiso-gnome-support firefox-granparadiso
firefox-granparadiso-gnome-support – dummy upgrade package for firefox-granparadiso -> firefox-3.0

I think Gutsy has overcome allot of new user barriers. Only 2 more days left till the release of Ubuntu 7.10 Gutsy Gibbon!

What is it that you do on your day off from work?

July 7, 2007

I often ponder about what people spend time doing on their days off from work. Do they journey across town and visit their favourite restuarant? Do they call up a friend and go see a movie? Or do they sit infront of a PC reading up on BIND and spending 3 hours realising why its not best practice to write a BIND configuaration from scratch. I *eventually* got it working after fixing a *number* of typing errors in the configuaration. All in all it was fairly simple to setup for a small network.


A new, but not so new start…

June 21, 2007

Started off by installing Kubuntu on the desktop yesterday and ran into a few issues. For some odd reason the installer would’nt allow me to create a third primary partition. The installer appears to have some restriction to kinda “ensure you do the right thing”. Unlike the the previous version of the installers. The second thing I noticed was the removal of many of my favourite application in the default install such as Firefox. I feel that Kubuntu 6.06 Dapper was more ideal and suited my needs well on the desktop.