Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just tried to install dracut, a replacement for the initramfs-tools on a fresh Ubuntu 12.10 server to use the advanced features of dracut for booting from NFS over two bonded interfaces.

Unfortunately the installation encountered the following conflict:

root@ubuntu:~# aptitude install dracut
The following NEW packages will be installed:
  cryptsetup{a} cryptsetup-bin{a} dmraid{a} dracut{b} kpartx{a} kpartx-boot{a} libcryptsetup4{a} libdevmapper-event1.02.1{a} libdmraid1.0.0.rc16{a} libreadline5{a} lvm2{a} mdadm{a} postfix{a} ssl-cert{a} watershed{a} 
0 packages upgraded, 15 newly installed, 0 to remove and 2 not upgraded.
Need to get 3,004 kB of archives. After unpacking 8,428 kB will be used.
The following packages have unmet dependencies:
 dracut : Conflicts: initramfs-tools but 0.103ubuntu0.2 is installed.
          Conflicts: initramfs-tools:i386 which is a virtual package.
The following actions will resolve these dependencies:
     Keep the following packages at their current version:
1)     dracut [Not Installed]                             
Accept this solution? [Y/n/q/?] 

The proposed solution "dracut [Not Installed]" does not help. Unfortunately I didn't find much information on dracut on Ubuntu so that I could identify if it should work. I found the following bug report in debian which is unsolved until now: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=669342

I quickly tested the installation of dracut on a Ubuntu 12.04 server and it installed fine, but I need it for Ubuntu 12.10.

I already tried to force dpkg to ignore the conflicts, but the result was the same

aptitude -o Dpkg::Options::="--force-conflicts" install dracut

Installing dracut from source is working, but to include network setup in the initramfs, the package dracut-network is needed which I couldn't find the sources for and even so it's available in Ubuntu 12.10 it depends on the dracut package...

Can someone help me how to install dracut and maybe share some insides on why it's so hard to use dracut in Ubuntu?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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.)

share|improve this answer
    
I couldn't get the package to install even when I used dpkg --force-all -r initramfs-tools. I filed a bug report, but as it's the first I ever did on launchpad I would be glad if you could review it and maybe add additional information regarding the correct dependencies / conflicts. –  Florian Feldhaus Jan 29 '13 at 15:40
    
@FlorianFeldhaus: You cannot use apt-get to install the package, even after removing initramfs-tools. You need to download the dracut DEB package and install it using dpkg --force-all -i. –  Andrea Corbellini Jan 29 '13 at 15:59

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.debian.org/collab-maint/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
share|improve this answer

Your Answer

 
discard

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.