Saturday, April 27, 2024
12
rated 0 times [  12] [ 0]  / answers: 1 / hits: 31557  / 2 Years ago, thu, june 16, 2022, 6:04:31

Today I ran a script to fix some issues on an Acer One 10 S1003. When the script finished running, this message appeared.


All done, please regenerate your initramfs and reboot

I want to know what "regenerate your initramfs" means.


More From » software-installation

 Answers
5

To create/recreate/update the initramfs file means to update the initrd.img-* ramdisk files in /boot.


Here's a listing of my /boot. Note the size/date of the initrd.img-* files. One or more of these need updating in your case.


~$ ls -al /boot
total 162745
drwxr-xr-x 4 root root 4096 Jul 5 05:19 .
drwxr-xr-x 23 root root 4096 Jun 19 12:40 ..
-rw-r--r-- 1 root root 252994 May 7 05:38 config-5.11.0-18-generic
-rw-r--r-- 1 root root 253022 Jun 16 15:38 config-5.11.0-22-generic
drwxr-xr-x 3 root root 1024 Dec 31 1969 efi
drwxr-xr-x 5 root root 4096 Jun 30 12:09 grub
lrwxrwxrwx 1 root root 28 Jun 25 12:42 initrd.img -> initrd.img-5.11.0-22-generic
-rw-r--r-- 1 root root 62066094 Jul 5 05:19 initrd.img-5.11.0-18-generic
-rw-r--r-- 1 root root 62067859 Jul 5 05:18 initrd.img-5.11.0-22-generic
lrwxrwxrwx 1 root root 28 Jun 25 12:42 initrd.img.old -> initrd.img-5.11.0-18-generic
-rw-r--r-- 1 root root 182704 Aug 18 2020 memtest86+.bin
-rw-r--r-- 1 root root 184380 Aug 18 2020 memtest86+.elf
-rw-r--r-- 1 root root 184884 Aug 18 2020 memtest86+_multiboot.bin
-rw------- 1 root root 5968565 May 7 05:38 System.map-5.11.0-18-generic
-rw------- 1 root root 5969489 Jun 16 15:38 System.map-5.11.0-22-generic
lrwxrwxrwx 1 root root 25 Jun 25 12:42 vmlinuz -> vmlinuz-5.11.0-22-generic
-rw------- 1 root root 14737344 May 7 06:26 vmlinuz-5.11.0-18-generic
-rw------- 1 root root 14741312 Jun 16 15:55 vmlinuz-5.11.0-22-generic
lrwxrwxrwx 1 root root 25 Jun 25 12:42 vmlinuz.old -> vmlinuz-5.11.0-18-generic

Note: I prefer to create a totally fresh version by using the -c option, instead of just updating the existing file by using the -u option.


The proper command would be:


sudo update-initramfs -c -k $(uname -r)


This will create a fresh initrd.img-* file for your currently booted version of Ubuntu.


However, if you can't boot to the current version of Ubuntu, you may have to modify this command, and by booting to an older version of Ubuntu, you can do it this way:


sudo update-initramfs -c -k 5.11.0-22-generic where the 5.11.0-22-generic part should be replaced with the version of the desired boot kernel.


To regenerate all of the initrd.img-* files (not recommended), use:


sudo update-initramfs -c -k all


To get more detailed information, type:


man update-initramfs


[#1349] Friday, June 17, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
suspengn

Total Points: 477
Total Questions: 104
Total Answers: 100

Location: Rwanda
Member since Thu, Feb 10, 2022
2 Years ago
suspengn questions
Wed, Oct 5, 22, 14:50, 2 Years ago
Wed, Jul 28, 21, 20:58, 3 Years ago
Tue, Mar 8, 22, 17:23, 2 Years ago
Thu, May 25, 23, 00:47, 1 Year ago
;