GRUB Problem: stage2Read Error

From: Grant Forrester (grant_at_forresterfamily.f2s.com)
Date: 01/30/04


Date: 29 Jan 2004 16:58:09 -0800

I am trying to install Grub on a Sandisk 16Mb CompactFlash card using
an IDE adapter.
When I try and boot from the CF Card I get the following error.

Verifying DMI Pool Data........
GRUB Loading stage2Read Error

I would be really grateful if someone could explain what this error
message means or help shed some light on how to resolve the problem.
How do I get more info?

The history of how I set up the card is outlined below. Apologies for
the length of the email.

I really would be grateful for any help or pointers.

Thanks in advance
Grant Forrester

System: Via ITX ME6000 mainboard
OS: Redhat 7.3
Primary Master: Excelstor 20Gb HDD
Secondary Master: Sandisk SDCFB-16 + IDE Adpator

BIOS

----
Inspection of the BIOS reveals the CF card has been correctly
identified as the master device on the seconday ide channel. The
properties for the card are given as:
size: 16Mb
Cylinders: 490
Heads: 2
Sectors: 32
I have checked and confirmed these to be correct in accordance with
Sandisks own documentation.
FDISK (v2.11n)
-----
On booting the full Redhat installation on my main HDD (/dev/hda) I
can inspect and set the partition table on the CF card (/dev/hdc)
using fdisk as follows:
$ fdisk /dev/hdc
Disk /dev/hdc: 2 heads, 32 sectors, 490 cylinders
Units = cylinders of 64 * 512 bytes
   Device Boot    Start       End    Blocks   Id  System
/dev/hdc1   *         1       490     15664   83  Linux
MKE2FS (v1.27)
------
The single partition on the CF card (/dev/hdc1) is then formatted as
an ext2fs filesystem as follows:
$ mke2fs /dev/hdc1
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
3920 inodes, 15664 blocks
783 blocks (5.00%) reserved for the super user
First data block=1
2 block groups
8192 blocks per group, 8192 fragments per group
1960 inodes per group
Superblock backups stored on blocks:
        8193
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
The filesystem can then be mounted on /mnt/flash and inspected as
follows:
$ mount /dev/hdc1 /mnt/flash
$ ls /mnt/flash
lost+found
Copy GRUB and boot files
------------------------
All the files found in my Redhat /boot/grub directory are then copied
to the flash folder /grub as follows:
$ cp -R /boot/grub /mnt/flash
$ ls -l /mnt/flash/grub
-rw-r--r--    1 root     root          101 Jan 27 20:49 device.map
-rw-r--r--    1 root     root        10880 Jan 27 20:49 e2fs_stage1_5
-rw-r--r--    1 root     root         9808 Jan 27 20:49 fat_stage1_5
-rw-r--r--    1 root     root         8896 Jan 27 20:49 ffs_stage1_5
-rw-------    1 root     root          667 Jan 27 20:49 grub.conf
-rw-r--r--    1 root     root        11104 Jan 27 20:49 jfs_stage1_5
lrwxrwxrwx    1 root     root           11 Jan 27 20:49 menu.lst ->
./grub.conf
-rw-r--r--    1 root     root         9280 Jan 27 20:49 minix_stage1_5
-rw-r--r--    1 root     root        12576 Jan 27 20:49
reiserfs_stage1_5
-rw-r--r--    1 root     root        33585 Jan 27 20:49 splash.xpm.gz
-rw-r--r--    1 root     root          512 Jan 27 20:49 stage1
-rw-r--r--    1 root     root       131008 Jan 27 20:49 stage2
-rw-r--r--    1 root     root         8544 Jan 27 20:49
vstafs_stage1_5
-rw-r--r--    1 root     root        12744 Jan 27 20:49 xfs_stage1_5
The kernel and initrd images I require are then copied to /mnt/flash.
(I have successfully booted from these images using a temporary grub
boot option in my existing Redhat install /dev/hda so I know they
work).
$ ls -l /mnt/flash
drwxr-xr-x    2 root     root         1024 Jan 27 20:49 grub
-rw-r--r--    1 root     root      8388608 Jan 27 20:53 ice3.img
drwx------    2 root     root        12288 Jan 27 20:44 lost+found
-rw-r--r--    1 root     root      1041347 Jan 27 20:53
vmlinuz-2.4.18-3
Do GRUB magic (0.91)
-------------
Start the grub console and wait for the BIOS probing to end.
Available devices detected are (hd0) HDD and (hd1) Sandisk CF card.
The GRUB session is as follows.
grub> geometry (hd1)
  drive 0x81: C/H/S = 490/2/32, The number of sectors = 31360,
/dev/hdc
  Partition num: 0, Filesystem type is ext2fs, partition type 0x83
  
grub> root (hd1,0)
 Filesystem type is ext2fs, partition type 0x83
 
grub> setup (hd1,0)
 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 (hd1,0)"... failed (this is not
fatal)
 Running "embed /grub/e2fs_stage1_5 (hd1,0)"... failed (this is not
fatal)
 Running "install /grub/stage1 d (hd1,0) /grub/stage2 p
/grub/grub.conf "... succeeded
 Done.
 
 
Reboot
------
On reboot I switched the boot order to start with HDD1 (ie the CF
card) rather than my disk.  I get the error 'GRUB Loading stage2Read
Error'.
I even tried removing my existing HDD and plugging the CF card into
the primary IDE channel making it HDD0.  Resetting the BIOS to boot
from HDD0 results in the same error message.
Any help please?


Relevant Pages

  • Re: Software Raid On Boot
    ... The BIOS only job is to allow execution of the code in the MBR of the boot ... Grub stage1 is written into the boot sector, ... boot is that it can access the filesystem without using md. ... For a mirror that's ...
    (Fedora)
  • [9fans] Plan 9 on a SunPCI card.
    ... I would like to install Plan 9 on a SunPCI IIIpro card, ... this card can either use a harddrive image to boot ... it has a network port) directly (it can network boot thru grub when grub ...
    (comp.os.plan9)
  • Re: Software Raid On Boot
    ... Grub stage1 is written into the boot sector, including the block location on disk of the next stage it must bootstrap. ... There is nothing to prevent you combining hda and hdc, being like drives and taking a slice of each as ext2 of the same size, installing grub & the kernel to hda1, grub also to /dev/hdc1 and at convenient times just running dd to mirror the partition. ... All that's necessary for grub to boot is that it can access the filesystem without using md. ...
    (Fedora)
  • Re: Managing the physical re-arrangement of my disks (boot sector question and lvm question)
    ... re-install it as /dev/hda it just boots up the root filesystem in its ... and adjust a few mount points, but what about the boot sector. ... A simpler approach would be to make yourself a GRUB boot CD or a GRUB ... If I move a disk to a different device, will the LVM PV on the disk still work ...
    (Debian-User)
  • Re: Grub config file editing
    ... Is there not a simple text editor in Grub? ... Certainly you can do command line editing with grub during boot (the ... cannot write to a filesystem that is not even mounted yet. ...
    (Fedora)