Using Jigdo

Posted by John
on Saturday, 26 July 2008

Trashed my Fedora 9 install with their latest kernel update 2.6.25, it really is unstable. So now downloading Fedora 8 Unity, hopefully that'll make it a little more stable. One thing though, unlike other distributions who use ftp or torrent downloads, the Unity project use Jigdo to handle their iso downloads.

This can be added to your Ubuntu install with,

sudo aptitude install jigdo-file

Then start the program,

sudo jigdo-lite

Now I copy & paste the jigdo repository link into Terminal from here, hit enter and it shows a list of possible iso files to download, select 64-bit and off it goes.

I'll burn that to dvd and get it on the box soon, can't believe fedora 9 was that unstable!

Fedora 9 wifi + flash on 64bit

Posted by John
on Monday, 14 July 2008

After getting back from vacation in Vegas I decided I needed to sort my laptop out once and for all. So partitioned the drive in two, one with Vista Ultimate and one with Fedora 9.

On top of this I really wanted the Fedora partition to be encrypted and using LVM so I can resize later, glad I did that.

However in all I had two problems along the way,

Fedora 9 Wifi doesn't support TKIP

The first thing which I couldn't fix was the Wifi. I was using WPA+TKIP which is available in the network configuration panel, all good but everytime I tried to connect it'd popup the password entry screen again; really annoying.

Thankfully I found the reason to this, Fedora 9 does not support TKIP even though it's available in the control panel; switching to WPA+AES clears that problem.

Just wish they documented that better ;-)

32-bit Flash on a 64-bit build

Adobe released the Flash 9 libraries to the linux community but only as 32-bit binaries, I installed Fedora using the 64-bit build so with some tweaking managed to fix that too.

In Terminal do:

su -c 'rpm -Uvh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm'
su -c 'yum install flash-plugin'

Now specifically for 64-bit Fedora builds do:

su -c "yum -y install nspluginwrapper.{i386,x86_64} pulseaudio-libs.i386 libflashsupport.i386"
su -c 'mozilla-plugin-config -i -g -v'

Afterwards close & reopen Firefox and you should now have Flash 9 running on your Fedora 9 64-bit desktop.

RAID 1 with Fedora Unity

Posted by John
on Monday, 19 May 2008

Over the weekend I went thru the process of setting up and installing the O/S on my private server preparing it for colocating. During this I wanted to bind the twin 1TB drives together in a RAID 1 configuration. Now the ASUS BIOS has the facility to do this at the hardware level but by doing so it ties you down to the physical setup you used to build it. However Linux provides the facility to do this at the software level without the ties which both alleviates you from the reliance and provides you with a more manageable alternative.

However for the uninitiated it's nowhere as simple, what follows is a short guide to setup a simple twin drive software RAID solution; handle with care.

Fedora Unity

Before I start, get a copy of Fedora Unity. It's basically Fedora 8 with more stable drivers and packages. I was speaking with one of my friends last week and he suggested using it for this very same reason, and although Debian does the same it is nowhere near as up-to-date.

Grab the latest distro and burn it to a blank DVD, it's about 4.3gb in size so if your downloading I'd leave it going for the night.

Software RAID with LINUX

Once you've burned it to DVD, boot your machine up and go thru the install process, this example obviously assumes you have 2 identical drives but there's no stopping you using this to build a more advanced RAID setup later on.

Fedora has a pretty good partition manager which'll help you out a lot, so when it prompts you to decide on your partition layout, choose 'manual' and we'll begin;

  • On the first drive,
  • Create a software [raid] partition of 100mb (we'll use this for /boot).
  • Create a second software [raid] partition using all the remaining space.

  • Select [raid] again and clone the first drive layout to the second drive.

Now next time you select [raid] it'll give you the option to create a raid device, binding both discs together for each partition.

  • So, create a [raid] device using the ext3 filesystem, mount point '/boot', raid level 1, with raid members of 100mb in size (the two small partitions we created at the start), specify it to use both 100mb members (sda1 & sdb1).
  • For the second partition I'm creating a LVM partition for the rest of the filesystem and the swapfile,
  • So create a second [raid] device, file type LVM, raid level 1, using the two large members (sda2 & sdb2).

  • Afterwards select [LVM] in the options panel and define your LVM group.

  • Make an LVM volume group, e.g. 'lvmgroup'.
  • Next add a volume to the group, mount point '/', file system ext3, lvm name 'lvmroot', using all the space (- 10gb for the swap partition).
  • Next add a second volume to the lvm group, file system 'swap', lvm name 'lvmswap', using the remaining 10gb.

Click [finish] and you're done.

Setup your network settings and go make a coffee, Fedora takes a while to build the partitions and install the packages but afterwards you should be left with a pretty stable setup.

I built two partitions (boot & lvm) because I was informed this provides a more stable setup, if one boot partition goes down the other should kick in, providing some degree of failover.

Also creating an LVM group makes your filesystem more manageable and not so hard-wired so if you do need to do changes down the line you can.

Beyond that I'm going to leave in a copy of the Fedora LiveCD so I can boot from that if things get really hairy, I'm going to run the system headless with SSH access so Gnome isn't a necessity but for now it'll help in the system build.

All the best,

Update

One thing to remember is to make sure /boot is marked as bootable on both discs otherwise if you remove one the other won't kick in.

'Thin' Rails Server + Fedora Cleanup

Posted by John
on Wednesday, 27 February 2008

Thin

Thanks to Thomas Glasgow, I've been told of a new lighter Mongrel web server called THIN. It's more-so a cut-down version of the Mongrel Web Server, with the added power of an Event machine and Rack parser.

Haven't tested it out, but intend to try it out on one of my apps, install it with...

sudo gem install thin

Thin - Rake Task

With the above I found a startup script similar to Monrel's .yml config file.

namespace :thin do
  namespace :cluster do

    desc 'Start thin cluster'
    task :start => :environment do
      `cd #{RAILS_ROOT}`
      port_range = RAILS_ENV == 'development' ? 3 : 8
      (ENV['SIZE'] ? ENV['SIZE'].to_i : 4).times do |i|
        Thread.new do
           port = ENV['PORT'] ? ENV['PORT'].to_i + i : ("#{port_range}
%03d" % i)
          str  = "thin start -d -p#{port} -Ptmp/pids/thin-#{port}.pid"
          str += " -e#{RAILS_ENV}"
          puts "Starting server on port #{port}..."
          `#{str}`
        end
      end
    end

    desc 'Stop all thin clusters'
    task :stop => :environment do
      `cd #{RAILS_ROOT}`
      Dir.new("#{RAILS_ROOT}/tmp/pids").each do |file|
        Thread.new do
          if file.starts_with?("thin-")
            str  = "thin stop -Ptmp/pids/#{file}"
            puts "Stopping server on port #{file[/\d+/]}..."
            `#{str}`
          end
        end
      end
    end

  end
end

copy and paste it into a .rake task in your apps /lib/tasks directory.

then fire with...

rake thin:cluster:start
rake thin:cluster:stop

and...

rake thin:cluster:start RAILS_ENV=production SIZE=10 PORT=8000
  • SIZE = cluster size (2 is usually enough)
  • RAILS_ENV = environment (production, development or test)
  • PORT = port range to start from (for 2 clusters it'll be 8000 and 8001)

Thanks to Stephen Celis for this.

Fedora Package Errors and Cleanups

Lately i've run into some problems with my Fedora package manager, inconsistent files and dropped repositories. However I think I've managed to cleanup this problem by first cleaning up my package managers metadata, db cache and doing a general tidyup with...

sudo yum clean all
sudo yum clean metadata
sudo yum clean dbcache

Then giving the once-over of my RPM repository,

sudo rpm -vv --initdb

This looked ok, but I wanted to make sure so I rebuilt my RPM repository,

sudo rm -f /var/lib/rpm/__db*
sudo rpmdb -vv --rebuilddb

Now looking a little better,

Want to install Beryl + Compiz to get the 3D effects and cubed desktop next.

Update on Beryl

After hunting around I found that Beryl has been dropped in favour of Compiz, so don't go hunting for it because you won't find it.

Preload your Apps - Linux

Posted by John
on Tuesday, 26 February 2008

A new addon I've just discovered is a package called PRELOAD which basically runs in the background learning what kind of apps you like loading (firefox, etc.) and then puts these into free memory so when you open them they'll boot up faster.

Installing

From the terminal, install with...

sudo yum install preload //fedora
sudo aptitude install preload //ubuntu, etc.

Monitoring

You can monitor what resources it's using by...

sudo tail -f /var/log/preload.log

Or more specifically with...

sudo less /var/lib/preload/preload.state

These will give you output from it's logs as to exactly what programs it's caching and how it's operating.

Remove?

If you don't like it and want to remove it,

sudo yum uninstall preload //fedora
sudo aptitude uninstall preload //ubuntu, etc.

Links

More can be found at...