Eero Volotinen
2016-Oct-30 21:05 UTC
[CentOS] Cannot boot CentOS 7 VM after updating Host CentOS 7 Kernel
so, Just chroot to mountpoint: http://www.cyberciti.biz/faq/unix-linux-chroot-command-examples-usage-syntax/ chroot /mounted/path /bin/bash and then .. mkinitrd (see man page for documentation) 2016-10-30 22:57 GMT+02:00 Eero Volotinen <eero.volotinen at iki.fi>:> A bit hard to say. Try chrooting into environment and rebuilding initrd? > > -- > Eero > > 2016-10-30 22:53 GMT+02:00 Paul R. Ganci <ganci at nurdog.com>: > >> On 10/30/2016 12:26 PM, Paul R. Ganci wrote: >> >>> <snip>I am thinking of putting the CentOS iso out and then booting the >>> VM into it just to poke around the file system. Otherwise my other option >>> is to just clone a twin VM on another server and then just change the >>> networking IPs/hostname. Anybody have any other ideas as to how to debug >>> this problem? >>> >> So I booted off the CentOS-7-x86_64-DVD-1511.iso and everything looks >> just fine: >> >> > df >> Filesystem 1K-blocks Used Available >> Use% Mounted on >> /dev/mapper/live-rw 2030899 949022 1077781 47% / >> devtmpfs 2004040 0 2004040 >> 0% /dev >> tmpfs 2023652 0 2023652 >> 0% /dev/shm >> tmpfs 2023652 8520 2015132 >> 1% /run >> tmpfs 2023652 0 2023652 >> 0% /sys/fs/cgroup >> /dev/sr1 4227724 4227724 0 100% >> /run/install/repo >> tmpfs 2023652 200 2023452 >> 1% /tmp >> /dev/mapper/centos-root 10799104 3894196 6904908 37% >> /mnt/sysimage >> /dev/vda1 508588 143516 365072 29% >> /mnt/sysimage/boot >> tmpfs 2023652 0 2023652 >> 0% /mnt/sysimage/dev/shm >> >> > ls /mnt/sysimage >> bin boot dev etc home lib lib64 media misc mnt net >> opt proc root run sbin srv sys tmp usr var >> >> > ls -l /mnt/sysimage/boot >> total 109424 >> -rw-r--r--. 1 root root 126431 Oct 10 23:18 >> config-3.10.0-327.36.2.el7.x86_64 >> drwxr-xr-x. 2 root root 26 Oct 2 2015 grub >> drwx------. 6 root root 104 Oct 13 02:21 grub2 >> -rw-r--r--. 1 root root 40655493 Apr 3 2015 >> initramfs-0-rescue-6494b5d98adc4f66b0cf4c19a0f6ab66.img >> -rw-------. 1 root root 29666884 Oct 13 01:25 >> initramfs-3.10.0-327.36.2.el7.x86_64.img >> -rw-------. 1 root root 18119089 Oct 13 02:20 >> initramfs-3.10.0-327.36.2.el7.x86_64kdump.img >> -rw-r--r--. 1 root root 10190975 Dec 19 2015 initrd-plymouth.img >> -rw-r--r--. 1 root root 252739 Oct 10 23:20 >> symvers-3.10.0-327.36.2.el7.x86_64.gz >> -rw-------. 1 root root 2965270 Oct 10 23:18 >> System.map-3.10.0-327.36.2.el7.x86_64 >> -rwxr-xr-x. 1 root root 4902656 Apr 3 2015 >> vmlinuz0-rescue-6494b5d98adc4f66b0cf4c19a0f6ab66 >> -rwxr-xr-x. 1 root root 5157936 Oct 10 23:18 >> vmlinuz-3.10.0-327.36.2.el7.x86_64 >> >> So the CentOS DVD iso in linux rescue mode shows that everything is there >> and can be mounted. I guess that means somehow either grub itself is >> corrupted or one of the boot images. So is there a way for me to generate a >> new initrd while booted in linux resuce mode or will re-installing grub >> help? How would I attempt re-installing grub while booted in linux rescue >> mode? >> >> -- >> Paul (ganci at nurdog.com) >> Cell: (303)257-5208 >> _______________________________________________ >> CentOS mailing list >> CentOS at centos.org >> https://lists.centos.org/mailman/listinfo/centos >> > >
Paul R. Ganci
2016-Oct-30 23:31 UTC
[CentOS] Cannot boot CentOS 7 VM after updating Host CentOS 7 Kernel
On 10/30/2016 03:05 PM, Eero Volotinen wrote:> so, Just chroot to mountpoint: > > http://www.cyberciti.biz/faq/unix-linux-chroot-command-examples-usage-syntax/ > > chroot /mounted/path /bin/bash and then .. mkinitrd (see man page for > documentation)Thank you for the hint. The way I fixed this problem was to do this: 1.) Booted into linux rescue mode using the CentOS-7-x86_64-DVD-1511.iso 2.) chroot /mnt/sysimage 3.) Used nmtui to setup a network 4.) yum update (installed the 3.10.0-327-36.3.el7.x86_64 kernel) 5.) grub2-mkconfig -o /boot/grub2/grub.cfg 6.) yum reinstall kernel*-3.10.0-327-36.3.el7.x86_64 Step 5 was necessary because of a grubby error indicating that there was no suitable template. Step 6 was necessary because according to the googled page I found regarding step 5 indicated that the default kernel would not be that found in step 4. I probably could have skipped step 4 and just done steps 5 and 6. But the VM is now up and running the latest kernel. Now the question is how did this happen. My best guess is that the VM was unhappy when I booted the host while it was running. Is rebooting the host without shutting down guests first a risky thing to do? -- Paul (ganci at nurdog.com) Cell: (303)257-5208
Steven Tardy
2016-Oct-31 00:54 UTC
[CentOS] Cannot boot CentOS 7 VM after updating Host CentOS 7 Kernel
> On Oct 30, 2016, at 7:31 PM, Paul R. Ganci <ganci at nurdog.com> wrote: > > Now the question is how did this happen.I've seen something similar when installing a kernel if /etc/fstab didn't match df. Mkinitrd bombs out leaving the system unbootable. The rescue .iso/mkinitrd path you followed was the fastest way to get the system up.