Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a dual boot PC with Windows 7 and Ubuntu. Last night I upgraded from 12.04 to 12.10 and since then I have not been able to boot because the PC goes into grub rescue with the error "File not found".

I have tried the following steps:

set prefix=(hd0,msdos5)/boot/grub/i386-pc/
set root=(hd0,msdos5)
insmod normal

I get error symbol not found : 'grub_disk_dev_list'.

When I try:

linux /boot/vmlinuz-3.2.0-32-generic root=/dev/sda5 ro 

I get error - command not found 'linux'; same for initrd

I am not able to find out what sdXX to set also.

share|improve this question

2 Answers 2

Solved. Here are step-by-steps instructions for a noob like me.

  1. First step after going to grub recovery is to find out the partition on the disk.

a) type "ls" on the grub-recovery prompt. this would give you all the partitions on your disk.

grub-recovery> ls

my output was (hd0), (hd0,msdos1), (hd0,msdos2), (hd0,msdos3).... and so on

2) now we have to find out which of these partitions contain Ubuntu files to do this type

ls e.g. ls (hd0,msdos5)

in case you see and error it means that this is not the partition that we are looking for. Keep trying this with other partitions till you see something like below

e.g. lost+found dev bin usr etc-2

for me it turned out to be (hd0,msdos5)

3) now we need to find the location for the file with name starting with vmlinuz.... and initrd...

they would be generally under the folder /boot

ls /boot/

note down the full names and the path of the files, we might need them later. For me they we under /boot/ folder and were named vmlinuz-3.2.0-32-generic and initrd-3.2.0-32-generic

4) now make a Live CD or pen-drive for linux, plug it in and start your PC. When you see grub menu (menu where user is asked to either install Ubuntu or try it without installing) press character C and hit enter.

this would take you to the grub prompt.

How to install Ubuntu via pen-drive

we are not going to make a fresh install of Ubuntu, we just want to use the grub command prompt.

5) type the below mentioned commands on grub prompt

set root=(hd0,x)

if your partition was sda5 type 5 in place of x e.g. set root=(hd0,5)

6) linux /vmlinuz root=/dev/sdXY ro

in case you see an error you'll have to use the full path that we notoed in step 3.

e.g. linux /boot/vmlinuz-3.2.0-32-generic root=/dev/sda5 ro

7) initrd /initrd.img

if you see an error specify the full path as in step E

e.g. initrd /boot/initrd.img-3.2.0-32-generic

8) boot

using the above methods I was able to boot into Ubuntu and was able to access all my data.

9) as final step we need to fix the grub so that we don't have to follow these steps every time we want to login.

Link to install Boot-Repair

share|improve this answer

Do you have 2 separate physical disks for W7 and Ubuntu? If so try changing the order of boot priority of the disks in the BIOS screen. Similar thing happened to me and that cured the problem completely.

share|improve this answer
    
Thanks for your response. I don't have separate physical disks, I have two partitions for W7 and Ubuntu on a single disk. –  Prateek Oct 20 '12 at 0:01

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.