I have 2 Hard discs.
hd0 is IDE.
hd1 is SCSI   The SCSI controller is a very old Adaptec AHA-2940.


After booting from a floppy containing grub: -


grub> geometry (hd0)
Displays geometry and returns to grub> prompt.
grub> geometry (hd1)
Displays geometry and causes an immeadiate reboot!

It is only the SCSI drive that has problems.

hd1 has only one primary partition, containing a FAT32 formatted partition with Windows 98 on it.

From looking at the grub source code, it looks like: -
File is stage2/builtins.c

/* geometry */
static int
geometry_func (char *arg, int flags)
{

<snip>
  grub_printf ("drive 0x%x: C/H/S = %d/%d/%d, "
               "The number of sectors = %d, %s\n",
               current_drive,
               geom.cylinders, geom.heads, geom.sectors,
               geom.total_sectors, msg);
  real_open_partition (1);


return 0; }


So, as it gets and actually prints that information from the grub_printf, my guess is the problem is in real_open_partition(1).


What exactly does real_open_partition(1) do, and can I remove that line for test purposes?

If by removing it, the geometry command works, I can then look at the real_open_partition function, and add a few grub_printf's to see where it reboots.
Does grub have a "grub_pause_for_1_second" function? That would also help by giving me a chance to see what is printed before the reboot.


Cheers
James


_______________________________________________ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub

Reply via email to