file not found grub rescue

Asked by Susan Anderson

I'm hoping you can help me with a problem that's worrying me sick, and which I caused myself. Here's two other facts I should mention: (1) I do not have a CD for my Dell Windows-XP desktop PC; it did not come with one. (2) I cannot access the internet through that desktop PC right now, but cable will be installed at my house next month. I'm entering this question from a laptop at the public library. (I do have dial-up service on my desktop PC, but I can only get to it through Windows, and I can't get to Windows right now, and only to rescue-mode in Ubuntu, so that's why I'm at the library.) I do have a Ubuntu 10.04 LiveCD.

Here's how I created my problem:

I wanted to be able to use Ubuntu on my desktop PC and also on my laptop. So I bought a portable external hard disk, and successfully installed Ubuntu 10.04 on it, while it was plugged into the desktop. Then, when I turned on the PC, I would first choose from a Ubuntu-supplied menu and then from a Windows-supplied menu. It worked fine.

But when I unplugged the portable from the desktop and then rebooted the desktop, I got:

error: no such device: 6afff52c-0175-4a2b-8e54-d87238027ada.
grub rescue>

So I plugged the portable in again, and tried to figure out how I could change things to be able to boot without the portable. At that time I mistakenly thought that I couldn't create a boot partition in Windows, though now I realize I could have. (I thought my PC already had four partitions occupied.) So instead, I simply used my 10.04 LiveCD to re-install GRUB2 on my C: partition. I now realize I shouldn't have done that, since my C-drive is filesystem ntfs and my portable-drive is filesystem ext4. Not only did I re-install GRUB2 to my C:\, but I removed the LiveCD as soon as grub-install told me "Installation finished. No error reported". Which I guess was too soon, because then I rebooted, and as it came down it displayed a page-full of errors, like:
.
.
[ 1288.401498 ] SQUASHFS error: Unable to read fragment cache entry [ 269.a66bd ]
[ 1288.403297 ] SQUASHFS error: Unable to read page, block 269a66bd, size abcc
/etc/rc6.d/s90reboot: 38: reboot: Input/output error

And then it hung there. I unfroze the keyboard by entering: alt + SYSRQ + R + E + I + S + U + B

Then a black screen appeared with the heading "GNU GRUB version 1.98-1ubuntu5" and some info about BASH, and then the grub prompt:

grub>

I was able to boot from there by using the "configfile" command. On Ubuntu (on the portable drive) I could see that there was still a /boot/grub directory, but now there was one on my C drive also! But doing "sudo update-grub" seemed to update the portable drive's grub.cfg file, instead of doing anything on C:\boot\grub. My C-drive's \boot\grub didn't contain a grub.cfg file (though it looked like it had all the .mod and .img files, and grubenv).

So, then I made my final bad decision: since doing a reinstall of GRUB2 (per the instructions in GrubHowto) on Windows had not removed the old /boot/grub directory from Ubuntu (the portable drive), I decided to delete the new /boot/grub directory from Windows (from my C: drive), and then do a "re-install GRUB2" on Ubuntu. I deleted C:\boot.

And then, when I rebooted, I came up at:

error: file not found.
grub rescue>

And nothing I do now seems to help. Can you suggest anything?

Humbly yours,

Susan Anderson

------------------------------------------------------------------------------------------------------------
Here's some additional information. I did these commands at grub rescue>:

set prefix=(hd1,1)/boot/grub
set root=(hd1,1)
insmod normal
      error: unknown filesystem
ls
     (hd0) (hd0,3) (hd0,2) (hd0,1) (hd1) (hd1,5) (hd1,1) (fd0)
ls (hd1,1)/
     error: unknown filesystem (and yet, that is my Linux partition)
ls (hd0,2)/
     dell/ $attrDef $BadClus $Bitmap $Boot $External .... (and all my C: files and directories)

In a terminal session from the LiveCD, I did "System > Administration > System Testing" and got a Checkbox Report.

Note that (hd1,1) equates to partition sdf1; they are my Ubuntu-aka-linux partition. The Checkbox Report says about sdf1:

E: ID_FS_TYPE=ext4
E: ID_FS_USAGE=filesystem

-------------------------------------------------------------------------------

A little more information: on Ubuntu, /boot/grub now contains only grubenv. Because I can't load the "normal" module, I can't try to reinstall GRUB2 again.

-------------------------------------------------------------------------------

Also: can you tell me if there is any document that completely explains the whole booting process? I feel like I'm working in the dark. I read the GrubHowto and KnowThyUbuntu, but they don't explain the whole thing, such as: this program calls this program, which calls this program...

-------------------------------------------------------------------------------

About the "unknown filesystem" message when I did "insmod normal": I also did "df -Th" and below are some of the columns it showed, for /dev/sdf1 (which is my linux):

Filesystem: /dev/sdf1
Type: ext4
Size: 685G
Mounted on: /mnt

----------------------------------------------------------------------------------
It's Tuesday March 13, 2012 now, and I'm back at the public library with my laptop. I've read another article that talks about the boot process; it's at http://askubuntu.com/questions/54981/... It's in answer to a question about uninstalling Wubi. I never installed Wubi, only the regular Ubuntu, and yet I have C:\wubildr.mbr, which is mentioned in my C:\boot.ini, and C:\wubildr. I think those files were added when I did "Install CD boot helper" when my PC wouldn't boot from the LiveCD, when I was trying to install Ubuntu in the first place. Since I never installed Wubi, but instead installed Ubuntu onto my portable external hard drive, is the boot process still going through boot.ini and then C:\wubildr.mbr? I wish I understood the whole boot sequence better. Maybe my C:\ubuntu\disks\root.disk is pointing to the wrong place?

I wondered if I could fix my problem by uninstalling Ubuntu--although I haven't yet found instructions on how to uninstall Ubuntu, only on how to uninstall Wubi. What I most wonder is: does the Ubuntu installation process first make a copy of the original Windows boot-process programs, so that it can rename them on an uninstall? Is an uninstall and then a reinstall possible?

If I can only get this fixed, I swear I will leave that portable hard drive plugged into my Desktop PC forever, and not try to make it optional. Thanks for listening.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
Ubfan
Solved:
Last query:
Last reply:
Revision history for this message
Susan Anderson (mmsusanmm) said :
#1

I don't understand why, when I do "insmod normal", I get "error: unknown filesystem". I checked on the filesystems, and my linux partition is "ext4" and my Windows partition is "ntfs". Can you tell me what "insmod normal" is looking at, to determine that the filesystem is unknown? Thank you.

Revision history for this message
Best Ubfan (ubfan1) said :
#2

Looks like the grub install got messed up, so a fix is possible.
I think what happened is your first install to the portable usb drive put the grub boot block onto your internal hard disk. When the portable was removed, the grub files were removed and grub could not run. The default location for the grub seems to alternate randomly between the target device and the internal hard disk -- too bad Canonical keeps changing this, so you always must check the location the installer says it will use, and correct it if necessary.
  To correct the problem, (and it's happened to me too), install grub to the hard disk with all its files (like you tried), but instead of installing to an NTFS partition, find a FAT partition on your internal hard drive. Make a directory /boot on that FAT partition, and install grub there. (For the longest time, grub could not read ntfs, but I thought that might have changed, but apparently not. A quick-fix attempt would be to move your C:\grub directory into C:\boot, just to see if the directory path is the problem and not the ntfs). This should leave you with a working grub on your hard disk (Alternatively, borrow a Windows media and reinstall the Master Boot Block, but as you've noted, you lack the media, and using the vendor supplied "recovery" media is a recipe for disaster, since there is typically no way to get to a recovery console).
  You should install grub on the portable disk also, so you can run Ubuntu on any device which can boot off usb.
If you get the portable disk set up, you can change the boot order on your desktop, even if you don't fix the internal hard disk.
  I have no idea what the "normal" module is, and why you got a filesystem error.

Revision history for this message
Susan Anderson (mmsusanmm) said :
#3

THANK YOU, Ubfan! I truly appreciate your reply. It's wonderful that there's someone out there, a voice in the wilderness when all seems lost (I really was despairing, and my spouse was getting perturbed with me, since he couldn't get to the internet). Thanks to you, all is working again. I think I'll soon be a big Ubuntu fan too, now that everything is ironed out. May you receive all the blessings you deserve.

Revision history for this message
Susan Anderson (mmsusanmm) said :
#4

Thanks Ubfan, that solved my question.