LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Formatted my linux drive in a dual boot setup, now the GRUB loader hangs the system.. (https://www.linuxquestions.org/questions/linux-general-1/formatted-my-linux-drive-in-a-dual-boot-setup-now-the-grub-loader-hangs-the-system-688369/)

Dr_Horse 12-04-2008 02:44 PM

Formatted my linux drive in a dual boot setup, now the GRUB loader hangs the system..
 
Hello everyone.

Until recently I had two hard disks, one running WinXP and the other runnin Ubuntu, with a GRUB boot loader appearing on start-up offering me the opportunity to load either one.

Earlier today I decided to format the linux drive because I hardly ever use it anymore and I thought the space would come in handy. I did this using diskpart in the WinXP command prompt. Upon the next system restart the bios whizzed by as usual but when it got to the GRUB loader it said:

"
GRUB Loading stage1.5

GRUB Loading, please wait

Error 17
_
"

Then it just sits there winking at me and doesn't load anything.


I am only able to get online now because I disconnected the WinXP drive, connected the formatted ex-Linux drive as the master and installed WinXp. So I know that to fix it I could just format the original WinXP drive and use it as a slave to the new WinXP drive, but I have too much stuff on there I need.

Your challenge, my lovely panel of generous and helpful experts, is to tell me how I can remove the busted GRUB loader without losing any data on that drive.

That is a big, big please, and thank you in advance for your time.


ps sorry if this is in the wrong place but it seemed a similar kind of query to many others, and the read this first section wasn't that clear.

syg00 12-04-2008 03:24 PM

Remove the added drive (stick the original back in ... :p ), boot your XP install disk, select the recovery console when it tells you to, and run fixmbr
Reboot and all will be as you want.

jailbait 12-04-2008 03:26 PM

Grub installs in two parts. One part is in a Linux partition in a file called /boot/grub/menu.lst. The other part is a 512 byte record on the MBR which points to the correct menu.lst. When you formated the Linux partition menu.lst disappeared.

When you removed a drive the BIOS began booting the MBR on the other drive which apparently is a Windows MBR.

Quote:



Your challenge, my lovely panel of generous and helpful experts, is to tell me how I can remove the busted GRUB loader without losing any data on that drive.

You already lost the data on that drive when you formated it with diskpart. The only part of that drive which is still intact is the Grub MBR.

The standard practice in data processing since about 1945 is to back up everything periodically and recover lost data from backup. Microsoft has introduced the weird idea of not backing up and instead trying to recover lost data by rummaging around through the disk control blocks in the hope of finding the lost data still intact in the disk free space. So you can either restore from backup or try to recover it with the Windows commands which rummage around disk free space.


---------------------------
Steve Stites

Dr_Horse 12-04-2008 03:37 PM

Quote:

Originally Posted by jailbait (Post 3364731)
Grub installs in two parts. One part is in a Linux partition in a file called /boot/grub/menu.lst. The other part is a 512 byte record on the MBR which points to the correct menu.lst. When you formated the Linux partition menu.lst disappeared.

When you removed a drive the BIOS began booting the MBR on the other drive which apparently is a Windows MBR.



You already lost the data on that drive when you formated it with diskpart. The only part of that drive which is still intact is the Grub MBR.

The standard practice in data processing since about 1945 is to back up everything periodically and recover lost data from backup. Microsoft has introduced the weird idea of not backing up and instead trying to recover lost data by rummaging around through the disk control blocks in the hope of finding the lost data still intact in the disk free space. So you can either restore from backup or try to recover it with the Windows commands which rummage around disk free space.


---------------------------
Steve Stites

Sorry, I must have not explained myself very well, I was talking about recovering the data from the ORIGINAL WinXP drive, as in the one that I HAVEN'T formatted.

I will try booting from the XP disc.


Thank you both very much.

Dr_Horse 12-04-2008 03:50 PM

Quote:

Originally Posted by syg00 (Post 3364729)
Remove the added drive (stick the original back in ... :p ), boot your XP install disk, select the recovery console when it tells you to, and run fixmbr
Reboot and all will be as you want.

It WORKED. You are absolutely marvellous, well done.

A million thank yous.


All times are GMT -5. The time now is 04:03 AM.