Skip to main content
added 334 characters in body
Source Link
yaegashi
  • 12.6k
  • 2
  • 39
  • 42

Read initramfs-tools manual and write a hook script. You can look at system supplied scripts placed in /usr/share/initramfs-tools/hooks/ for your reference. Your own script should go in /etc/initramfs-tools/hooks/. Scripts in both folders are merged and executed resolving its dependencies by mkinitramfs.

In a temporary folder, you can generate initramfs and examine its contents.

mkinitramfs -o initramfs.gz zcat initramfs.gz | cpio -id initramfs.gz 

Once it looks ready, update system initramfs in /boot using update-initramfs -u.

EDIT: I misunderstood your problem.

You can see hook script dirs in /etc/kernel which are called by postinst/postrm/preinst/prerm scripts of each kernel package. update-initramfs is invoked in /etc/kernel/postinst.d/initramfs-tools, so you can add another script there which will be called after initramfs-tools.

Read initramfs-tools manual and write a hook script. You can look at system supplied scripts placed in /usr/share/initramfs-tools/hooks/ for your reference. Your own script should go in /etc/initramfs-tools/hooks/. Scripts in both folders are merged and executed resolving its dependencies by mkinitramfs.

In a temporary folder, you can generate initramfs and examine its contents.

mkinitramfs -o initramfs.gz zcat initramfs.gz | cpio -id initramfs.gz 

Once it looks ready, update system initramfs in /boot using update-initramfs -u.

Read initramfs-tools manual and write a hook script. You can look at system supplied scripts placed in /usr/share/initramfs-tools/hooks/ for your reference. Your own script should go in /etc/initramfs-tools/hooks/. Scripts in both folders are merged and executed resolving its dependencies by mkinitramfs.

In a temporary folder, you can generate initramfs and examine its contents.

mkinitramfs -o initramfs.gz zcat initramfs.gz | cpio -id initramfs.gz 

Once it looks ready, update system initramfs in /boot using update-initramfs -u.

EDIT: I misunderstood your problem.

You can see hook script dirs in /etc/kernel which are called by postinst/postrm/preinst/prerm scripts of each kernel package. update-initramfs is invoked in /etc/kernel/postinst.d/initramfs-tools, so you can add another script there which will be called after initramfs-tools.

added 1 character in body
Source Link
yaegashi
  • 12.6k
  • 2
  • 39
  • 42

Read initramfs-tools manual and write a hook script. You can look at system supplied scripts placed in /usr/share/initramfs-tools/hooks/ for your reference. You Your own script should go in /etc/initramfs-tools/hooks/. Scripts in both folders are merged and executed resolving its dependencies by mkinitramfs.

In a temporary folder, you can generate initramfs and examine its contents.

mkinitramfs -o initramfs.gz zcat initramfs.gz | cpio -id initramfs.gz 

Once it looks ready, update system initramfs in /boot using update-initramfs -u.

Read initramfs-tools manual and write a hook script. You can look at system supplied scripts placed in /usr/share/initramfs-tools/hooks/ for your reference. You own script should go in /etc/initramfs-tools/hooks/. Scripts in both folders are merged and executed resolving its dependencies by mkinitramfs.

In a temporary folder, you can generate initramfs and examine its contents.

mkinitramfs -o initramfs.gz zcat initramfs.gz | cpio -id initramfs.gz 

Once it looks ready, update system initramfs in /boot using update-initramfs -u.

Read initramfs-tools manual and write a hook script. You can look at system supplied scripts placed in /usr/share/initramfs-tools/hooks/ for your reference. Your own script should go in /etc/initramfs-tools/hooks/. Scripts in both folders are merged and executed resolving its dependencies by mkinitramfs.

In a temporary folder, you can generate initramfs and examine its contents.

mkinitramfs -o initramfs.gz zcat initramfs.gz | cpio -id initramfs.gz 

Once it looks ready, update system initramfs in /boot using update-initramfs -u.

Source Link
yaegashi
  • 12.6k
  • 2
  • 39
  • 42

Read initramfs-tools manual and write a hook script. You can look at system supplied scripts placed in /usr/share/initramfs-tools/hooks/ for your reference. You own script should go in /etc/initramfs-tools/hooks/. Scripts in both folders are merged and executed resolving its dependencies by mkinitramfs.

In a temporary folder, you can generate initramfs and examine its contents.

mkinitramfs -o initramfs.gz zcat initramfs.gz | cpio -id initramfs.gz 

Once it looks ready, update system initramfs in /boot using update-initramfs -u.