Archive for November, 2007

Howto: Add updated e1000 driver to SLED 10 SP1

Why
I maintain SLED 10 SP1 based systems that need to install via autoyast (ie network install). This does not support newer intel nic cards (which are a big win because they were previously broadcom, but I pushed back and got intel cards). The process is not very obvious, and probably not for the faint of heart. The following process is used to make an ‘initrd’ file that you can write over the previous initrd file on the iso, and burn that so your iso will have network support.

Install CD Process

1: Extract initrd from SLED SP1 install media to working directory

cp /media/sled/boot/i386/loader/initrd /home/sharms/working_directory

2: Make a directory to work with contents

mkdir /home/sharms/working_directory/work

3: Extract initrd contents

cd /home/sharms/working_directory/work
gzip -dc < ../initrd | cpio -idmuv

: Retrieve driver file from forge ftp

cd /home/sharms/working_directory
wget http://forgeftp.novell.com/driver-process/staging/pub/update/Intel/sle10sp1/common/i586/intel-e1000-kmp-default-7.6.5_2.6.16.46_0.12-27.i586.rpm

5: Extract module from rpm

mkdir rpm_contents
cd rpm_contents
rpm2cpio ../intel-e1000-kmp-default-7.6.5_2.6.16.46_0.12-27.i586.rpm | cpio -idv

6: Add module to initrd

cp default/lib/modules/2.6.16.46-0.12-default/updates/e1000.ko /home/sharms/working_directory/work/modules

7: Update module files (this will vary greatly depending on drivers) but
the two files to be modified are:
/home/sharms/working_directory/work/lib/modules/2.6.16.46-0.12-default/modules.alias
/home/sharms/working_directory/work/lib/modules/2.6.16.46-0.12-default/modules.pcimap

I generated mine like this:

depmod -b /tmp -n /tmp/workingdir/work/modules/e1000.ko

8: Recreate initrd

cd /home/sharms/working_directory/work/
find . | cpio --quiet -o -H newc > ../initrd
cd ..
gzip -v9c initrd > initrd.gz
mv initrd.gz initrd

Creating a new SLES / SLED iso

mount -t iso9660 -o loop /tmp/SLES-10-sp2-x86.iso /tmp/sles
mkdir /tmp/remastered-sles
rsync -avh /tmp/sles /tmp/remastered-sles
cp /tmp/workdir/initrd /tmp/remastered-sles/boot/i386/loader
mkisofs -v -r -J -o /tmp/sles10sp2-e1000.iso -b boot/i386/loader/isolinux.bin -T -pad -no-emul-boot -boot-load-size 4 -c boot.cat -boot-info-table .

Addon media process
This is needed because this prior process only covers the install cd, not the files actually installed.
This can be followed from:
http://opseast.wordpress.com/2007/06/05/autoyast-how-and-why-you-may-need-to-update-your-sle-installation-environment-source/

Important to note
: when making the addon package, you will want to
include both -default and -smp versions of the module rpm so that way
both types of processors are covered.

Tags: , ,

Freedom of speech

From the totally asinine department: From blogs I have read today, in the name of ‘freedom of speech’, you cannot tell someone to shut up. Why is ’shut up’ not covered under free speech? You should be free to say ‘hey, shut up’, and they are free to say ‘hey, no.’ … have we hit some sort of idiocracy realized?

Software design question

Looking for help from anyone here for good solutions that are probably obvious but that I can’t seem to nail down.

The problem: I need to keep track of different types of devices in a database. The issue is that devices have some attributes that are common (ie asset tag) and others that are not (only certain devices have ip addresses). I don’t want to make a table called ‘device’ in the database that has 3000 fields to it (for every possible attribute a device might have), as having all those empty fields seems like a bad design. I thought about making a table called ‘device_type’, and maybe device_type has a field called ‘attributes’ that lists the fields for X type of device, but I am not sure how to go about doing that.

Also making a table for each type of device is not an easily manageable solution, and once I implement the schema I cannot change it later easily (SOX compliance).

The solution: Please share :)

Dell D630 Sound

If you have an Intel HD audio card in your Dell D630 in Gutsy, you probably don’t have sound.


sudo apt-get install module-assistant
sudo m-a update
sudo m-a prepare
sudo m-a a-i alsa

Now you do. Reference: http://ubuntuforums.org/showthread.php?t=573330&page=1
Related bug: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/39770

Adventures in 3D Dual Head for Dell D620 with intel

Dell d620 / d630 3D dual head configuration
So at work we have laptops with docking stations. Our native laptop screen res is 1440×900, and our secondary monitors (hooked up to the docking station) are 1280×1024. To make this work, first we need to edit xorg.conf, and add the following under the “Screen” Section:


SubSection "Display"
Depth 24
Modes "1440x900" "1280x1024" "1024x768" "800x600"
Virtual 2048 2048
EndSubSection

Now the key is, we will be using xrandr, but the intel chips in our laptops only support 2048×2048 (this restriction is for 3d desktops only, ie compiz / aiglx) maximum size. So we can’t have a monitor left of, or right of, our display, because 1280 + 1440 = 2720 which is bigger than 2048. However, if we configured the second head to be Above the first, we can fit it in (900 + 1024 = 1924 which is less than 2048).

So first we investigate our displays:

# xrandr -q

After that, we see there are 2 monitors, VGA and LVDS. So the external monitor is at the wrong resolution, so I fix that first:

# xrandr --output VGA --mode 1280x1024

Now they are currently in clone mode, which is no good. I want to use both screens. So I type:

# xrandr --output VGA --above LVDS

Then bam, we have dual head. That works with compiz. Yay. Previously, in Feisty, I used the ‘MergedFB’ solution which appears to have been depreciated. For references:
http://wiki.debian.org/XStrikeForce/HowToRandR12
http://www.intellinuxgraphics.org/dualhead.html