Howto use update-initramfs

Asked by Shirish Agarwal

Hi all,
 I've been trying to manually update the initramfs . One command which I came to know is

sudo update-initramfs -u ALL

but this only updates the initramfs for the current kernel .

what about if I want the the initramfs to be updated for all kernels ?

I tried doing this :-

shirish@Mugglewille:~$ sudo update-initramfs all
[sudo] password for shirish:
You must specify at least one of -c, -u, or -d.

Usage: /usr/sbin/update-initramfs [OPTION]...

Options:
 -k [version] Specify kernel version or 'all'
 -c Create a new initramfs
 -u Update an existing initramfs
 -d Remove an existing initramfs
 -t Take over a custom initramfs with this one
 -b Set alternate boot directory
 -v Be verbose
 -h This message

Then doing this :-

shirish@Mugglewille:~$ sudo update-initramfs -u all
update-initramfs: Generating /boot/initrd.img-2.6.24-12-generic

I have 2.6.24-11-generic as well & wanna update the initramfs for that kernel as well.

shirish@Mugglewille:~$ sudo update-initramfs -k 2.6.24-11-generic
You must specify at least one of -c, -u, or -d.

Usage: /usr/sbin/update-initramfs [OPTION]...

Options:
 -k [version] Specify kernel version or 'all'
 -c Create a new initramfs
 -u Update an existing initramfs
 -d Remove an existing initramfs
 -t Take over a custom initramfs with this one
 -b Set alternate boot directory
 -v Be verbose
 -h This message

Any ideas or clues as to how I can do this would be appreciatable .

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu initramfs-tools Edit question
Assignee:
No assignee Edit question
Solved by:
Bhavani Shankar
Solved:
Last query:
Last reply:
Revision history for this message
Bhavani Shankar (bhavi) said :
#1

Hello Shirish..

Try out:

sudo update-initramfs -u -k 2.6.24-11-generic

Regards,

Bhavani Shankar.

Revision history for this message
Shirish Agarwal (shirishag75) said :
#2

it does solve my query, but partly. My real query is how do I make sure to update all of the kernels at the same time. Is there a way?

Revision history for this message
Best Bhavani Shankar (bhavi) said :
#3

Try

sudo update-initramfs -u -k all

Regards

Bhavani Shankar.

Revision history for this message
Shirish Agarwal (shirishag75) said :
#4

Thanks Bhavani Shankar, that solved my question.