summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhpa <hpa>2004-12-21 22:32:12 +0000
committerhpa <hpa>2004-12-21 22:32:12 +0000
commit6eb3c5e7ade4e74c5446d1a0776c0f49c7072d07 (patch)
tree88813297cb9dbee080fa9a10943f44e123a52d55
parent525bbe0393f388e065447044b421b84b2e187c8c (diff)
downloadsyslinux-6eb3c5e7ade4e74c5446d1a0776c0f49c7072d07.tar.gz
extlinux: Document need for MBR, and usage on a RAID system.
Add cat.c32 as one of the sample programs.
-rw-r--r--com32/samples/Makefile4
-rw-r--r--com32/samples/cat.c31
-rw-r--r--extlinux.doc24
3 files changed, 57 insertions, 2 deletions
diff --git a/com32/samples/Makefile b/com32/samples/Makefile
index ddcdaa26..07d8156b 100644
--- a/com32/samples/Makefile
+++ b/com32/samples/Makefile
@@ -39,9 +39,9 @@ LNXLIBS = ../libutil/libutil_lnx.a
.SUFFIXES: .lss .c .o .elf .c32 .lnx
-all: hello.c32 \
+all: hello.c32 cat.c32 \
fancyhello.c32 fancyhello.lnx \
- keytest.c32 keytest.lnx
+ keytest.c32 keytest.lnx \
.PRECIOUS: %.o
%.o: %.S
diff --git a/com32/samples/cat.c b/com32/samples/cat.c
new file mode 100644
index 00000000..277427ff
--- /dev/null
+++ b/com32/samples/cat.c
@@ -0,0 +1,31 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <console.h>
+
+int main(int argc, char *argv[])
+{
+ FILE *f;
+ int ch;
+ int i;
+
+ openconsole(&dev_stdcon_r, &dev_stdcon_w);
+
+ printf("argv = %p\n", argv);
+ for ( i = 0 ; i <= argc ; i++ )
+ printf("argv[%d] = %p = \"%s\"\n", i, argv[i], argv[i]);
+
+ if ( argc < 2 ) {
+ fprintf(stderr, "Missing file name!\n");
+ exit(1);
+ }
+
+ printf("File = %s\n", argv[1]);
+
+ f = fopen(argv[1], "r");
+ while ( (ch = getc(f)) != EOF )
+ putchar(ch);
+
+ fclose(f);
+
+ return 0;
+}
diff --git a/extlinux.doc b/extlinux.doc
index 9844cb75..54e649d1 100644
--- a/extlinux.doc
+++ b/extlinux.doc
@@ -30,3 +30,27 @@ It works the same way as SYSLINUX, with a few slight modifications.
limited to 255 characters.
+
+Note that EXTLINUX installs in the filesystem partition like a
+well-behaved bootloader :) Thus, it needs a master boot record in the
+partition table; the mbr.bin shipped with SYSLINUX should work well.
+To install it just do:
+
+ cat mbr.bin > /dev/XXX
+
+... where /dev/XXX is the appropriate master device, e.g. /dev/hda,
+and make sure the correct partition in set active.
+
+
+If you have multiple disks in a software RAID configuration, the
+preferred way to boot is:
+
+- Create a separate RAID-1 partition for /boot. Note that the Linux
+ RAID-1 driver can span as many disks as you wish.
+
+- Install the MBR on *each disk*, and mark the RAID-1 partition
+ active.
+
+- Run "extlinux /boot" to install extlinux. This will install it on
+ all the drives in the RAID-1 set, which means you can boot any
+ combination of drives in any order.