You are not logged in.

#1 2011-06-06 10:52:38

651bobby
Member
Registered: 2011-06-06
Posts: 8

GRUB: file not found

Firstly if this is not the right place for this thread feel free to move it, I wasn't sure if it need be here or in installation.

My Debian installation 'died' (my own fault) however I was ready for a change anyway so I took the oppertunity to try arch out as I would prefer to use a 'faster' moving OS. So I followed the installation procedure and after rebooting my system post install I just get GRUB: file not found, then the grub rescue prompt.

I have an unavoidable windows partition on the system that has to be there for development reasons.

I have a 50Mb boot partition for grub, as well as a root partition and home partition, the latter two are logical.

fdisk -l yeilds:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x26951e29

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              13       22450   180224000    7  HPFS/NTFS
/dev/sda3   *       22450       22456       48195   83  Linux
/dev/sda4           22456       38913   132193053+   5  Extended
/dev/sda5   *       22456       29751    58597056   83  Linux
/dev/sda6           29751       38670    71641836   83  Linux
/dev/sda7           38670       38913     1954067   82  Linux swap / Solaris

note I only have one actual disk 'sda'

my grub's menu.lst in sda3 /grub/menu.lst is:

# (0) Arch Linux
title  Arch Linux
root   (hd0,2)
kernel /vmlinuz26 root=/dev/sda5 ro
initrd /kernel26.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd0,2)
kernel /vmlinuz26 root=/dev/sda5 ro
initrd /kernel26-fallback.img

# (2) Windows
#title Windows
#rootnoverify (hd0,0)
#makeactive
#chainloader +1

Note I have removed the comments at the top for the sake of space.

some other information that might be of use.

sda3 ls of /grub/

e2fs_stage1_5
fat_stage1_5
ffs_stage1_5
iso9660_stage1_5
jfs_stage1_5
menu.lst
minix_stage1_5
reiserfs_stage1_5
stage1
stage2
stage2_eltorito
ufs2_stage1_5
vstafs_stage1_5
xfs_stage1_5

sda3 ls of /

grub    kernel26-fallback.img    kernel26.img    kernel26-lts-fallback.img    kernel26-lts.img    lost+found    System.map26     System.map26-lts    vmlinuz26    vmlinuz26-lts

finally ls of sda5 rt partion

bin    boot    dev    etc    home    lib    lib64    lost+found    media    mnt    opt    proc    root    run    sbin    srv     sys    tmp    usr    var

sorry if a lot of that is redundant and let me know if I can provide any more info to assist the problem, I really need this system woking, also if could get access back to the Windows partition that would be a major plus.

Thanks again

Last edited by 651bobby (2011-06-06 11:07:59)

Offline

#2 2011-06-06 10:54:47

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: GRUB: file not found

Please place any conf, shell or log output between code-tags 651bobby, it makes your post easier to read.


ᶘ ᵒᴥᵒᶅ

Offline

#3 2011-06-06 11:08:37

651bobby
Member
Registered: 2011-06-06
Posts: 8

Re: GRUB: file not found

litemotiv wrote:

Please place any conf, shell or log output between code-tags 651bobby, it makes your post easier to read.

Sorry, that should be better now

Offline

#4 2011-06-06 13:01:50

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: GRUB: file not found

So - it would seem to me that all your files are in the right place ... and the 'menu.lst' looks allright - and the same for the boot-flag being set on sda3.
Some times I have had problems with the actual boot-install, ie the sequence:

grub> root (hd0,2)
grub> setup (hd0,2)

- but as I usually do this manually, I can see if there are any errors and when I then run it again, it installs.
I would suggest that you boot from a live-cd and reinstall grub.
Also, you may want to check that the mbr is actually the old dos-loader and not remnants of your debian grub ... come to think of it - that's probably why things fail.
The old dos-loader will check the _primary_ partitions for one and only one 'active' partition and then boot from that. Grub itself couldn't care less about 'active' partitions.

Offline

#5 2011-06-06 16:31:02

651bobby
Member
Registered: 2011-06-06
Posts: 8

Re: GRUB: file not found

Hi thanks for your reply.

I have a more general question, when I install grub is grub supposed to install something to the first 512 or whatever bytes of the HDD to point to where the boot loader actually is?

The way I have a feeling it may have done this to the start of sda3 rather than sda. When I do a grub-install I get a 'Could not find device for /boot: Not found or not a block device'

I am getting to the point where I reckon my machine is fubar-ed enough not to bother trying to save it it's current state, :S

Offline

#6 2011-06-06 17:43:44

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: GRUB: file not found

651bobby wrote:

Hi thanks for your reply.

I have a more general question, when I install grub is grub supposed to install something to the first 512 or whatever bytes of the HDD to point to where the boot loader actually is?

The way I have a feeling it may have done this to the start of sda3 rather than sda. When I do a grub-install I get a 'Could not find device for /boot: Not found or not a block device'

I am getting to the point where I reckon my machine is fubar-ed enough not to bother trying to save it it's current state, :S

I would bet that your MBR (first sector of your disk) contains remnants of your debian grub. Debian uses grub2 which is notorious for wanting to decide it all - me, I far prefer grub legacy ... then _you_ (or _I_ as the case might be) is in complete control! (end rant)

If you have only _one_ linux - then it's ok to install grub (or grub2) on the MBR. If you have more than one, I would strongly suggest that you install to the first sector of the root (or /boot) filesystem. Actually, if you have more than one - I wouldn't bother about a seperate boot-partition, you will just end up in confusion as to which /boot belongs to which distro.

Seeing you also have 'that other OS', I would use the standard dos-loader on the MBR - this will look for one (and only one) active partition amongst the primary ones. In that case you can happily install arch's grub on sda3 (as in your case) and make this the active partition (boot-flag is set).
However, there is also no problems involved in putting it on the MBR - instructions are given below:

# installing grub on the mbr
grub
grub> root (hd0,2)    ## seeing your /boot-partition is on sda3
grub> setup (hd0)    ## install to MBR
grub> quit

# installing grub on sda3
grub
grub> root (hd0,2)
grub> setup (hd0,2)
grub> quit

In the latter case, you have to use fdisk to toggle the boot-flag so that sda3 is the 'active' partition.

The above is just my very personal opinion and there will be numerous others that think _their_ way is the best *shrug* Each to his or her own ...

Last edited by perbh (2011-06-06 17:46:20)

Offline

#7 2011-07-12 11:51:06

manuva
Member
Registered: 2011-07-04
Posts: 2

Re: GRUB: file not found

I had a similar problem, however it was easily fixed!

During the arch installation (2011.05) grub legacy on a fresh /boot partiton, where the previous boot partition had grub2 on it from a formerly installed ubuntu 10.10 install.  I installed grub legacy on my boot partition (sda4) during the arch installer, everything was dandy, however upon reboot I would get the error "File not found:" and it would display the "grub rescue>" prompt, where shit all can be done.  To remedy this, I rebooted with the live usb, I went into grub, (type "grub" at the command line) and reinstalled grub to the mbr of my drive, by typing

setup (hd0)

. Then upon normal reboot, everything was fixed!  I believe this error may have been caused by remnants of grub2 being left on the MBR.  For a further read have a good look through the grub page in the arch wiki, https://wiki.archlinux.org/index.php/Grub .
chur!

Offline

Board footer

Powered by FluxBB