Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

During the Ubuntu Server setup, I was given a choice to install a 'targeted' initrd with only the modules my computer needs. I chose the other option, 'generic'. How can I install a 'targeted' initrd now that I've already installed my system?

share|improve this question
up vote 3 down vote accepted

Edit /etc/initramfs-tools/initramfs.conf and change




then run

update-initramfs -u
share|improve this answer
For reference (couldn't find this elsewhere), my initrd went from 13M to 3.5M by doing this and, on a slow system, pretty significantly improved boot speed. – Luc Jul 17 '14 at 23:12

Switching initrd type

As you correctly pointed out yourself, change the initramfs-tools MODULE= setting from most to dep or the other way around, depending on your wishes.

Note, however, that hooks in /etc/initramfs-tools/conf.d overrule the setting from /etc/initramfs-tools/initramfs.conf. A file driver-policy is created there when choosing a targeted initrd, at least on Debian (Jessie), that has MODULES=dep.

Reasons for generic initrd

You might be interested in going the other way around (towards generic initrd) if you miss USB keyboard support for your LUKS password on boot. It seems the dep option fails to detect the necessity for keyboard support.

Report examples:

If you like your lean targeted initrd, you might want to include modules hid_generic and usbhid in /etc/initramfs-tools/modules for USB keyboards to work in initrd. Might be xhci_hcd is also required if you use a USB3.0 controller to connect your keyboard

share|improve this answer

You probably want to install the linux-image-server package.

share|improve this answer
I already have this installed. – Delan Azabani Dec 3 '10 at 10:26
I am not aware of any other kernel flavor, never heard of a "targeted" kernel. Both the generic and server kernels contain the core drivers built-in, drivers for additional hardware is available from modules which are only loaded if required. – João Pinto Dec 3 '10 at 10:30
The option to choose between a 'generic' and 'targeted' kernel is given only if 'Export mode' is enabled in the setup. – Delan Azabani Dec 3 '10 at 10:31

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.