LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Centos 7 grub rescue issue by mondo rescue (https://www.linuxquestions.org/questions/linux-software-2/centos-7-grub-rescue-issue-by-mondo-rescue-4175644299/)

hassanbsee2071 12-14-2018 12:08 PM

Centos 7 grub rescue issue by mondo rescue
 
Dear All,

I have an issue, I have cloned centos 7 VM with XFS file system in form of iso by mondo rescue. When I boot from that iso ant type nuke to restore machine, centos 7 wont boot. Instead grub rescue appears. Moreover all the portions shown by ls command has unknown file system. I am really stuck here. There is only unknown file system error with grub rescue shell. The ISO takes me to the grub rescue and VM wont boot further. Any help will be much appreciated.

Brains 12-14-2018 03:24 PM

Typically a VM is stored as an image file within the file system of the host operating system, not a partition on the drive. If you are running Mondo rescue in live mode, the operating system that the virtual software is installed is not running, therefore the Centos 7 VM is not running also. It will not show a file system when in image file state.

Your best bet is to create a new VM to attemp to repair Centos from there, here's a little insight on what you may need to do.

Are you booting the Mondo rescue ISO from within the virtual software as a boot option for the Centos 7 VM?

colorpurple21859 12-14-2018 07:51 PM

Quote:

Moreover all the portions shown by ls command has unknown file systemd
The grub boot code is probably missing the modules needed to access the filesystem to continue with the booting. Download a live iso then boot the live iso inside the vm to reinstall grub to centos 7

hassanbsee2071 12-15-2018 12:43 AM

Quote:

Originally Posted by Brains (Post 5937209)
Typically a VM is stored as an image file within the file system of the host operating system, not a partition on the drive. If you are running Mondo rescue in live mode, the operating system that the virtual software is installed is not running, therefore the Centos 7 VM is not running also. It will not show a file system when in image file state.

Your best bet is to create a new VM to attemp to repair Centos from there, here's a little insight on what you may need to do.

Are you booting the Mondo rescue ISO from within the virtual software as a boot option for the Centos 7 VM?

Yes I am using VMWare workstation. I make new VM and put that ISO to at time of creation of new VM. When I power on this VM and then type nuke. But after reboot there is only grub rescue shell.

Brains 12-15-2018 12:28 PM

Well, as the previous poster mentioned, you can boot an ISO of a live CD or Grub rescue as a boot option for the VM that won't boot and attempt to repair Grub. Typically the best ISO to boot would be the Centos ISO originally used to do the installation, most installation ISOs will also have a rescue option, using the original installation media gives best chance of rescue as it will have proper version of packages contained within in case reinstalling packages is required.

With VMWare, you can take snapshots, which can be done after a fresh install. If you need to resort to a previous state such as the day of the installation, resorting to the snapshot works perfectly. As for backup purposes, you just need to copy the entire folder of the VM to a backup medium. So if you have a drive issue, or wish to use the VM on another computer, just copy that folder to the new/other drive and boot it after reinstalling VMWare. This way it will boot properly every time.

colorpurple21859 12-15-2018 05:02 PM

Is this grub rescue from the iso grub, or an installed systems grub?

Brains 12-15-2018 05:16 PM

Super Grub2 and plop are great at loading the kernel thus getting it booted. Super Grub2 may also be able to fix the issue. You can download an ISO of each.
Here is a tutorial on how to attempt fixing the issue from grub rescue mode.

hassanbsee2071 12-16-2018 10:29 PM

Quote:

Originally Posted by colorpurple21859 (Post 5937609)
Is this grub rescue from the iso grub, or an installed systems grub?

Mondo rescue made an ISO and during creation of VM I have booted the machine from that ISO after typing nuke to restore old machine, machine becomes rebooted and at the start at grub rescue shell.

hassanbsee2071 12-17-2018 02:42 AM

1 Attachment(s)
Dear Brains and colorpurple21859,

Thank you so much for your reply. Problem becomes temporarily solved, I made an OS with following details:
1) Centos 7 64 bit
2) Separate boot parttion
3) Lvm for root directory and swap.
4) File system ext4

Mondorescue successfully backup-ed and recovered the machine. Mondorescue made an ISO during backed-up process.Then I made new VM in VMware Workstation and used this ISO .Old machine becomes booted from that ISO properly.

Problem:

I adopt the same method on the machine created in XEN. I used Mondorescue which gives me an ISO. Then I used this ISO at the time of creation of new VM in XEN Server. Machine boots from that ISO and then I type nuke but after typing this I am getting this error.
/dev/xvda not exist. Switch to Interactive Mode?Screenshot is attached. I am in big trouble. I have machine in XEN server which I cannot reboot nor take snapshot from XEN utility. I just want to make live clone of this machine otherwise I will be in big trouble. I tried everything ddrescue, dd but didnot succeed. Any help in this regard is much much appreciated.


All times are GMT -5. The time now is 08:32 AM.