Grub Rescue - error: file not found

Help with issues regarding installation of Debian

Grub Rescue - error: file not found

Postby janusz » 2013-05-23 14:49

I have recently switched to Debian. After installation it was running fine.
I update it and I had some dpkg problems and ended up messing something up when I was trying to fix that.

In short, I am now stuck at the Grub Rescue - error:file not found.

I have a dual boot Windows 7 / Debian setup onto a partitioned drive in an Asus F8Va laptop.

I have found similar post and tried to solve it using the following:

1) I tried booting from my live image to be able to re-install GRUB. PROBLEM: my computer does not want to use it for some reason. I have my boot set for USB first since this is how I installed my Debian distro. And to double check I plugged the USB into another laptop and of course the menu pops up and I was able to use the Debian LIVE.[/list]

2) Directly in the rescue mode:
a)
    Code: Select all
    ls
    (hd0) (hd0, msdos6) (hd0,msdos5) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)


    hd0 is my laptop disk and hd1 my USB drive (I tried it both with and without hd1)
b)
    Next I checked what is in each folder.

    Code: Select all
    ls (hd#,msdos#)/


    For (hd0,msdos,5 and 6), I received: "error: unknown filesystem"
    For (hd1,msdos1), the linux USB, I received: "error: unknown filesystem"
    For (hd0, msdos1,2) I got a list of windows files.

    So 5,6 are the partitions where linux is installed.
c)
    Code: Select all
    set root=(hd#,#)
    set prefix=(hd#,#)/boot/grub
    insmod normal ---> error:file not found


And I get stuck since I cannot boot into linux to sudo update-grub

My frustration is now turning into a bit of panic so I am reaching out. Any help is appreciated.

Thank you,
J
janusz
 
Posts: 10
Joined: 2013-05-23 13:58

Re: Grub Rescue - error: file not found

Postby dibl » 2013-05-23 17:50

janusz wrote:I tried booting from my live image to be able to re-install GRUB. PROBLEM: my computer does not want to use it for some reason. I have my boot set for USB first since this is how I installed my Debian distro.


This is a problem -- I think you'll have to figure out why your BIOS is not seeing the USB stick. This may be related to the other error. Do you have other bootable USB devices to try?
Debian sid / siduction KDE
dibl
 
Posts: 528
Joined: 2009-10-13 19:50
Location: Dayton, Ohio, USA

Re: Grub Rescue - error: file not found

Postby janusz » 2013-05-23 18:30

If you mean CD/DVD then no. My drive hasn't worked for a while.

The USB drive is being seen since when I do ls in Grub Rescue it shows up (hd1) (hd1,msdos1) and the Bios was able to see it when I installed Debian so I think its more of a Grub issue.
janusz
 
Posts: 10
Joined: 2013-05-23 13:58

Re: Grub Rescue - error: file not found

Postby dibl » 2013-05-23 18:40

Assuming there is in fact a problem with grub, it could be reinstalled in a chroot, but you can't chroot into your system unless you can boot a linux operating system. That's why you need to figure out what it would take to boot a Live USB stick (if you can't boot a Live CD).
Debian sid / siduction KDE
dibl
 
Posts: 528
Joined: 2009-10-13 19:50
Location: Dayton, Ohio, USA

Re: Grub Rescue - error: file not found

Postby patrick013 » 2013-05-23 19:04

This is how I booted the other day from grub rescue

grub rescue> insmod linux.mod
grub rescue>set root=hd3,msdos1 (has to be the right one)
grub rescue>linux /boot/vmlinuz root=/dev/sdd1 (needs the exact vmlinuz number)
grub rescue>initrd /boot/initrd.img (needs the exact initrd.img number)
grub rescue>boot

See if that boots.

Then run grub-install for /dev/sdX (the block device where grub2 should be)
Then run update-initramfs for all initrd's
Then run update-grub.

Then reboot.

Let me know if that works then.
patrick013
 
Posts: 84
Joined: 2013-02-07 19:08

Re: Grub Rescue - error: file not found

Postby janusz » 2013-05-23 19:15

gryb rescue> insmod linux.mod
error: file not found.
janusz
 
Posts: 10
Joined: 2013-05-23 13:58

Re: Grub Rescue - error: file not found

Postby patrick013 » 2013-05-23 19:43

ignore that and continue then

thx

edit: insmod (enter)
then: insmod normal (use that if boot doesn't work)
patrick013
 
Posts: 84
Joined: 2013-02-07 19:08

Re: Grub Rescue - error: file not found

Postby dasein » 2013-05-23 19:55

Just for the record, even if you're feeling frustrated, posting the same question three times in less than two hours is considered very bad manners.

Triple-posting won't get you help three times faster, but it is three times more likely to result in folks ignoring your posts.
User avatar
dasein
 
Posts: 7775
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Grub Rescue - error: file not found

Postby janusz » 2013-05-23 20:05

Patrick,

I tried your advice but it seems that Grub cannot read the partitions with linux on them (hd0, msdos5) and (hd0, msdos6) ie unknown error: unknown filesystem..

I only know this since I can read (hd0, msdos2) and (hd0,msdos1) have windows files in them and I can list them using ls.

Even if I set 5 or 6 as root I still can't run
linux /boot/vmlinuz root=/dev/sdd1
I get
Unknown command 'linux'


To all,
Sorry for triple posting, my mistake.
janusz
 
Posts: 10
Joined: 2013-05-23 13:58

Re: Grub Rescue - error: file not found

Postby patrick013 » 2013-05-23 20:19

hi,

you need to know the /dev/sdx number where grub.cfg is
and the corresponding number where grub.cfg is for root=

grub rescue> ls (enter) will give you a list for set root=

I know it's hard guessing those numbers, write them down
on a piece of paper.

also vmlinuz needs to be something like vmlinuz-3.2.0-4-686-pae
and initrd needs to be initrd-3.2.0-4-686-pae (from your /boot directory)
root= needs to be /dev/sdx (the partition where /boot is in linux)
try df (enter from a terminal when that partition is mounted) for a list
of /dev/sdx's

Don't give up yet, I'll try to think of a way to make it easier.
you're only an item or 2 away from booting that install.
patrick013
 
Posts: 84
Joined: 2013-02-07 19:08

Re: Grub Rescue - error: file not found

Postby janusz » 2013-05-23 20:43

after ls:

(hd0) (hd0, msdos6) (hd0,msdos5) (hd0,msdos2) (hd0,msdos1)

where 1 and 2 have windows files
where 5 and 6 I cannot read

I tried :
grub rescue>set root=hd0,msdos5
grub rescue>linux /boot/vmlinuz-3.2.0-4-686-pae root=/dev/sdd5

OR

grub rescue>set root=hd0,msdos6
grub rescue>linux /boot/vmlinuz-3.2.0-4-686-pae root=/dev/sdd6

both cases I get Unknown command 'linux'
janusz
 
Posts: 10
Joined: 2013-05-23 13:58

Re: Grub Rescue - error: file not found

Postby patrick013 » 2013-05-23 20:58

janusz wrote:after ls:

(hd0) (hd0, msdos6) (hd0,msdos5) (hd0,msdos2) (hd0,msdos1)

both cases I get Unknown command 'linux'


Well good so far. We need to know exact if 5 or 6 contain
the grub.cfg 5 is before 6 so is grub.cfg in 5 or 6

Try df (enter) from a livecd or other terminal, the one with debian s/b 5 or 6,
the right one is the lower or the higher number. That will help.

edit:

grub rescue> insmod (hd0,msdos5)/boot/grub/linux.mod
grub rescue> insmod (hd0,msdos6)/boot/grub/linux.mod

One of the above is needed to get linux.mod to work. That's where
grub.cfg is at. Which one works then ? Almost done if one works then.


With that info we should be able to do insmod linux.mod to allow the
"linux" command to work. linux.mod is in /boot/grub/linux.mod
you will see it there.

thx for your patience.

once you do this and write it down it will be easy :D
patrick013
 
Posts: 84
Joined: 2013-02-07 19:08

Re: Grub Rescue - error: file not found

Postby janusz » 2013-05-23 21:53

First off, Thank you for being so patient with me....you're helping me :)

I ran a live USB copy of the same Debian I installed (but on a different computer since I can't get it to run on mine)...

df

Code: Select all
root@debian:/home/user# df
Filesystem     1K-blocks    Used Available Use% Mounted on
rootfs           1546872   14580   1532292   1% /
udev               10240       0     10240   0% /dev
tmpfs             309376     756    308620   1% /run
/dev/sdb1        7806930 1454774   6352156  19% /lib/live/mount/medium
/dev/loop0       1056256 1056256         0 100% /lib/live/mount/rootfs/filesystem.squashfs
tmpfs            1546872       0   1546872   0% /lib/live/mount/overlay
tmpfs            1546872       0   1546872   0% /lib/live/mount/overlay
aufs             1546872   14580   1532292   1% /
tmpfs               5120       0      5120   0% /run/lock
tmpfs             618740      84    618656   1% /run/shm
/dev/sr1            6828    6828         0 100% /media/U3 System
root@debian:/home/user#


so I tried:
grub rescue> insmod (hd0,msdos5)/boot/grub/linux.mod
OR
grub rescue> insmod (hd0,msdos6)/boot/grub/linux.mod

and get error: unknown filesystem
janusz
 
Posts: 10
Joined: 2013-05-23 13:58

Re: Grub Rescue - error: file not found

Postby patrick013 » 2013-05-23 22:20

long story short,

msdos5 or msdos6 have debian, so.....

grub rescue>set root=hd0,msdos5
grubrescue>insmod /boot/grub/linux.mod
grub rescue>linux /boot/vmlinuz-3.2.0-4-686-pae root=/dev/sda5
grubrescue>initrd /boot/initrd.img-3.2.0-4-686-pae
grubrescue>boot

or:

grub rescue>set root=hd0,msdos6
grubrescue>insmod /boot/grub/linux.mod
grub rescue>linux /boot/vmlinuz-3.2.0-4-686-pae root=/dev/sda6
grubrescue>initrd /boot/initrd.img-3.2.0-4-686-pae
grubrescue>boot

One of the above has to boot.

Sometimes syntax changes and debian recently upgraded grub2 so...

But that linux.mod is needed, try tomorrow then. See Ya'

Keep exact notes which commands did work with the grub2 rescue prompt

THX
patrick013
 
Posts: 84
Joined: 2013-02-07 19:08

Re: Grub Rescue - error: file not found

Postby janusz » 2013-05-23 22:38

I tried all of the commands even though I get that the commands won't work without the loading of the module using insmod, just to be thorough.
Code: Select all
grub rescue>set root=hd0,msdos5                                    Works
grubrescue>insmod /boot/grub/linux.mod                             Does not work => error: unknown filesystem.
grub rescue>linux /boot/vmlinuz-3.2.0-4-686-pae root=/dev/sda5     Does not work => Unknown command 'linux'
grubrescue>initrd /boot/initrd.img-3.2.0-4-686-pae                 Does not work => Unknown command 'initrd'
grubrescue>boot                                                    Does not work => Unknown command 'boot'

or:

grub rescue>set root=hd0,msdos6                                    Works
grubrescue>insmod /boot/grub/linux.mod                             Does not work => error: unknown filesystem.
grub rescue>linux /boot/vmlinuz-3.2.0-4-686-pae root=/dev/sda6     Does not work => Unknown command 'linux'
grubrescue>initrd /boot/initrd.img-3.2.0-4-686-pae                 Does not work => Unknown command 'initrd'
grubrescue>boot                                                    Does not work => Unknown command 'boot'


I'm going to keep trying, let me know if anything else comes to mind.
janusz
 
Posts: 10
Joined: 2013-05-23 13:58

Next

Return to Installation

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable