Linux

Missing BNX2 firmware for Debian PXE/Netboot installations

I seem to have a inherent disklike of Debian and the feeling appears to be mutual. It never makes my life easy. Just this morning I needed to install it on a Dell R210 rather than our usual Centos builds. The server is 15 odd miles away, so I took my standard route of PXE installing. After downloading the netboot.tar.gz and dropping the right files in place on my netboot server, I booted the R210 and began the install. Only a couple of screens in I was presented with this most unhelpful message. So I have to drive 30 miles to plug a usb stick into this machine to continue? That isn’t acceptable imho.

In my case it was the non free firmware for the Broadcom ethernet cards in the machine, I needed this package.

Unhelpful Debian

Turns out there is a fix. You just need to download the missing .deb, cpio it and cat it into the end of the initrd:

% mkdir /tmp/firmware
% cd /tmp/firmware
% wget http://ftp.uk.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.28+squeeze1_all.deb
% cd /tmp
% find firmware | cpio -o | gzip -c > firmware.cpio.gz

Now cat the resultant firmware.cpio.gz onto the end of the existing initrd.gz, which for me was in /tftpboot/debian-installer/amd64/initrd.gz. So I ran this:

% cat /tmp/firmware.cpio.gz >> /tfpboot/debian-installer/amd64/initrd.gz

That will overwrite the initrd.gz without warning, so might want to take a backup of it first.

Using a non supported Timemachine volume

Always forget this bit:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Speficially needed if you are using a Linux box, shared by Apple Talk.

From here in this instance, although there are loads of howtos.

AirPrint for iOS on Linux

I quite often used to find myself wanting to print from my iPad, so when Apple announced AirPrint I thought things were looking good. According to the press release you would need either a HP printer or you could print to a shared printer on an existing mac. Sorted, I’ve got the latter of those, things were looking rosy.

Things took a turn for the worse when I read that they had pulled support for printing via shared printers and were only going to allow AirPrint to certain (at the moment only HP) printers.  I wanted the feature, but not enough to replace my trusty Lexmark.

Luckily there are people like this guy on the internet who took the time to figure out how it works and have since published a nice simple guide about how to setup a Linux box as a AirPrint server. Mainly thanks to Cups and some Avahi magic.

Sorted! And I’ve used it sufficiently to think spending an hour or so setting it up was worth while.

RedHat Enterprise Linux 5 Encrypted Microsoft Active Directory Authentication

So after a few hours getting Linux authenticating happily from Active Directory, I turned my attention to getting it all working with encryption.
Initially I had tried a telnet to port 636 (the LDAPS port) which failed, so it didnt look like my AD box was talking LDAPS. Somewhere to start I guess!

So after a few hours getting Linux authenticating happily from Active Directory, I turned my attention to getting it all working with encryption.

Initially I had tried a telnet to port 636 (the LDAPS port) which failed, so it didnt look like my AD box was talking LDAPS. Somewhere to start I guess!

(more…)

RedHat Enterprise Linux 5 Microsoft Active Directory Authentication

Today I set out to get RHEL 5.x (Specifically 5.5) to authenticate from a Windows 2003 R2 Active Directory. I used plenty of web pages, none of which were 100% correct for my setup, so I thought I’d document exactly what I did here for my own future reference, if anybody else finds it useful, so much the better. To start with, thanks to the following pages, between them, they got me about 80% of the way there:

  • Scott Lowe has a useful howto here. It is version 4 currently, click around his site to ensure he hasnt updated it before you use it as a reference.
  • The second resource I used is here.

(more…)

mdadm Linux software Raid raidhotadd

I’m sure there used to be a thing called raidhotadd, anyway these days it seems to be mdadm. We have a few machines with software raid, and very occasionally a md device flags a disk as dead but adding it back into the array fixes the problem.

Anyway, I never remember this, so to remove and then re-add a disk from a md device do the following:


[root@host ~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb1[1] sda1[0]
104320 blocks [2/2] [UU]

md0 : active raid1 sdc1[0] sdd1[2](F)
143371968 blocks [2/1] [U_]

md2 : active raid1 sdb2[1] sda2[0]
71577536 blocks [2/2] [UU]

unused devices:
[root@host ~]# fdisk -l /dev/sdd

Disk /dev/sdd: 146.8 GB, 146815737856 bytes
255 heads, 63 sectors/track, 17849 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdd1 * 1 17849 143372061 fd Linux raid autodetect
[root@host ~]# mdadm /dev/md0 --remove /dev/sdd1
mdadm: hot removed /dev/sdd1
[root@host ~]# mdadm /dev/md0 --add /dev/sdd1
mdadm: re-added /dev/sdd1
[root@host ~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb1[1] sda1[0]
104320 blocks [2/2] [UU]

md0 : active raid1 sdd1[2] sdc1[0]
143371968 blocks [2/1] [U_]
[>....................] recovery = 0.2% (297280/143371968) finish=32.0min speed=74320K/sec

md2 : active raid1 sdb2[1] sda2[0]
71577536 blocks [2/2] [UU]

unused devices:
[root@host ~]#

And there we can see from /proc/mdstat that the md device will be synchronised and happy again soon.

Parted, GPT and LVM

Always forget this:


(parted) mklabel gpt
(parted) mkpart primary 0 100%
(parted) set 1 lvm on

That is all.