I'm running LILO, so I selected which kernel image I wanted to boot, then typed init=/bin/bash
This eventually dropped me into a root shell with / mounted as read-only. I couldn't edit the /etc/init.d/inetd
file at that point, so I remounted / in read-write mode with mount -n /proc
then mount -o rw,remount /
. Opened up the /etc/init.d/inetd
again, took out the problematic line, and I was all set.
Still trying to figure out how to remove inetd with dpkg.. and also how the heck inetd got installed. Weird. Just thought I would share my solution in case anyone had a similar problem and came across this thread in the future.
: I also found this on the Debian site.
# FIXME: this is quick and dirty; replace with a more robust script snippet
for i in `sudo lsof -i | grep LISTEN | cut -d " " -f 1 |sort -u` ; do
pack=`dpkg -S $i |grep bin |cut -f 1 -d : | uniq`
echo "Service $i is installed by $pack";
init=`dpkg -L $pack |grep init.d/ `
if [ ! -z "$init" ]; then
echo "and is run by $init"