Welcome! Log In Create A New Profile

Advanced

initramfs-tools updated; need to re-run mkimage?

Posted by ayrlander 
initramfs-tools updated; need to re-run mkimage?
September 28, 2010 01:25PM
I ran "aptitude full-upgrade" today, as is my habit for keeping my packages up to date. I noticed that the initramfs-tools package was upgraded. Which is fine, but then I saw:
update-initramfs: Generating /boot/initrd.img-2.6.32-5-kirkwood

After that, I checked /boot and saw that indeed the initrd.img file had been updated. But, uInitrd had not. Question: any time the vmlinuz file or the initrd file get updated, should we run these commands from the install script?
/usr/bin/mkimage -A arm -O linux -T kernel  -C none -a 0x00008000 -e 0x00008000 -n Linux-2.6.32-5 -d /boot/vmlinuz-2.6.32-5-kirkwood /boot/uImage
/usr/bin/mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs -d /boot/initrd.img-2.6.32-5-kirkwood /boot/uInitrd
ecc
Re: initramfs-tools updated; need to re-run mkimage?
September 28, 2010 03:08PM
ayrlander Wrote:
-------------------------------------------------------
> Question: any time the vmlinuz file or the initrd file get updated, should we run
> these commands from the install script?
> [...]

Yes (as long as you have a fallback -- like Jeff's recovery system -- in case the new kernel doesn't boot). That should be all you need if you have u-boot reading them from the /boot filesystem. If you're using a raw uImage partition, you need to flash it there as well.

You can automate the uImage conversion by putting the script in /etc/kernel/postinst.d/. There's a proposal for a similar "hook" directory for update-initramfs (which can be called by various packages even when the kernel isn't being updated), but I don't think it's been implemented yet.
Re: initramfs-tools updated; need to re-run mkimage?
September 28, 2010 04:52PM
Most of your first paragraph was over my head. :-) Standard uBoot install on the Dockstar, no rescue system yet, just the default Pogoplug firmware, no clue what a raw uImage partition is. So I simply ran mkimage for uInitrd, since that's all that got updated by aptitude, and next time I reboot I'll cross my fingers. :-) But it's good to know that every time the initrd or vmlinuz get updated in Debian, mkimage needs to be run again.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: