2

how does one verify the bootability of initramfs image without actually rebooting the system -- the reason why we need this is - suppose if one takes the system for a short window and suddenly finds that the initramfs image is corrupt and has to do recovery

one idea I got is to transfer this image to a Virtual machine and boot it off of that ..?

can we extract the image and compare its contents to a golden image , so to speak . image which we think is not damaged.

thanks, ~Sai

1 Answers1

1

You can use qemu to test your initramfs files.

qemu-kvm -kernel /boot/vmlinuz-3.19.3-200.fc21.x86_64 \
  -initrd /boot/initramfs-3.19.3-200.fc21.x86_64.img \
  -hda foo

The system will obviously fail to boot since the hda option points to a dummy file. It should be enough to prove that an initramfs is bootable, though. Provide a valid qcow image if in doubt.

dawud
  • 14,918
  • 3
  • 41
  • 61