Friday, September 16, 2016

When the GRUB got confused .... i lost my heatbeat

Hello folks , today i am not writing any techincal stuff here but a personal experience where i almost ended up in losing three operating systems in one shot , Windows 8 (this is on my office laptop) on my internal hard drive , Linux ubuntu on a SATA hard drive(internal) which i use as an external drive by a sata to USB converter , and a windows Vista installed on the same hard drive in another partition .

Let's go in the past , I am running Linux ubuntu v15 on my external drive and for a week  i am getting notifications to update to Ubuntu v16 and Friday the 16th September ,  2016 , today , i decide to upgrade from v15 to v16. Now the upgrade goes on for an hour and after an hour it asks me for installing the grub. By the way my sata drive which i am using as an external drive is already having GRUB 2 that dual boots Windows vista and Linux for me . So now very carelessly forgetting that i already have a GRUB2 and i have an internal hard disk as well , my office laptop's disk  , i choose to select the first disk that shows on my screen for installing GRUB2 . Wow ..... it got installed as well , smooth and easy , awesome . Impressive.

Reboot , ok , bang on , and i remove the external hard drive because i want to continue with my usual work on my usual Windows that boots from my internal hard drive , and alas , what do i see grub rescue >>>>>> , what tha ??? just happened .

Just before the prompt , it says , unable to find disk <<xyz>>. Sooner i realized that the grub was installed on my internal hard drive and it's trying to load the Linux Ubuntu which i successfully upgraded to v16 on the external drive and becuase is not connected via USB  , so the grub rescue made sense.

Well what is horrifying here is this internal hard drive is bitlocker locked drive of my office laptop . WOW .... !! I am royally .. you know what i mean .

So i search on google a lot of articles for ways to exit the grub rescue and boot into windows by several hidden hacks but unfortunately i am not able to boot into my windows 8 Office installation. However, i could boot into Linux Ubuntu v16 and that at least saves me oneoperating system here , a relief.

After a long research of an hour , i understand that one cannot uninstall GRUB however one can overwrite the it on the MBR on internal hard drive by the Windows boot loader.

So this article  that saved my ### says .....

" I’m often, at least more than I care, asked how to restore a Windows MBR/bootloader without having a windows install cd or a dos boot disk at hand. It’s quite easy you need just a Linux live cd like (the Ubuntu live cd or Knoppix) or an installed Linux you want get rid of. I really don’t know why you want to do the second, but anyway here are the 2 solutions I know of."

Boot Linux and make sure you’ve a working Internet connection and type following on the terminal/konsole. "

Now the first solution he mentions , i totally do not understand what's he trying to do here but this worked for me . It's called the dd command (convert and copy a file) , the data destructor command :) , also they also call it. I had heard this dd first time around 15 years back when one of my friend said .. "Hey , if we wanna screw up our schools' compsci labs' systems , there's a dd command." Now i know how dd can fry it up. 

Anyhow

1. sudo apt-get install syslinux

2. sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda

because sda is my internal hard drive and i just wanted to fix this problem as soon as possible , i blindly ran this command ,in a rush to reboot my system , w/o the external hard drive and EUREKA , it worked , it really worked and now i was least able to get rid of the GRUB and the GRUB RESCUE and i was at my BITLOCKER ready to login .

Unfortunately , the mess was still there since i wrote(grub) into a non writable [I should not be doing any dual boot as per office policies on this office laptop] disk (sda) , it messed up the bitLocker and now it's asking me for a recovery key which off course i do not have and i need to solve this first thing Monday morning from the IT department at my office.

I am happy that i'll have to show them the bitlocker screen rather than showing the weirdo grub_resuce >> prompt and i am not sure what would have happened , if that would have happened .

SO where there is a will , there is way . I solved it , hurray . As well i lost one operating system in this process , "Vista".

Lastly , thanks to the guy who wrote this .

No comments:

Post a Comment