mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Der Grub lies sich auf einigen RAID-Controllern nicht installieren...
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@963 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
2
lfs/grub
2
lfs/grub
@@ -78,6 +78,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-0.93-graphics-bootterm.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-0.95-xpmjunk.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-0.95-splash-error-term.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-0.95-moreraid.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-0.94-i2o.patch
|
||||
|
||||
cd $(DIR_APP) && perl -pi -e 's,/usr/lib/grub/i386-pc,/usr/share/grub/i386-pc,' docs/grub.texi
|
||||
cd $(DIR_APP) && sed -i 's/AM_INIT_AUTOMAKE/&\nAM_PROG_AS/' configure.ac
|
||||
|
||||
@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
|
||||
char *shortlangnames[] = { "de", "en", NULL };
|
||||
char **langtrs[] = { de_tr, en_tr, NULL };
|
||||
char hdletter;
|
||||
char harddrive[11], sourcedrive[5]; /* Device holder. */
|
||||
char harddrive[30], sourcedrive[5]; /* Device holder. */
|
||||
struct devparams hdparams, cdromparams; /* Params for CDROM and HD */
|
||||
int rc = 0;
|
||||
char commandstring[STRING_SIZE];
|
||||
@@ -200,7 +200,7 @@ int main(int argc, char *argv[])
|
||||
errorbox(ctr[TR_NO_HARDDISK]);
|
||||
goto EXIT;
|
||||
}
|
||||
fgets(harddrive, 11, handle);
|
||||
fgets(harddrive, 30, handle);
|
||||
fclose(handle);
|
||||
|
||||
/* load unattended configuration */
|
||||
|
||||
45
src/patches/grub-0.94-i2o.patch
Normal file
45
src/patches/grub-0.94-i2o.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
Only in grub-0.94/docs: grub.info
|
||||
Only in grub-0.94/docs: multiboot.info
|
||||
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. */
|
||||
100
src/patches/grub-0.95-moreraid.patch
Normal file
100
src/patches/grub-0.95-moreraid.patch
Normal file
@@ -0,0 +1,100 @@
|
||||
--- grub-0.95/lib/device.c.moreraid 2004-11-30 17:09:36.736099360 -0500
|
||||
+++ grub-0.95/lib/device.c 2004-11-30 17:12:17.319686944 -0500
|
||||
@@ -544,6 +544,17 @@
|
||||
}
|
||||
|
||||
static void
|
||||
+get_cciss_disk_name (char * name, int controller, int drive)
|
||||
+{
|
||||
+ sprintf (name, "/dev/cciss/c%dd%d", controller, drive);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+get_cpqarray_disk_name (char * name, int controller, int drive)
|
||||
+{
|
||||
+ sprintf (name, "/dev/ida/c%dd%d", controller, drive);
|
||||
+}
|
||||
+static void
|
||||
get_ataraid_disk_name (char *name, int unit)
|
||||
{
|
||||
sprintf (name, "/dev/ataraid/d%c", unit + '0');
|
||||
@@ -920,7 +931,7 @@
|
||||
|
||||
for (controller = 0; controller < 8; controller++)
|
||||
{
|
||||
- for (drive = 0; drive < 15; drive++)
|
||||
+ for (drive = 0; drive < 32; drive++)
|
||||
{
|
||||
char name[24];
|
||||
|
||||
@@ -940,6 +951,70 @@
|
||||
}
|
||||
}
|
||||
#endif /* __linux__ */
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+ /* This is for cciss - we have
|
||||
+ /dev/cciss/c<controller>d<logical drive>p<partition>.
|
||||
+
|
||||
+ cciss driver currently supports up to 8 controllers, 16 logical
|
||||
+ drives, and 7 partitions. */
|
||||
+ {
|
||||
+ int controller, drive;
|
||||
+
|
||||
+ for (controller = 0; controller < 8; controller++)
|
||||
+ {
|
||||
+ for (drive = 0; drive < 16; drive++)
|
||||
+ {
|
||||
+ char name[24];
|
||||
+
|
||||
+ get_cciss_disk_name (name, controller, drive);
|
||||
+ 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__ */
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+ /* This is for cpqarray - we have
|
||||
+ /dev/ida/c<controller>d<logical drive>p<partition>.
|
||||
+
|
||||
+ cpqarray driver currently supports up to 8 controllers, 16 logical
|
||||
+ drives, and 15 partitions. */
|
||||
+ {
|
||||
+ int controller, drive;
|
||||
+
|
||||
+ for (controller = 0; controller < 8; controller++)
|
||||
+ {
|
||||
+ for (drive = 0; drive < 15; drive++)
|
||||
+ {
|
||||
+ char name[24];
|
||||
+
|
||||
+ get_cpqarray_disk_name (name, controller, drive);
|
||||
+ 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. */
|
||||
if (fp)
|
||||
Reference in New Issue
Block a user