LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   GRUB Error 25: Disk Read Error (https://www.linuxquestions.org/questions/linux-software-2/grub-error-25-disk-read-error-275052/)

haertig 01-07-2005 11:54 AM

GRUB Error 25: Disk Read Error
 
Hi. My system has WinXP installed and Fedora Core 3 also. Using grub to boot, I get Error 25 every time, no matter which of the grub menu choices I try to boot. I have four Linux kernals and one Windows OS as choices via grub. I have grub installed on a bootable CDROM, not in the MBR. I specified to put grub in the MBR when installindg core 3, but it appears to have ignored my request. If it indeed is there, it does nothing. Could be because it default boots to WinXp with a hiddenmenu (the default setup by intall). It doesn't recognize an <esc> keypress to bring up the hiddenmenu. I always boot straight to WinXP unless I use the grub CD I created. Bottom line: I don't really know if grub is in the MBR or not ... it doesn't work, and I'm using a CD (without hiddenmenu) instead.

I don't think there's anything wrong with my disk, as grub reports. I can boot just fine into Windows and access various partitions. I can also boot just fine into Linux, using a bootable CD which has the kernal on it. All partitions on my disk appear perfectly fine ... except when I attempt to use grub.

Below are my specifics. All looks good to me, AFAIK. Any ideas?

Thanks!

-----

[root@localhost tmp]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,4)
# kernel /vmlinuz-version ro root=/dev/sda10
# initrd /initrd-version.img
#boot=/dev/sda
default=4
timeout=5
splashimage=(hd0,4)/grub/splash.xpm.gz
#hiddenmenu
title Fedora Core 3 (2.6.9-1.724_FC3smp)
root (hd0,4)
kernel /vmlinuz-2.6.9-1.724_FC3smp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-1.724_FC3smp.img
title Fedora Core 3 (2.6.9-1.724_FC3)
root (hd0,4)
kernel /vmlinuz-2.6.9-1.724_FC3 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-1.724_FC3.img
title Fedora Core 3 (2.6.9-1.667smp)
root (hd0,4)
kernel /vmlinuz-2.6.9-1.667smp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-1.667smp.img
title Fedora Core 3 (2.6.9-1.667)
root (hd0,4)
kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-1.667.img
title Windows XP Professional
rootnoverify (hd0,0)
chainloader +1



[root@localhost tmp]# cat /boot/grub/device.map
# this device map was generated by anaconda
(fd0) /dev/fd0
(hd0) /dev/sda




[root@localhost tmp]# /sbin/fdisk -l

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5099 40957686 7 HPFS/NTFS
/dev/sda2 5100 10199 40965750 7 HPFS/NTFS
/dev/sda3 10200 14024 30724312+ c W95 FAT32 (LBA)
/dev/sda4 14025 19452 43600410 f W95 Ext'd (LBA)
/dev/sda5 14025 14037 104391 83 Linux
/dev/sda6 14038 16587 20482843+ 83 Linux
/dev/sda7 16588 17097 4096543+ 83 Linux
/dev/sda8 17098 17352 2048256 83 Linux
/dev/sda9 17353 17607 2048256 83 Linux
/dev/sda10 17608 17862 2048256 83 Linux
/dev/sda11 17863 17989 1020096 83 Linux
/dev/sda12 17990 18054 522081 82 Linux swap



[root@localhost tmp]# mount
/dev/sda10 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda5 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda7 on /home type ext3 (rw)
/dev/sda11 on /tmp type ext3 (rw)
/dev/sda6 on /usr type ext3 (rw)
/dev/sda8 on /usr/local type ext3 (rw)
/dev/sda9 on /var type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sda3 on /mnt/fat32 type vfat (rw)
/dev/hda on /media/cdrom type iso9660 (ro,nosuid,nodev,fscontext=system_u:object_r:removable_t,user=tmp)



[root@localhost tmp]# ls /boot
config-2.6.9-1.667 memtest86+-1.26
config-2.6.9-1.667smp System.map-2.6.9-1.667
config-2.6.9-1.724_FC3 System.map-2.6.9-1.667smp
config-2.6.9-1.724_FC3smp System.map-2.6.9-1.724_FC3
grub System.map-2.6.9-1.724_FC3smp
initrd-2.6.9-1.667.img vmlinuz-2.6.9-1.667
initrd-2.6.9-1.667smp.img vmlinuz-2.6.9-1.667smp
initrd-2.6.9-1.724_FC3.img vmlinuz-2.6.9-1.724_FC3
initrd-2.6.9-1.724_FC3smp.img vmlinuz-2.6.9-1.724_FC3smp
lost+found



[root@localhost tmp]# ls /boot/grub
device.map grub.conf.orig 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

Demonbane 01-07-2005 12:22 PM

How did you burn GRUB onto the CD? by using some kind of harddrive emulation?
Perhaps try go into the GRUB prompt, and check the list of harddrives it detected

haertig 01-07-2005 01:07 PM

Quote:

Originally posted by Demonbane
How did you burn GRUB onto the CD? by using some kind of harddrive emulation?

I did it just as described in the grub manual:

as root...

cd /tmp
mkdir iso
mkdir -p iso/boot/grub
cp /boot/grub/menu.lst /tmp/iso/boot/grub/.
cp /boot/grub/grub.conf /tmp/iso/boot/grub/.
cp /usr/share/grub/i386-redhat/stage2_eltorito /tmp/iso/boot/grub/.
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \
-boot-load-size 4 -boot-info-table -o grub.iso iso

...then burned a CD with that file "grub.iso" that mkisofs created

Actually, before running mkisofs, I manually edited menu.lst and grub.conf
(the files are identical - linked, normally) and commented out the default
setting of "hiddenmenu".

I think copying menu.lst was unnecessary given grub.conf, but it was harmless
to include this ... so I did. I can tell you from personal experience that having
menu.lst but not grub.conf will NOT work. I didn't test the other way around,
and just included both to be safe.
Quote:


Perhaps try go into the GRUB prompt, and check the list of harddrives it detected

Good idea! I didn't think of this.

From the grub command line prompt:

grub> root ( <TAB>

reports back:

"Possible disks are: fd0 hd0 hd2 cd"

This particular computer does not have a floppy drive, has a single SATA harddrive
partitioned into three primaries and one extended (extended contains all the
logical Linux partitions), a DVD-ROM drive, and a DVD-burner drive.

I can understand why grub (anaconda?) might have come up with that fd0 part
(wishful thinking perhaps?) but I don't understand how it came up with hd2. There
isn't one. And what happened with hd1? You'd think if it were "imagining" harddrives
that it would imagine them in sequential order.

But I think that hd2 part is probably not a problem since all the entries in grub.conf
point to hd0.

haertig 01-07-2005 02:59 PM

Some more info:

I boot from the grub CD. All choices from the menu still come back with "Error 25: Disk read error"

Then I type 'c' to get a grub command prompt.

Then I manually enter all the lines that I would expect one of my grub menu choices to do for me:

root (hd0,4)
kernel /vmlinuz-2.6.9-1.724_FC3 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-1.724_FC3.img
boot

And it WORKS! I boot right into the 724 kernel.

So ... why do MENU CHOICES give me that disk read error, while manually typing identical data at the grub command prompt DOES NOT???!!!

Grub is version 0.95, in case that matters.

I am so confused!!!

[edit]
By the way, it looks like what is known as "hd2" to grub is in fact the DVD-ROM drive that I am booting off of.
[/edit]

Demonbane 01-08-2005 10:40 AM

maybe its a bug in GRUB, im not sure
This is a long shot, but try also specifying the drive and partition on the kernel image and initrd(though it should matter as long as you specified root)
eg
kernel (hd0,4)/vmlinuz-xxx
initrd (hd0,4)/initrd-xx

or maybe add "boot" to the end of each entry

Vijairaj 01-08-2005 11:49 AM

type 'e' to edit the command and see if it actuall is what it should be, otherwise there should have been error in reading the configuration file.

<tip>
you cans use 'find /vmlinuz-2.6.9-1.724_FC3smp' to search..
</tip>

homey 01-08-2005 01:22 PM

Here is how I put the boot menu on cdrom with inspiration from the RIP livecd boot menu which is grub operated.

Run the commands which you already posted.
Code:

cd /tmp
mkdir iso
mkdir -p iso/boot/grub
cp /boot/grub/menu.lst /tmp/iso/boot/grub/.
cp /boot/grub/grub.conf /tmp/iso/boot/grub/.
cp /usr/share/grub/i386-redhat/stage2_eltorito /tmp/iso/boot/grub/.
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \
-boot-load-size 4 -boot-info-table -o grub.iso iso

Then I edit the grub.conf and menu.lst to change your kernel line from this ....
kernel /vmlinuz-2.6.9-1.724_FC3 ro root=LABEL=/ rhgb quiet
to look like this .....
kernel /vmlinuz-2.6.9-1.724_FC3 ro root=/dev/hda5 rhgb quiet

Here is my cdrom grub.conf for a dual boot system where linux is on /dev/hdb2
Where vmlinuz and initrd.img are linked to the real file names on the hard drive.
Code:

        color light-gray/blue black/light-gray
title *=*=*=*=*=*=*=*=*=*=*=* CDROM BOOT *=*=*=*=*=*=*=*=*=*=*=*=*=*=*
root (hd0)
title Windows
        rootnoverify (hd0,0)
        chainloader +1
title Fedora Core
        root (hd1,1)
        kernel /boot/vmlinuz ro root=/dev/hdb2 rhgb quiet
        initrd /boot/initrd.img

Note: It would probably be a good idea to link the vmlinuz-2.6.9-1.724_FC3 to vmlinuz and initrd-2.6.9-1.724_FC3.img to initrd.img . Then reference vmlinuz and initrd.img in the cdrom boot menu so you don't have to reburn the cdrom every time you upgrade the kernel.


All times are GMT -5. The time now is 03:01 PM.