Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to install pkg in a limited space embedded system. I use busybox's dpkg. To let dpkg work, I just touch a file

touch /var/lib/dpkg/status                                               

But, it still can not work.

$dpkg -i ntpdate_4.2.4p4+dfsg-8lenny3_sh4.deb                           
dpkg: package ntpdate depends on netbase, which is not installed or flagged to be installed

How to flag the netbase as installed? I mean cheat to let dpkg treat it could install.

share|improve this question

2 Answers 2

You need dpkg to ignore dependencies, use the following command:

dpkg -i --force-depends mypackage.deb

Or, in case you have more problems arising, use:

dpkg -i --force-all mypackage.deb

But be warned, package dependencies are almost always true dependencies, as in, the program might be linked against them.

And using the above commands, will install the package fine, but dpkg will label it as broken.

share|improve this answer
Hi @Waleed, --force-depends doesn't help with a completely uninitialised dpkg system. --force-all is not recognised by busybox flavor of dpkg. I've updated the question to reflect that. Kind regards, Rob –  Robert Ševčík - Robajz Feb 3 at 19:19

The answer might be to use debootstrap anyway. Here's a howto

The process I managed to use is with the --foreign parameter, which creates a root filesystem ready to be bootstrapped. My command:

debootstrap --foreign --arch amd64 --variant minbase \
   --keyring /usr/share/keyrings/debian-keyring.gpg \
   jessie debstaged

cd debstaged
tar -czf ../iso/debstaged.tar.gz *
cd ..

The root filesystem tar/gzipped is in my iso folder that I use to create a bootable CD

Once I boot the CD which only has a minimalist busybox initramfs, I can simply untar that filesystem and complete the installation:

mount /dev/sr0 /mnt
mkdir /tmp/root
mount -t tmpfs debroot /tmp/root
cd /tmp/root
tar -xzf /mnt/debstaged.tar.gz
umount /mnt
chroot . /debootstrap/debootstrap --second-stage

At this point, I have a ready configured debian system root in /tmp/root.

The answer is obviously incomplete, but if we could figure which files are necessary and manage to debinify the busybox system, there could be a way. This resource was quite helpful as well -

I should be able to switch to the new root like that, but my kernel doesn't have devtmpfs which is required by systemd init:

echo > /proc/sys/kernel/hotplug
umount /proc
umount /sys

exec switch_root -c /dev/console /tmp/root /sbin/init

Kind regards, Rob

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.