Recovering or troubleshooting GRUB2 prompt in Debian GNU/Linux

Due to some reason, I was in need to replace existing HDD with new one. So I cloned it using CloneZilla. It was a GNU/Linux Machine. First of all CloneZilla refuses copy partitions, one after another and flagged error for each of one. I remembered the reason for errors and turned off the machine. Turned on again and SHUTDOWN properly. The point is, if Machine is not shutdown properly, file system is unclean and  ColneZilla will complaint while cloning. So I fixed that first. Then cloned without any error. But Computer refuses to boot from newly  cloned HDD. It stayed at grub> prompt

Then I did the following to troubleshoot

Step1. grub> set root=(hd0,1)                                       #  / (root) partition was /dev/sda1

Step2. grub> linux  /vmlinuz root=/dev/sda ro

step 3 grub> initrd /initrd.img

step3. grub>boot

Machines rebooted

on the command prompt as a root

#grub-install  /dev/sda
Rebooted again. Its done.

Reference: https://help.ubuntu.com/community/Grub2/Troubleshooting

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s