Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Lenovo IdeaPad with Windows and Backtrack 5 r3 dual boot. My friend typed in

rm -fr /* >null

on my computer that erased everything.

After it was executed I couldn't do anything so I restarted my computer and now the grub menu says "unknown" and doesn't display any operating systems like it usually does.

I'm guessing theres no way to recover Backtrack (if there is please tell me), but since I dual-booted with Windows 7, and the only way I know of to access Windows is through the grub menu, I want to know if there is a way to recover Backtrack. Otherwise, I'd very much like to get into Windows.

I have backup discs that I made on Windows 7, but I was just wondering if there was any other way around this.

share|improve this question
    
What kind of friend is that? But you didn't mention what account. Was it root account? –  Keith Aug 17 '12 at 4:26
add comment

3 Answers

You have a few options...

BEFORE anything... Because of my 0 reputation, some links have hhttp:// instead of http://. You must remove the first (or second hehe) 'h'.

The others are right, the "rm -rf" did screw your linux install... You may have even lost your /home directory if it was mounted at the same time...

Option 1: Use the Non-Commercial/Free EasyBCD Editor - hhttp://neosmart.net/dl.php?id=1

Option 2: Use the following howto to restore the bootmanager (thanks Google :P) Restore Boot Manager - hhttp ://neosmart.net/wiki/display/EBCD/Recovering+the+Windows+Bootloader+from+the+DVD

Option 3: Use the windows CD to load up in rescue mode, then do "fixboot" or "fix-boot" or "fixmbr" (I forget which one, I think its fixmbr) then reboot.

Option 4: Reinstall linux, then use grub to boot windows. After booting windows, try the above commands ("fixboot" or "fix-boot" or "fixmbr"). After you do that, reboot to make sure it shows windows bootloader. If it shows only the windows bootloader, then use a windows partition manager to blow the linux partition.

Option 5: (probably your best option) Use a bootloader rescue disk. If this doesn't work, Google for "Bootloader Rescue"

  • SuperGrubDisk - hhttp://www.supergrubdisk.org/ (a rescue disk for grub)

After, just use the windows command line and "fixboot" or "fix-boot" or "fixmbr" (whichever it is... Again I think its fixmbr)

Once back in windows... I would advise installing a third-party boot manager, such as Acronis OS Selector or another open-source one. If you need, Google "Graphical Bootloader". I like Acronis OS Selector as it is point and click graphical bootloader. And NO I do not work for Acronis, or get any revenue or % of sales.

Good Luck, and accept answer if you manage to fix it with any of my methods :)

share|improve this answer
    
Thanks alot, Iam considering using option 3 but when you said Windows cd do you mean the Windows backup cds that I mentioned or are you refering to a Windows recovery disc that comes with the computer or what ever its called.I am also considering option 5. I don't have another computer because I am on vacation. I do however have my backup cds.thank you and I will try one of these tomarow –  cameron Aug 17 '12 at 3:25
    
Yes, either the original install CD or the "Recovery Disk". Both should have a 'rescue' option. You are more than welcome :) I don't have a clue why you would prefer wincrap over linux, usually its a good thing to blow wincrap bootloader –  Shawn Aug 17 '12 at 15:44
add comment

The easy way is probably to find a bootable CD and use it. If you want to go the hard way, you can type in the necessary commands at the grub prompt to tell it where to find the Windows root partition and bootloader. Look at the GRUB2 manual for a list of commands.

You'll have to choose a partition, like this:

set root=(hd0,msdos1)

That's the first hard disk (in the order that BIOS found them), first partition (using an MS-DOS partition table). Yes, the disks are numbered from 0 and the partitions are numbered from 1. That's not a typo. Also you can just type part of the command and then use the Tab key to get suggestions for what to type next.

Then you tell grub to chain-load the first sector of the partition, like this:

chainloader +1

You may have to load some modules first.

insmod part_msdos
insmod chain

Seriously though, boot CD.

share|improve this answer
    
Thank you so much, I'm sorry to ask another question but what do you mean bootable cd –  cameron Aug 17 '12 at 2:06
    
You haven't heard of a boot CD? Are you from 1993? Oh wait... IdeaPad... googling... one of those... things. I have no idea how you do recovery without removable media. Good luck with grub –  Alan Curry Aug 17 '12 at 2:11
    
Thanks, but couldn't I just use my backup crabs to recover Windows because theirs a button on lenova thats a sort of recovery mode and I think I could recover windows or should I use the grub –  cameron Aug 17 '12 at 2:31
    
I ment cds not crabs –  cameron Aug 17 '12 at 2:31
add comment

That command completely blew away the Linux machine. The Windows 7 installation should still be fine. You can use startup repair to fix it.

share|improve this answer
    
Thanks, but how do I use start up repair because when I turn on my computer it starts the empty grub menu is there a way to do this by pressing f12. Or f2 in start up because that's my only option. There is also some kind of command line on the grub menu to. I backed up my computer using Windows back up so would that also be backing up backtrack since I dualbooted them on the same hard drive.or did the backup only back the windows 7 side of the hard drive . Thanks –  cameron Aug 17 '12 at 1:28
    
The easiest way is to boot from a Windows 7 DVD. You can download one on another machine and burn it to DVD if you don't have one. –  David Schwartz Aug 17 '12 at 2:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.