[kwlug-disc] Server does not boot after kernel upgrade

Khalid Baheyeldin kb at 2bits.com
Thu Jan 31 19:28:49 EST 2019


So, another day, another kernel update, and the server can't reboot again.
Also, found out that another machine (out of a total of 6 that have 18.04)
also suffers from this (does not reboot successfully).

After a lot of troubleshooting, here is what worked. Basically,
re-installing
grub followed by rebuilding the initramfs images, clears up whatever was
causing this issue:

If you are doing this from a Live DVD, then do this:

Find out which partition is your root partition
# blkid

Mount it
# mount /dev/sda1 /mnt

Then a bunch of other virtual file systems
# for i in /proc /sys /run /dev ; do sudo mount --bind $i /mnt/$i; done

Change root to your disk's root
# chroot /mnt

On the other hand If you can boot from grub, then do the following:

Find out the device that has your root partition:
# blkid

Say it is /dev/sda, you then install grub:
# grub-install /dev/sda

Then create a ramfs for all the kernels that are installed
# update-initramfs -c -k all

And update Grub
# update-grub

Reboot and see if the system comes up on its own, with the latest kernel
# shutdown -r now

The above assumes that your /boot directory is not on a separate partition
(and I intentionally keep it this way since it will fill up and upgrades
fail, and
you are stuck).

Also if you have EFI, you will have to also mount its partition. The only
system
that I have with EFI was not affected by this reboot failure thing.

The real proof is when another kernel update comes in and goes seemlessly.

On Tue, Jan 29, 2019 at 4:15 PM Khalid Baheyeldin <kb at 2bits.com> wrote:

> Now, that server does not boot, with this kernel panic:
>
> "Kernel Panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(0,0)"
> Followed by a stack trace.
>
> Searching around the recommended remedy is this, from a bootable DVD:
>
> # mount /dev/sda1 /mnt
> # mount --bind /dev /mnt/dev
> # mount --bind /dev/pts /mnt/dev/pts
> # mount --bind /proc /mnt/proc
> # mount --bind /sys /mnt/sys
> # chroot /mnt
> # update-initramfs -c -k 4.15.0-44-generic
> # update-grub2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20190131/110ceb34/attachment.htm>


More information about the kwlug-disc mailing list