[CentOS] CentOS 7 cloned VM cannot boot

Fri May 5 12:45:12 UTC 2017
Gianluca Cecchi <gianluca.cecchi at gmail.com>

On Fri, May 5, 2017 at 2:38 PM, Nikolaos Milas <nmilas at noa.gr> wrote:

> On 5/5/2017 3:15 μμ, Gianluca Cecchi wrote:
>
> ...
>> grub2-install /dev/vda
>> ...
>> Was this one of the command you already tried?
>>
>
> Yes, I have tried that multiple times, both from Troubleshooting Mode
> (booting using CentOS 7 Installation CD) and from within the actual system
> (booted using super-grub2 disk).
>
> I always get (from troubleshooting mode):
>
>    # grub2-install --root-directory=/mnt/sysimage/ /dev/vda
>    Installing for i386-pc platform.
>    grub2-install: error: unknown filesystem.
>
> or (from within the OS):
>
>    # grub2-install /dev/vda
>    Installing for i386-pc platform.
>    grub2-install: error: unknown filesystem.
>
> How can I fix that?
>
>
> Nick
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos
>


BTW: see also this paragraph in the provided RH EL link:
24.7.3. Resetting and Reinstalling GRUB 2

But i think is not your problem....

Also, after changing partitions flag does your fdisk command reflect the
change?
Is the error during boot the same as the one provided in your first e-mail?

One final thing. When I had to change boot settings, I made different steps
in choot environment in respect of the indication inside the image you sent.

Specifically

Verify if your boot partition is already mounted under /mnt/sysimage/boot
in your current environment
If it is mounted on another mount point in your live env go and umount it
and run
mount /dev/vda1 /mnt/sysimage/boot

then
chroot /mnt/sysimage

when you are in chrooted environment, probably you don't have special files
for vda and vda1 because they are dinamically created;
verify with

ls -l /dev/vda*

If this is the case, go and create them

mknod -m 660 /dev/vda b 253 0
mknod -m 660 /dev/vda1 b 253 1

at this point

grub2-install /dev/vda
and let see the output of the command and its exit code

at this point exit chrooted environment (exit)
umount /mnt/sysimage/boot

reboot and see if anything changes

HIH,
Gianluca