Bug 158158

Summary: I2O grub install fails
Product: [Fedora] Fedora Reporter: Warren Togami <wtogami>
Component: grubAssignee: Peter Jones <pjones>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: katzj, markus.lidel
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-20 03:36:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 136450, 159043    
Attachments:
Description Flags
/proc/partitions
none
anaconda.log
none
anaconda-ks.cfg
none
install.log
none
install.log.syslog
none
grub.conf
none
device.map none

Description Warren Togami 2005-05-19 08:33:46 UTC
FC4 rawhide 20050518 fails I2O grub install.  This seems to have been broken
throughout most of FC4's development cycle.  ALT-F5 says this after installation
is complete:

grub> root(hd0,0)
 Filesystem type is ext2fs, partition type 0x83
grub> install /grub/stage1 d (hd0) /grub/stage2 p (hd0,0)/grub/grub.conf

Error 22: No such partition

My test install today was with Auto-Partitioning and LVM, but this happens with
non-LVM installs too.  I will attempt to get more data with a non-LVM simple
install on a single partition tomorrow.

Markus Lidel has more test information.

Comment 1 Jeremy Katz 2005-05-19 12:23:31 UTC
Note:  I'm not convinced this is a blocker since the hardware is not at all common

Comment 2 Warren Togami 2005-05-20 00:40:18 UTC
http://videl.ics.hawaii.edu/~warren/temp/anacdump.txt
Anaconda crash with dump when clicking on Next on the boot loader screen.  This
happened with Rawhide 20050519 but not 20050518.  pjones said to attach it here
anyway.

Comment 3 Warren Togami 2005-05-20 01:32:32 UTC
pjones found that the bug in #2 was already fixed in tomorrow's rawhide.  He
suggested "cp anaconda/iw/network_gui.py RHupdates" but it didn't seem to work.
 When was the last time this was tested?

I managed to workaround the problem by manually copying network_gui.py into
/tmp/updates/

Comment 4 Warren Togami 2005-05-20 01:37:24 UTC
Oh, msw said RHupdates doesn't work for FTP.


Comment 5 Warren Togami 2005-05-20 01:48:32 UTC
Created attachment 114601 [details]
/proc/partitions

Comment 6 Warren Togami 2005-05-20 01:49:13 UTC
Created attachment 114602 [details]
anaconda.log

Comment 7 Warren Togami 2005-05-20 01:50:19 UTC
Created attachment 114603 [details]
anaconda-ks.cfg

Comment 8 Warren Togami 2005-05-20 01:51:01 UTC
Created attachment 114604 [details]
install.log

Comment 9 Warren Togami 2005-05-20 01:51:58 UTC
Created attachment 114605 [details]
install.log.syslog

Comment 10 Warren Togami 2005-05-20 02:26:18 UTC
Created attachment 114606 [details]
grub.conf

Comment 11 Warren Togami 2005-05-20 02:27:32 UTC
Created attachment 114607 [details]
device.map

Comment 12 Warren Togami 2005-05-20 02:32:31 UTC
Apache screwed up the device.map, it actually looks like this:

# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/i2o/hda


Comment 13 Warren Togami 2005-05-20 02:51:49 UTC
/sbin/grub-install /dev/i2o/hda
 /dev/root: Not found or not a block device.

grub-install fails when done from chroot after installation is complete.  But it
worked after reboot into rescue mode.

Testing a reinstall now without modifying the partition table.


Comment 14 Warren Togami 2005-05-20 03:13:19 UTC
Failed after reinstall (without modifying the partition table)

Comment 15 Peter Jones 2005-05-20 03:36:28 UTC
Hopefully fixed in grub-0.95-13 , building for rawhide now.

Comment 16 Warren Togami 2005-05-20 08:45:38 UTC
I suspect this might need to be backported to RHEL4.  I will test.

* Thu May 19 2005 Peter Jones <pjones> 0.95-13
- don't treat i2o like a cciss device, since its partition names aren't done
  that way. (#158158)

diff -ur grub-0.94/lib/device.c grub-0.94.new/lib/device.c
--- grub-0.94/lib/device.c      2004-05-07 04:50:36.375238696 +0200
+++ grub-0.94.new/lib/device.c  2004-05-07 04:48:57.611253104 +0200
@@ -419,6 +419,12 @@
 {
   sprintf (name, "/dev/rd/c%dd%d", controller, drive);
 }
+
+static void
+get_i2o_disk_name (char *name, int unit)
+{
+  sprintf (name, "/dev/i2o/hd%c", unit + 'a');
+}
 #endif

 /* Check if DEVICE can be read. If an error occurs, return zero,
@@ -789,6 +795,26 @@
          }
       }
   }
+
+  /* I2O disks.  */
+  for (i = 0; i < 8; i++)
+    {
+      char name[16];
+
+      get_i2o_disk_name (name, i);
+      if (check_device (name))
+       {
+         (*map)[num_hd + 0x80] = strdup (name);
+         assert ((*map)[num_hd + 0x80]);
+
+         /* If the device map file is opened, write the map.  */
+         if (fp)
+           fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
+
+         num_hd++;
+       }
+    }
+
 #endif /* __linux__ */

   /* OK, close the device map file if opened.  */