Donate Bitcoins

ross's blog

Fixing udev's breaking apt-get dist-upgrade

I ran

apt-get dist-upgrade

on my sid box, and got the error

Preparing to replace udev 0.056-3 (using .../archives/udev_0.063-1_i386.deb) ...
udev requires a kernel >= 2.6.12, upgrade aborted.
dpkg: error processing /var/cache/apt/archives/udev_0.063-1_i386.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

which is mentioned here.

So, after looking at the manual for
apt_preferences, I added

Package: udev
Pin: version 0.056*
Pin-Priority: 1001

to /etc/apt/preferences and reran

apt-get dist-upgrade

and all is well.

I don't understand why someone would commit a package that relies on a kernel that isn't even in sid yet.

Perforce unnecessarily changes text files

I was having a terrible time with Perforce 2005.1 (and 2004.2) changing the line ending characters on my bash shell scripts, DOS batch files, and other text files. This was causing my scripts to fail in one way or another. Also, several of my PHP scripts were malfunctioning as well. Web pages I wrote that allowed users to download Excel spreadsheets were now generating a spreadsheet that contained nothing but garbage.

I then discovered, that in order for Perforce to leave the line ending characters alone, I needed to change the ClientSpec and add the files with

LineEnd: unix

and then change the ClientSpec back, and sync them with

LineEnd: share

To determine this, I wrote a small DOS batch file to analyse all possible combinations of LineEnd options, for both adding and syncing.
Here's the output from the program (edited slightly for clarity):

Add	Sync	file		Result
-------	-------	---------------	-------------------------------------
local	local	mac-cr.txt	_  cr   _  cr
local	local	unix-lf.txt	_  cr  lf   _  cr  lf
local	local	win-crlf.txt	_  cr  lf   _  cr  lf
local	mac	mac-cr.txt	_  cr   _  cr
local	mac	unix-lf.txt	_  cr   _  cr
local	mac	win-crlf.txt	_  cr   _  cr
local	share	mac-cr.txt	_  cr   _  cr
local	share	unix-lf.txt	_  lf   _  lf
local	share	win-crlf.txt	_  lf   _  lf
local	unix	mac-cr.txt	_  cr   _  cr
local	unix	unix-lf.txt	_  lf   _  lf
local	unix	win-crlf.txt	_  lf   _  lf
local	win	mac-cr.txt	_  cr   _  cr
local	win	unix-lf.txt	_  cr  lf   _  cr  lf
local	win	win-crlf.txt	_  cr  lf   _  cr  lf
mac	local	mac-cr.txt	_  cr  lf   _  cr  lf
mac	local	unix-lf.txt	_  cr  lf   _  cr  lf
mac	local	win-crlf.txt	_  cr  lf  cr  lf   _  cr  lf  cr  lf
mac	mac	mac-cr.txt	_  cr  lf   _  cr  lf
mac	mac	unix-lf.txt	_  cr  lf   _  cr  lf
mac	mac	win-crlf.txt	_  cr  lf  cr  lf   _  cr  lf  cr  lf
mac	share	mac-cr.txt	_  lf   _  lf
mac	share	unix-lf.txt	_  lf   _  lf

My BartPE plugins

I have updated my list of BartPE plugins here.

For the plugins listed as a patch of another plugin, a plugin.diff file is included detailing what was changed from the original plugin.

Also see pebuilder.mak, a make file I created to automatically build and burn a BartPE disk with a single command.

Of course, before I run pebuilder.mak, I slipstream SP2 and apply all the latest security patches using xpsp2.mak.

I've ported Samba 3.0.14a to Windows (Cygwin) (via a plugin for BartPE)

A Samba plugin is now available at It uses a Cygwin port of Samba 3.0.14a. Here's the makefile samba.mak and the patch samba-3.0.14a.cygwin.patch.

The plugin's help file is available here. This plugin requires the Cygwin plugin

You can also run Samba inside "normal" Windows, such as XP, 2003, or 2000. Details are here.

I've ported email 2.3.4 to Windows (Cygwin)

Using this Makefile and this patch, I ported email 2.3.4 to Windows (Cygwin). Email is a great little utility, one that I use every day. Here's the blurb for it:

Command line sending of email, optionally with GnuPG encryption.
Email is a simple command-line program to send emails. It can be configured
to use either your sendmail installation or directly via SMTP.
It supports binary attachments, and a simple text based address book, with groups.
Also, if GnuPG is installed, it can digitally sign and encrypt outgoing emails.

mkisofs and cdrecord 2.01 for Windows (Cygwin) (Updated binaries)

Using the makefile cdrecord.mak, I compiled version 2.01 of cdrecord for Windows.

The resultant binaries (cdrecord, mkisofs, etc.) are available as

In order to compile under Cygwin 1.5.23, I applied the patch cdrtools-2.01.cygwin.patch.

You can use these without installing Cygwin, but you will need to have cygwin1.dll (included) in the same directory as the commands, or copy it to somewhere in your PATH.

If you have, or later install, Cygwin, you will need to delete the included cygwin1.dll, as Cygwin will not operate correctly if there two or more instances of cygwin1.dll.

Using the makefile cdrecord_dvdpatch.mak, I compiled a version of cdrecord that supports burning DVDs. The binaries are available as

This version was produced using the following patches:

  1. cdrtools-2.01.01-dvd.patch.bz2 (From Warly)
  2. cdrtools-2.01a27-o_excl.patch.bz2 (From Warly)

Added two new cdrecord plugins for BartPE

I've created two new plugins to run cdrecord & mkisofs in BartPE.

1. cdrecord - cdrecord 2.01

This version includes version 2.01 of cdrecord compiled for native Windows, found at (mirrored at It requires msvcrt.dll to be in the path, which is true for BartPE.

2. cdrecord_cygwin - cdrecord 2.01.01a01 (includes a patched version of cdrecord to burn DVDs called dvdrecord)

This version includes version 2.01.01a01 of cdrecord compiled using Cygwin. It requires cygwin1.dll to be in the path. So you will either need to also include the Cygwin plugin, or copy cygwin1.dll to SYSTEM32 or another folder in the path.

If you aren't using Cygwin, and don't need to burn DVDs, use cdrecord, otherwise use cdrecord_cygwin.

Automating the building of a BartPE bootable disk (updated for pebuilder 3.1.3)

To automate the tedious process of building a bootable BartPE disk, I created the Makefile pebuilder.mak to build a BartPE disk with a single command.

To build the disk, all you need to type is:

$ make -f pebuilder.mak

The Makefile, and the supporting files are available as

Of course, to run make, you will need to install Cygwin and select the make and wget packages. Alternatively, you could unzip, which contains only the executables needed to run make.

It helps speed the build process by telling pebuilder to not build the .ISO. It then calls InfCacheBuilder, and then calls mkisofs. Finally, it calls cdrecord. A Windows version of cdrecord is available as

Also included is inirw.exe, a small C program I wrote to read and write .ini files. inirw.exe is also available separately (including source) as

I installed DSPAM 3.0 at my ISP

I installed DSPAM 3.0 at my ISP. It was pretty easy. I followed the instructions at and Unfortunately, the later is for DSPAM 2 and needed some changes. Here's what I did.

Migrating from CVS to Perforce

Here's a simple Cygwin script to migrate files from a CVS repository to Perforce.

Make sure the directory you are in, is prefaced with /cygdrive, or cygpath gets confused.


REPOSITORIES="example1 example2"

PWD=`cygpath -w \`pwd\``
p4 edit ...

for repo in $REPOSITORIES
	cvs export -r HEAD $repo

find . -type f -printf '"%P" ' | p4 -x - add
p4 submit

I finally released Freebeer

After a long wait, I finally released Freebeer, A PHP application framework.

It needs a lot of more work, especially web site documentation, but at least its posted.

A better ssh-copy-id

For whatever reason, ssh-copy-id
(or try ssh-copy-id)

doesn't seem to work for me.

So I wrote a script to perform the same function,

It works in both *nix and Cygwin.

OpenOffice rocks

I finally converted my resume to OpenOffice format. The HTML version is very clean now, not like the spew Word 9 spits out.

It even outputs to PDF format, even if you don't have Acrobat or GhostScript installed.

DSPAM for Cygwin

Here's a patch to compile DSPAM for Windows.

And here's the Makefile dspam.mak to build it.

Backported OpenVPN 1.5.0 to Woody

I backported OpenVPN from Debian Unstable (Sid) to Stable (Woody). Works great.

The file is openvpn_1.5.0-1.woody-1_i386.deb.

Here's a Makefile to build it on Cygwin/*nix.

Syndicate content
Donate Bitcoins
Special thanks to Riester Rente Online for a generous donation!