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 was installing an operating system (Fedora) in Virtual box which was installed in the Ubuntu Natty Narhwal. it asked me to format the disk (which should format inside virtual machine), which I did when I restarted my laptop I went to a shell saying...

GNU GRUB VERSION 1.99-21ubuntu3.1 Minimal BASH- like line editing supported. for the first word, TAB lists all possible command completions. Anywhere else TAB list possible device or file completions.

GRUB>

Is there any chance that I can get my operating system back?? I have all the application installed in that which I dont want to install again.

share|improve this question

migrated from stackoverflow.com Nov 1 '12 at 23:08

This question came from our site for professional and enthusiast programmers.

2 Answers 2

You need to know 2 things, which partition has your /boot files, and which partition is your root folder. If you can figure those 2 things out, then it's fairly straightforward:

If you know where your /boot partition is, you can use tab completion to find a kernel and ram image. Grub's root directory is /boot, so you have to tell it where to find that folder. Grub also has it's own harddrive numbering scheme, so you might have to play around with it, but for me this works:

root (hd0,0)

This sets the Grub root directory to harddisc 0 partition 0. On my system this is /boot so I can use tab completion to find a kernel:

kernel /(press tab)

On my system:

kernel /vmlinuz-2.6.32-279.11.1.el6.x86_64 root=/dev/sda2

Note you have to tell the kernel where to find your root partition for boot up. (This is the root location requirement I mentioned upfront.)

Next you set the initrd image:

initrd /initramfs-2.6.32.279.11.1.el6.x86_64.img

Then you enter

boot

One you've booted up your system, you can repair your grub menu from inside ubuntu using:

sudo update-grub
share|improve this answer
    
Thanx Niall, I typed 'ls' command and I got (hd0)(hd0,msdos5)(hd0,msdos1) as output. I guess my ubuntu is installed in hd0,msdos1 which has boot directory but could not find the vmlinuz file in that. can you please help me how to find the vmlinuz file. Also my ubuntu is installed from windows executable file (WUBI.exe) ie I have Windows7 and ubuntu two Os's in my laptop. –  pranav nandedkar Nov 1 '12 at 23:18

The first thing I would try, if possible, is to:

  • Insert a LiveCD into your CD-drive (the LiveCD should be Ubuntu or some Ubuntu/Debian derivative).

  • Boot up the computer and open up some kind of interactive terminal.

  • Once you are in the terminal, run sudo update-grub. This should re-install GRUB onto your hard drive.

Good luck, I hope this works.

share|improve this answer

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.