Is all hope lost?
Okay, I'm not sure if this is in the right section, but if it isn't, I'm sorry. Please move it. Now before we get into this, I will admit that I am a moron for doing this. But okay:
I have an Acer Aspire v5252 laptop. I installed Ubuntu via liveCD and dual booted it with Windows 7. I didn't like it, so I decided to get rid of Linux. Some guide on the internet told me to delete the Linux partition from within Window's interface in order to get rid of Linux. I was not aware that this would delete my MBR/Grub. Now, I can't boot into Windows and when I start up the computer, I get "grub_rescue>". I followed some more guides and I ended up booting the liveCD and compiling "ms-sys" to restore my Windows 7 boot record. I believe I used "sudo ms-sys -7 -f /dev/sda3". It told me that everything was done successfully. I began to pat myself on the back and proceed to reboot the computer, hoping that the computer would now boot into Windows. Nope. Stupid grub_rescue> came up again. I booted back into the Ubuntu liveCD and went to the Disk Utility and discovered that my partition that once read "Acer" and had all of my Windows files in it, was now gone and that allocated space read "Unknown". I used to be able to browse my Windows installation from within Linux/liveCD, now I cannot. I am assuming that I just f.cked myself, but I'm not sure! Did I do something stupid and corrupt my Windows 7 installation? Is there anyway to rectify this and go back to my Windows 7 installation? Or am I forever doomed with my liveCD? |
It sounds like Windows is gone. If your computer came with a factory restore disk then you could use that to restore Windows. If you do not have one then you may be able to purchase one from Acer. If that is not available and you still want Windows then you will have to purchase a new Windows installation kit. Keep in mind that a generic Windows installation kit will not have Acer specific drivers. You would need to download those from the Acer web site if they are available.
If none of those options are appealing or available then you can still install Linux or BSD UNIX for free. |
@ Reply
Well not sure if it will recover or not but you can give it a try:
1. Boot the system using Windows 7 CD. 2. It will prompt you whether you want to install Windows 7 or repair. 3. Select the repair option. 4. It will give you couple of options. Don't try any option as of now. Just hit ctrl+F10. This will open up a command prompt. 5. From command prompt try typing C: to see if you are able to get in there. If it is unable to find any C: try with D: and try to do dir. 6. If you are able to see your files in there like: windows, Program Files etc you still have hope. Try this and let me know how it goes and we can take it from there. |
I would say you pretty much destroyed the system, yes.
To start with, simply deleting the Ubuntu partitions is not the appropriate way to remove Linux, as it (as you have found out) still leaves the Linux bootloader in the MBR. With the Linux partition removed, the MBR is unsure how to proceed, so it throws up the problem you were seeing. You then attempted to use "ms-sys" to repair the MBR, which was a step in the right direction. Unfortunately, it looks like you didn't read the documentation very clearly, or perhaps were not sure about the different components in the bootloader/MBR setup. The command you ran: Code:
sudo ms-sys -7 -f /dev/sda3 Code:
Usage: If we check the last line of ms-sys's help, we get a big clue as to what happened: Code:
Warning: Writing the wrong kind of boot record to a device might Now, if there is any good news, it is that the MBR is a very small bit of data. So all that got written into the Windows 7 partition was a few bytes. Just enough, apparently, to smash up the filesystem, but it shouldn't have been enough to delete much of the actual content. You should be able to use data recovery software to get your data off of the drive intact, though I would say that repairing the filesystem and Windows itself would take more time than it is worth. I would suggest getting the data off of it, and then simply reinstalling Windows. |
All hope is not lost.
/dev/sda3 is the third partition on your drive. You wrote a master boot record for the whole disk into your windows partition's boot slot. You wanted 'ms-sys -7 /dev/sda'. http://www.ntfs.com/boot-sector-damaged.htm says you can run FIXBOOT from a Windows install disk's repair/rescue environment to copy a safety mirror of the partition boot record from its hiding place elsewhere in the partition. ms-sys's doc says it can write proper partition boot records with '-p', like 'ms-sys -p /dev/sda3', but it also warns there are differences in how Windows and Linux see partitions so this can cause problems. Good luck. |
Thank you all for your replies. And yes, MS3FGX, you are correct, I did not read the documentation thoroughly. Instead, I was being a moron and skimming the guide that I had looked up. There drive only consist of some mp3s and a few documents. If I can get those documents back, I wouldn't be beat up about this. Three questions:
ADDITION: I forgot to mention: I do have a partition that was created by Windows remaining. It is labeled as "PQ Service". It has a "bootmgr" file, a "System Volume Information" folder and something else (I have to reboot the liveCD to check) in it. This was used by Windows Restore, I think. Is this of any use? |
1. I don't know if the Ubuntu-CD has it already installed, but you should be able to install testdisk even in the live environment, it is not so large. Testdisk contains the photorec-program, which is exactly what you need.
2. I would just give it a try, after you have rescued your data. 3. I don't know. |
Quote:
|
Quote:
Quote:
Also, photorec says it only for photos. It recovers documents too? And lastly, can these programs from the Ubuntu liveCD? I keep running out of space when I try it. |
I don't know what you're reading but you'd be better off at the homepage.
Quote:
Quote:
To save all the guesswork, go here and do as it says. |
When using photorec from a live-CD you have to either use a external drive or a mounted network share. Didn't you say that you want to use your file-server for that?
And, as syg00 already stated, the first places for getting information about software are the manpages, the documentation in /usr/share/doc and the website of the developer. Keep in mind that 'some guide on the internet' in the first place caused your problem. |
Boot ubuntu live-cd and see if you still have your pq service.
You can restore from there. |
Quote:
2. Probably not. If I had to guess, I would say that the Windows install CD will see that there is a partition there, but not recognize it as a valid Windows installation. As such, you probably won't even get the option to use the repair functions. But I could be wrong, it has been a long time since I installed Windows, perhaps the installer has gotten smarter since then. 3. It didn't, really. But it blew away the data at the very beginning of the partition, which happens to be a very important bit. Basically, writing the MBR to the partition overwrote the part of the partition which explains what kind of filesystem is on it, so the OS (Windows, Linux, whatever) doesn't know how to read it. |
Okay guys. You have all been a tremendous help and I thank every last one of you!
I just put in a Windows 7 disc and I ran the repair process. Miraculously, Windows recognized my previous Windows 7 installation. I ran a system restore and the regular "Repair this Installation" option. I rebooted the computer and still got the stupid "grub rescue>" thing. Even though the Windows disc is recognizing my installation, should I just forget about it and reinstall? I do have access to the command prompt. EDIT: Actually, I was about to access all of my files via the command prompt. This is incredible; I thought all of my files were gone. However, I am still missing my MBR and I cannot boot into the OS. I have a Windows 7 disc and a Ubuntu LiveCD. I am contemplating going into Ubuntu and trying ms-sys again, but I'm afraid of losing my files for good. Any ideas guys? |
Read this technet note.
Use /fixmbr and maybe /fixboot. |
All times are GMT -5. The time now is 10:30 AM. |