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.


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.

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

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


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-

Then you enter


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

sudo update-grub
  • 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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