The problem here is that Aptitude does not suggest you remove initramfs, because it is considered a core package, and Aptitude never proposes to remove core packages.

The only obvious way to work around this problem would be to tell Aptitude to remove initramfs-tools:

aptitude install dracut initramfs-tools-

However, if you try this command, you'll see that it triggers other important dependency problems:

The following packages have unmet dependencies:
 dmsetup : Depends: initramfs-tools but it is not going to be installed.
 console-setup : Depends: initramfs-tools (>= 0.85eubuntu12) but it is not going to be installed.
 linux-image-3.5.0-22-generic : Depends: initramfs-tools (>= 0.36ubuntu6) but it is not going to be installed.
 linux-image-3.5.0-17-generic : Depends: initramfs-tools (>= 0.36ubuntu6) but it is not going to be installed.
 kpartx-boot : Depends: initramfs-tools but it is not going to be installed.
 [...]

All that packages should actually depend on linux-initramfs-tools (which is a virtual package provided by both initramfs-tools and dracut). This is a bug, and should be reported as such.

In short, the only solution is to modify the dependencies of that packages. With the current situation, you cannot install dracut without having broken packages. (Though, if it's OK for you to have broken packages, then you can play with dpkg --force-all, remove initramfs-tools and install dracut.)


Thanks to the help from Andrea Corbellini the problem has been identified and is tracked in the bug report Package dracut cannot be installed on Ubuntu 12.10. The underlying issue is tracked in the bug report Depend on linux-initramfs-tools. Any help on increasing awareness to the last bug report so that it gets resolved as soon as possible is very much appreciated.

Together with the Debian maintainer of the dracut package, we came up with a workaround for installing dracut by removing the conflict to initramfs-tools. Detailed information can be found in the blog post Installing and configuring dracut to boot Ubuntu 12.10 from an NFS-root over a VLAN tagged network using bonded interfaces.

In short the steps are

sudo apt-get build-dep dracut # install build dependencies for dracut
sudo apt-get install dpkg-dev # install dpkg-dev to build dracut .deb package
cd ~                          # change to your home folder
git clone git://git.kernel.org/pub/scm/boot/dracut/dracut.git # checkout dracut
cd dracut
sed -i 's/Conflicts: initramfs-tools/Conflicts: /' debian/control # fix conflict
sed -i 's/usr\/etc/etc/g' debian/dracut.install # fix another issue
dpkg-buildpackage -b          # build .deb packages
cd ..
dpkg -i dracut*.deb           # install dracut and dracut-network