LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-15-2010, 01:47 AM   #1
chadwick
Member
 
Registered: Apr 2005
Location: At the 100th Meridian where the great plains begin
Distribution: Debian Testing on T60 laptop
Posts: 105

Rep: Reputation: 17
Legacy grub with RAID 1 says Error 15: file not found


THIS ISSUE IS SOLVED. SEE SOLUTION IN POST THAT FOLLOWS.

I've copied a Fedora 9 installation onto a RAID 1 on my Dell Vostro 220 desktop. There are three hard drives on my system: the two internal drives that make up the RAID 1, and one USB drive. I'm able to boot into the RAID by loading the kernel and initial ram disk image from a partition on the external drive but can't boot into the RAID by loading them from a partition on one of the RAID disks (Grub tells me "Error 15: File not found"). I'm using legacy grub (GNU GRUB 0.97). As far as I can tell, the problem is that grub is unable to see the files on the partitions that hold /boot on the RAID 1.

Here's some information on the two internal drives and how their partitions are set up.

/etc/fstab:
Code:
# /etc/fstab: static file system information.
# <file system>       <mount point>            <type>  <options>       <dump>  <pass>
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0

#with uuids it doesn't mount at boot.  So use device names instead.
/dev/md1 /       ext3    errors=remount-ro        1 1  #/dev/md1
/dev/md0 /boot   ext3    defaults                 1 1  #/dev/md0
/dev/md7 /home   ext3    defaults                 1 1  #/dev/md7
/dev/md5 /opt    ext3    defaults                 1 1  #/dev/md5
/dev/md3 /tmp    ext3    defaults                 1 1  #/dev/md3
/dev/md2 /usr    ext3    defaults                 1 1  #/dev/md2
/dev/md4 /var    ext3    defaults                 1 1  #/dev/md4
/dev/md6 swap    swap    defaults                 0 0
When successfully booted into the internal array, cat /proc/mdstat says:
Code:
Personalities : [raid1] [raid6] [raid5] [raid4]
md7 : active raid1 sda11[0] sdb11[1]
      223640768 blocks [2/2] [UU]
     
md5 : active raid1 sda9[0] sdb9[1]
      3100416 blocks [2/2] [UU]
     
md4 : active raid1 sda8[0] sdb8[1]
      3100416 blocks [2/2] [UU]
     
md3 : active raid1 sda7[0] sdb7[1]
      2096384 blocks [2/2] [UU]
     
md2 : active raid1 sda6[0] sdb6[1]
      8707072 blocks [2/2] [UU]
     
md0 : active raid1 sda2[0] sdb2[1]
      104320 blocks [2/2] [UU]
     
md6 : active raid1 sda10[0] sdb10[1]
      2819264 blocks [2/2] [UU]
     
md1 : active raid1 sda5[0] sdb5[1]
      513984 blocks [2/2] [UU]
     
unused devices: <none>
When successfully booted into the internal array, ls /boot/ says:
Code:
$ ls /boot/
config-2.6.25-14.fc9.i686          initrd-2.6.27.25-78.2.56.fc9.i686.img    System.map-2.6.25-14.fc9.i686
config-2.6.27.25-78.2.56.fc9.i686  initrd-new-2.6.25-14.fc9.i686.img       System.map-2.6.27.25-78.2.56.fc9.i686
efi                                initrd-new-2.6.25-14.fc9.i686.img_old   vmlinuz-2.6.25-14.fc9.i686
grub                               initrd-new-2.6.25-14.fc9.i686.img_old2  vmlinuz-2.6.27.25-78.2.56.fc9.i686
initrd-2.6.25-14.fc9.i686.img      lost+found
and ls /boot/grub says:
Code:
$ ls /boot/grub
device.map     grub.conf~        reiserfs_stage1_5  vstafs_stage1_5
e2fs_stage1_5  iso9660_stage1_5  splash.xpm.gz      xfs_stage1_5
fat_stage1_5   jfs_stage1_5      stage1
ffs_stage1_5   menu.lst          stage2
grub.conf      minix_stage1_5    ufs2_stage1_5
Now the problem occurs when I try to boot into the array using initrd-new-2.6.25-14.fc9.i686.img and vmlinuz-2.6.25-14.fc9.i686
I have identical copies of these two files on /boot/ in the USB drive. I expect to be able to load them either from the internal drives or from the USB drive.

The entire Linux installation on the USB drive is on the 5th partition (starting from 1), i.e. if you are booted into that drive then / (and everything else) is on /dev/sda5.

My /boot/grub/menu.lst on the internal array looks like the following:

Code:
default=0
timeout=5
splashimage=(hd2,4)/boot/grub/splash.xpm.gz

title Boot into local drive while loading from external drive 
    root (hd2,4) 
    kernel /boot/vmlinuz-2.6.25-14.fc9.i686 ro root=/dev/md1 rhgb quiet
    initrd /boot/initrd-new-2.6.25-14.fc9.i686.img

title Boot into external drive while loading from external drive
    root (hd2,4)
    kernel /boot/vmlinuz-2.6.25-14.fc9.i686 ro root=UUID=c9f1edad-0ed4-4e02-9dec-8cc300f46415 rhgb quiet
    initrd /boot/initrd-2.6.25-14.fc9.i686.img

title Boot into local drive while loading from local drive
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.25-14.fc9.i686 ro root=/dev/md1 rhgb quiet
    initrd /boot/initrd-new-2.6.25-14.fc9.i686.img

title Boot into local drive while loading from local drive
    root (hd1,1)
    kernel /boot/vmlinuz-2.6.25-14.fc9.i686 ro root=/dev/md1 rhgb quiet
    initrd /boot/initrd-new-2.6.25-14.fc9.i686.img
Note that when I load the splash image, kernel and initial ram disk image from the USB drive, I'm doing so after telling the BIOS to boot into one of the internal drives, and the commands to load those files are being read from the /boot/grub/menu.lst that's located on that internal drive.

The splash image exists in /boot/grub/ on both the array and the USB drive. So I'd expect the splash image to show up if I use either
splashimage=(hd2,4)/boot/grub/splash.xpm.gz or
splashimage=(hd0,1)/boot/grub/splash.xpm.gz or
splashimage=(hd1,1)/boot/grub/splash.xpm.gz
However, if I use
splashimage=(hd0,1)/boot/grub/splash.xpm.gz or
splashimage=(hd1,1)/boot/grub/splash.xpm.gz
then it doesn't display the splash image.
If I use
splashimage=(hd2,4)/boot/grub/splash.xpm.gz
then it does display the splash image.

I've tried using lots of different (hdx,y) with x being 0 or 1 and y varying from 0 to 10.

So from this it seems to me that for some reason grub isn't able to read what's on the /boot partitions of the RAID pair of disks, even though there's no problem reading /boot/grub/menu.lst.

Now something else possibly related.
If I run grub while booted into the array and do setup (hd0) then it tells me that /boot/grub/stage1 does not exist but /grub/stage1 does:
Code:
root-prompt# grub
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> root (hd0,1)
root (hd0,1)
 Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
setup (hd0)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/e2fs_stage1_5" exists... yes
 Running "embed /grub/e2fs_stage1_5 (hd0)"...  23 sectors are embedded.
succeeded
 Running "install /grub/stage1 (hd0) (hd0)1+23 p (hd0,1)/grub/stage2 /grub/grub.conf"... succeeded
Done.
grub> quit  
quit
This is not what I would have expected from what ls is telling me about the existence of those files, and from reading what's here: http://www.texsoft.it/index.php?c=ha...grubraid1&l=it (under the title "Enabling boot from both disks").

Now something else possibly related. If I use the "find" command from within grub (again while booted into the array), then it finds the kernel located at (hd2,4) but does not find the ones located on the array.

First with the USB drive plugged in:
Code:
# grub
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> find /boot/initrd-new-2.6.25-14.fc9.i686.img
find /boot/initrd-new-2.6.25-14.fc9.i686.img
 (hd2,4)
grub>
Now unplug the USB drive:
Code:
# grub
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub>  find /boot/initrd-new-2.6.25-14.fc9.i686.img
 find /boot/initrd-new-2.6.25-14.fc9.i686.img

Error 15: File not found
grub>
By the way, I have some proprietary hardware that only has binary drivers for very specific kernels, so that's why I'm using an old kernel that came with Fedora 9. I mention that in case anyone's wondering why I'd be setting up a system with Fedora 9 and an old kernel.

Last edited by chadwick; 05-16-2010 at 04:13 PM.
 
Old 05-16-2010, 03:50 PM   #2
chadwick
Member
 
Registered: Apr 2005
Location: At the 100th Meridian where the great plains begin
Distribution: Debian Testing on T60 laptop
Posts: 105

Original Poster
Rep: Reputation: 17
Here's what was up with that.

Okay, here's what was up with that.
  • The /boot directory itself exists in the partition that gets mounted at /. It therefore does not exist in the partition that gets mounted at /boot. The separate /boot partition doesn't get mounted at /boot until grub is done with its stuff.
  • When I told grub "root (hd0,1)", that much was correct; I was telling it to look in the right partition.
  • Presumably grub already knew where to look for menu.lst since I wasn't the one telling it where to look for that. But when I gave it instructions within menu.lst about where to look for files, I told it to look under /boot. I needed to tell it to just look under / since the stuff it needed was at the top of the directory tree on the partition where it was looking.
  • On my USB drive, everything's on the same partition. In that case the entire directory structure already exists when grub is doing its stuff. So it was indeed correct to tell grub to look in the /boot directory. But when copying things over to the new system, it wasn't correct to assume the same root directory when stating the path to the files.
  • So I needed something like the following instead:

    Code:
    title Boot into local drive while loading from local drive
        root (hd0,1)
        kernel /vmlinuz-2.6.25-14.fc9.i686 ro root=/dev/md1 rhgb quiet
        initrd /initrd-new-2.6.25-14.fc9.i686.img

Last edited by chadwick; 05-16-2010 at 04:12 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub Error 15 File Not Found titinail Linux From Scratch 12 05-14-2010 07:57 AM
grub > Error 15: File not found jpeters Linux From Scratch 15 04-26-2009 01:09 AM
SLED 10 sp1 x64, RAID 0, GRUB error 17 partition not found. korak SUSE / openSUSE 4 05-04-2008 05:14 PM
grub Error 15: File not found lowbrow Debian 2 11-10-2007 06:52 PM
GRUB, SUSE, Error 15 File Not Found fizgigtiznalkie Linux - Distributions 2 08-31-2004 05:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration