Initrd.img and vmlinuz updates are breaking system boot

Got this issue where if I do an apt update then mate/ubunutu 17.04 updates both initrd.img and vmlinuz from 21 to 22. When that is done and the machine is rebooted it never boots successfully. Gives kernal panic after reporting it can’t mount the root partition.

If I boot a recovery OS (same mate on a stick) and copy over the initrd.img and vmlinzu (21) and copy as well the symbolic links in the root which point to versions 21 then I can boot again successfully.

So

  1. I need to stop this update.
  2. I need to know why this update is causing my machine to fail to boot. Is this a unbuntu or mate bug for 17.04?? I don’t see why updating these should be an issue.

BTW I don’t use grub. I use rEFind which searches for initrd’s to boot and creates an automatic boot stanza much like grub.

There can be multiple copies, one for each sequential revision of the kernel. I forget whether i’m running rev-75 or rev-77 atm. They’ll sit there on your drive until they collectively eat up enough space that you get rid of the old ones. If you use synaptic there is a “category” called something like “automatically uninstallable” and it should list all the kernels except the most recent one(s).

Whenever a new kernel is installed, part of the install script updates grub.cfg to use the new kernel, and basically messes with your boot screen. It is possible to manually edit grub.cfg to select the kernel you want to use. I just always use the bootSetup utility i wrote in PHP to set things up the way i want them, so i have fewer buttons to push every time i boot.

The next time the kernel is updated it will “re-fix” things again, so this can become an ongoing issue, but i’d suggest that you make a backup copy of grub.cfg and then manually edit it to run the kernel of your choice. That should hopefully keep you going on the last kernel that worked until the next update comes out and you can see how that one goes.

Whichever upstream kernel i’m using (and i believe that systemd gets updated with these, though i can’t tell you where to look to prove that, but the initfs is after all the initfs and that’s probably where i’d put it) is hit-and-miss on the bootup, so i update things occasionally to see if things work better yet. I’m getting by okay, though sometimes it takes me 3-5 attempts to actually get to the login screen with all the fstab mounts in place.

fwiw, hth…