/usr/share/doc/HOWTO/ja-html/Root-RAID-HOWTO-4.html is in doc-linux-ja-html 2006.05.25-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
<TITLE>Root RAID HOWTO cookbook: RAID $B$r%k!<%H$H$7$F%^%&%s%H$9$k$?$a$N(B initrd $B$N2r@b(B</TITLE>
<LINK HREF="Root-RAID-HOWTO-5.html" REL=next>
<LINK HREF="Root-RAID-HOWTO-3.html" REL=previous>
<LINK HREF="Root-RAID-HOWTO.html#toc4" REL=contents>
</HEAD>
<BODY>
<A HREF="Root-RAID-HOWTO-5.html">$B<!$N%Z!<%8(B</A>
<A HREF="Root-RAID-HOWTO-3.html">$BA0$N%Z!<%8(B</A>
<A HREF="Root-RAID-HOWTO.html#toc4">$BL\<!$X(B</A>
<HR>
<H2><A NAME="s4">4.</A> <A HREF="Root-RAID-HOWTO.html#toc4">RAID $B$r%k!<%H$H$7$F%^%&%s%H$9$k$?$a$N(B <I>initrd</I> $B$N2r@b(B</A></H2>
<P>$B$3$l$O(B RAID $B$NI|5l%D!<%k(B(rescue tools) $B$r4^$`(B `initrd' RAM$B%G%#%9%/$r(B
$B:n$k$?$a$N<jB3$-$G$9!%(B</P>
<P>$BK\J8=q$G$OFC$K(B RAID1 $B$H(B RAID5 $B$N<BAu$K$D$$$F@bL@$r9T$$$^$9!%(B</P>
<H2><A NAME="ss4.1">4.1</A> <A HREF="Root-RAID-HOWTO.html#toc4.1">$B%;%-%e%j%F%#$K4X$9$kCm0U;v9`(B</A>
</H2>
<P>$BI|5lMQ$N%U%!%$%k%7%9%F%`$O%9%?%s%I%"%m%s$G;HMQ$G$-$^$9!%(BRAID $B%"%l%$$N(B
$B%^%&%s%H$K<:GT$7$?>l9g!$I|5l%7%9%F%`$,%^%&%s%H$5$l$FF0:n$7$^$9!%(B
<B>$B$G$9$+$i%;%-%e%j%F%#$K$O==J,Cm0U$7$F$/$@$5$$!*(B</B></P>
<H2><A NAME="ss4.2">4.2</A> <A HREF="Root-RAID-HOWTO.html#toc4.2">$B%+!<%M%k$H(B RAID $B%D!<%k$N9=C[(B</A>
</H2>
<P>$B:G=i$N:n6H$O!$%Q%C%A$rEv$F$F%+!<%M%k$r:F9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$,!$>/$7>.$5$$%7%9%F%`$K$J$j$^$9!%(B</P>
<H2><A NAME="ss4.4">4.4</A> <A HREF="Root-RAID-HOWTO.html#toc4.4">$B%9%F%C%W!&%P%$!&%9%F%C%W$N<j=g(B</A>
</H2>
<P>$B%f!<%6(B root $B$N%[!<%`%G%#%l%/%H%j(B(/root)$B$G0J2<$N%3%^%s%I$r<B9T$7$^$9(B:</P>
<P>
<PRE>
cd /root
mkdir raidboot
cd raidboot
</PRE>
</P>
<P>$B%^%&%s%H%]%$%s%H$r:n@.$7$^$9!%(B</P>
<P>
<PRE>
mkdir mnt
mkdir mnt2
</PRE>
</P>
<P>$B%U%!%$%k%7%9%F%`$r%$%s%9%H!<%k$9$k$N$K==J,$JBg$-$5$N%U%!%$%k$r:n$j$^$9!%(B
$B$3$l$O:G=*E*$JI|5l%U%!%$%k%7%9%F%`$h$j$:$C$HBg$-$/$J$j$^$9!%(B16$B%a%,%P%$(B
$B%H$G$O==J,$G$O$J$+$C$?$N$G!$;d$O(B24$B%a%,%P%$%H;H$&$3$H$K$7$^$7$?!%(B
<PRE>
dd if=/dev/zero of=build bs=1024k count=24
</PRE>
$B%U%!%$%k$r(B loop $B%G%P%$%9$H$7!$(Bext2 $B%U%!%$%k%7%9%F%`$r$3$N%U%!%$%k>e$K(B
$B:n@.$7$^$9!%(B</P>
<P>
<PRE>
losetup /dev/loop0 build
mke2fs -v -m0 -L initrd /dev/loop0
mount /dev/loop0 mnt
</PRE>
</P>
<H2><A NAME="ss4.5">4.5</A> <A HREF="Root-RAID-HOWTO.html#toc4.5">$B%G%#%9%H%j%S%e!<%7%g%s$N%$%s%9%H!<%k(B (Slackware $B$N>l9g$N$_(B)</A>
</H2>
<P>Slackware $B$K$7$+DLMQ$7$J$$OCBj$J$N$G!$(BSlackware $B0J30$N%G%#%9%H%j%S%e!<(B
$B%7%g%s$r;H$&>l9g$K$O(B
<A HREF="#threads">$B<!$N>O$K?J$s$G(B</A>$B$/$@$5$$!%(B</P>
<P>$B8=:_$O6u$N%U%!%$%k%7%9%F%`$,:n$i$l$F%^%&%s%H$5$l$F$$$k>uBV$G$9!%(B
$B$3$3$G(B"setup"$B$r<B9T$7$^$9!%(B</P>
<P><B>'target'</B> $B$K$O(B</P>
<P>
<PRE>
/root/raidboot/mnt
</PRE>
</P>
<P>$B$r;XDj$7$^$9!%(B`source'$B$K$ODL>o$N%$%s%9%H!<%k85$rE,59;XDj$7$^$9!%%Q%C%1!<(B
$B%8A*Br$O<+M3$K9T$C$F$+$^$$$^$;$s$,!$(B`configure' $B$O(B<B>$B9T$o$J$$$G$/$@$5$$(B</B>$B!%(B</P>
<P>$B%W%m%s%W%H$N%b!<%I$H$7$F$O(B `EXPERT' $B$rA*Br$7$^$9!%(B</P>
<P>$B;d$O%7%9%F%`$N:G>.9=@.$N(B `A', `AP', `N' $B$K2C$(!$;H$$47$l$F$$$F%5%$%:$b(B
$B>.$5$$%(%G%#%?(B(vi, jed, joe)$B$rA*Br$7$^$7$?!%(B
<PRE>
lqqqqqqqq SELECTING PACKAGES FROM SERIES A (BASE LINUX SYSTEM) qqqqqqqqk
x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
x x [X] aaa_base Basic filesystem, shell, and utils - REQUIRED x x
x x [X] bash GNU bash-1.14.7 shell - REQUIRED x x
x x [X] devs Device files found in /dev - REQUIRED x x
x x [X] etc System config files & utilities - REQUIRED x x
x x [X] shadow Shadow password suite - REQUIRED x x
x x [ ] ide Linux 2.0.30 no SCSI (YOU NEED 1 KERNEL) x x
x x [ ] scsi Linux 2.0.30 with SCSI (YOU NEED 1 KERNEL) x x
x x [ ] modules Modular Linux device drivers x x
x x [ ] scsimods Loadable SCSI device drivers x x
x x [X] hdsetup Slackware setup scripts - REQUIRED x x
x x [ ] lilo Boots Linux (not UMSDOS), DOS, OS/2, etc. x x
x x [ ] bsdlpr BSD lpr - printer spooling system x x
x x [ ] loadlin Boots Linux (UMSDOS too!) from MS-DOS x x
x x [ ] pnp Plug'n'Play configuration tool x x
x x [ ] umsprogs Utilities needed to use the UMSDOS filesystem x x
x x [X] sysvinit System V-like INIT programs - REQUIRED x x
x x [X] bin GNU fileutils 3.12, elvis, etc. - REQUIRED x x
x x [X] ldso Dynamic linker/loader - REQUIRED x x
x x [ ] ibcs2 Runs SCO/SysVr4 binaries x x
x x [X] less A text pager utility - REQUIRED x x
x x [ ] pcmcia PCMCIA card services support x x
x x [ ] getty Getty_ps 2.0.7e - OPTIONAL x x
x x [X] gzip The GNU zip compression - REQUIRED x x
x x [X] ps Displays process info - REQUIRED x x
x x [X] aoutlibs a.out shared libs - RECOMMENDED x x
x x [X] elflibs The ELF shared C libraries - REQUIRED x x
x x [X] util Util-linux utilities - REQUIRED x x
x x [ ] minicom Serial transfer and modem comm package x x
x x [ ] cpio The GNU cpio backup/archiving utility x x
x x [X] e2fsbn Utilities for the ext2 file system x x
x x [X] find GNU findutils 4.1 x x
x x [X] grep GNU grep 2.0 x x
x x [ ] kbd Change keyboard mappings x x
x x [X] gpm Cut and paste text with your mouse x x
x x [X] sh_utils GNU sh-utils 1.16 - REQUIRED x x
x x [X] sysklogd Logs system and kernel messages x x
x x [X] tar GNU tar 1.12 - REQUIRED x x
x x [ ] tcsh Extended C shell version 6.07 x x
x x [X] txtutils GNU textutils-1.22 - REQUIRED x x
x x [ ] zoneinfo Configures your time zone x x
x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
</PRE>
`AP' $B%7%j!<%:$+$i$O;d$N9%$-$J%(%G%#%?(B `JOE' $B$H%3%s%Q%/%H$GJXMx$J%U%!%$(B
$B%kA`:n%D!<%k$G$"$k(B `MC' $B$@$1$rA*Br$7$^$7$?!%$3$3$OI,MW$K1~$8$F%f!<%F%#(B
$B%j%F%#$rA*Br$7$F$/$@$5$$!%(B
<PRE>
lqqqqqqqqq SELECTING PACKAGES FROM SERIES AP (APPLICATIONS) qqqqqqqqqk
x x [ ] ispell The International version of ispell x x
x x [ ] jove Jonathan's Own Version of Emacs text editor x x
x x [ ] manpgs More man pages (online documentation) x x
x x [ ] diff GNU diffutils x x
x x [ ] sudo Allow special users limited root access x x
x x [ ] ghostscr GNU Ghostscript version 3.33 x x
x x [ ] gsfonts1 Ghostscript fonts (part one) x x
x x [ ] gsfonts2 Ghostscript fonts (part two) x x
x x [ ] gsfonts3 Ghostscript fonts (part three) x x
x x [ ] jed JED programmer's editor x x
x x [X] joe joe text editor, version 2.8 x x
x x [ ] jpeg JPEG image compression utilities x x
x x [ ] bc GNU bc - arbitrary precision math language x x
x x [ ] workbone a text-based audio CD player x x
x x [X] mc The Midnight Commander file manager x x
x x [ ] mt_st mt ported from BSD - controls tape drive x x
x x [ ] groff GNU troff document formatting system x x
x x [ ] quota User disk quota utilities x x
x x [ ] sc The 'sc' spreadsheet x x
x x [ ] texinfo GNU texinfo documentation system x x
x x [ ] vim Improved vi clone x x
x x [ ] ash A small /bin/sh type shell - 62K x x
x x [ ] zsh Zsh - a custom *nix shell x x
x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
</PRE>
`N' $B%Q%C%1!<%8$+$i$O(B TCP/IP $B$@$1$rF~$l$^$7$?!%$3$l$OI,$:$7$bI,MW$G$O$"(B
$B$j$^$;$s$,!$Hs>o$KJXMx$G$9$7!$%k!<%H$K(B RAID $B%"%l%$$,%^%&%s%H$5$l$F$$$J(B
$B$$>uBV$GI|5l$d99?7$N:n6H$r9T$&:]$K%M%C%H%o!<%/$K%"%/%;%9$G$-$k$h$&$K$J(B
$B$j$^$9!%(BTCP/IP $B$K$O(B `A' $B$K4^$^$l$k%"%W%j%1!<%7%g%s$N$$$/$D$+$,;HMQ$9$k(B
`biff' $B$b4^$s$G$$$^$9!%(B`N' $B$r%$%s%9%H!<%k$7$J$+$C$?$H$7$F$b!$(Bbiff $B%Q%C(B
$B%1!<%8$OF~$l$?$/$J$k$H;W$$$^$9!%(B
<PRE>
lqqqq SELECTING PACKAGES FROM SERIES N (NETWORK/NEWS/MAIL/UUCP) qqqqqk
x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
x x [ ] apache Apache WWW (HTTP) server x x
x x [ ] procmail Mail delivery/filtering utility x x
x x [ ] dip Handles SLIP/CSLIP connections x x
x x [ ] ppp Point-to-point protocol x x
x x [ ] mailx The mailx mailer x x
x x [X] tcpip TCP/IP networking programs x x
x x [ ] bind Berkeley Internet Name Domain server x x
x x [ ] rdist Remote file distribution utility x x
x x [ ] lynx Text-based World Wide Web browser x x
x x [ ] uucp Taylor UUCP 1.06.1 with HDB && Taylor configs x x
x x [ ] elm Menu-driven user mail program x x
x x [ ] pine Pine menu-driven mail program x x
x x [ ] sendmail The sendmail mail transport agent x x
x x [ ] metamail Metamail multimedia mail extensions x x
x x [ ] smailcfg Extra configuration files for sendmail x x
x x [ ] cnews Spools and transmits Usenet news x x
x x [ ] inn InterNetNews news transport system x x
x x [ ] tin The 'tin' news reader (local or NNTP) x x
x x [ ] trn 'trn' for /var/spool/news x x
x x [ ] trn-nntp 'trn' for NNTP (install 1 'trn' maximum) x x
x x [ ] nn-spool 'nn' for /var/spool/news x x
x x [ ] nn-nntp 'nn' for NNTP (install 1 'nn' maximum) x x
x x [ ] netpipes Network pipe utilities x x
x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
</PRE>
$B%$%s%9%H!<%k$,=*N;$7$?$i!$$=$l0J30$N9`L\$K$OA4$F(B `no' $B$HEz$((B($BA4$F$N@_(B
$BDj9`L\$K(B `no' $B$HEz$($k(B)$B!$%9%/%j%W%H$r=*N;$7$^$9!%(B</P>
<H2><A NAME="threads"></A> <A NAME="ss4.6">4.6</A> <A HREF="Root-RAID-HOWTO.html#toc4.6">Linux <B>pthreads</B> $B$N%$%s%9%H!<%k(B </A>
</H2>
<P>$B<!$K(B`linuxthreads-0.71' $B%i%$%V%i%j$r%$%s%9%H!<%k$7$J$1$l$P$J$j$^$;$s!%(B
$B$3$3$G$O<j:n6H$K$h$k%$%s%9%H!<%k$r>\$7$/@bL@$9$kBe$o$j$K!$(Blinuxthreads
$B$N(B Makefile $B$KBP$9$k:9J,%Q%C%A$r<($7$^$9!%85$N(B Makefile $B$rJ]B8$7$F$+$i(B
diff $B%3%^%s%I$G%Q%C%A$rEv$F!$$=$7$F(B make $B$r9T$$$^$9!%(B</P>
<P>
<PRE>
cd /usr/src/linuxthreads-0.71
patch
make
make install
</PRE>
<A NAME="thrdiff"></A> <PRE>
-------------------diff Makefile.old Makefile.raid-----------------
2a3,13
> # If you are building "linuxthreads" for installation on a mount
> # point which is not the "root" partition, redefine 'BUILDIR' to
> # the mount point to use as the "root" directory
> # You may wish to do this if you are building an 'initial ram disk'
> # such as used with bootable root raid devices.
> # REQUIRES ldconfig version 1.9.5 or better
> # do ldconfig -v to check
> #
> BUILDIR=/root/raidboot/mnt
> #BUILDIR=
>
81,82c92,93
< install pthread.h $(INCLUDEDIR)/pthread.h
< install semaphore.h $(INCLUDEDIR)/semaphore.h
---
> install pthread.h $(BUILDIR)$(INCLUDEDIR)/pthread.h
> install semaphore.h $(BUILDIR)$(INCLUDEDIR)/semaphore.h
84c95
< test -f /usr/include/sched.h || install sched.h $(INCLUDEDIR)/sched.h
---
> test -f $(BUILDIR)/usr/include/sched.h || install sched.h $(BUILDIR)$(INCLUDEDIR)/sched.h
86,89c97,103
< install $(LIB) $(LIBDIR)/$(LIB)
< install $(SHLIB) $(SHAREDLIBDIR)/$(SHLIB)
< rm -f $(LIBDIR)/$(SHLIB0)
< ln -s $(SHAREDLIBDIR)/$(SHLIB) $(LIBDIR)/$(SHLIB0)
---
> install $(LIB) $(BUILDIR)$(LIBDIR)/$(LIB)
> install $(SHLIB) $(BUILDIR)$(SHAREDLIBDIR)/$(SHLIB)
> rm -f $(BUILDIR)$(LIBDIR)/$(SHLIB0)
> ln -s $(SHAREDLIBDIR)/$(SHLIB) $(BUILDIR)$(LIBDIR)/$(SHLIB0)
> ifneq ($(BUILDIR),)
> ldconfig -r ${BUILDIR} -n $(SHAREDLIBDIR)
> else
91c105,106
< cd man; $(MAKE) MANDIR=$(MANDIR) install
---
> endif
> cd man; $(MAKE) MANDIR=$(BUILDIR)$(MANDIR) install
</PRE>
</P>
<H2><A NAME="ss4.7">4.7</A> <A HREF="Root-RAID-HOWTO.html#toc4.7">RAID $B%D!<%k$N%$%s%9%H!<%k(B</A>
</H2>
<P>$B%$%s%9%H!<%k$N<!$N%9%F%C%W$O!$(BRAID $B%D!<%k(B raidtools-0.42 $B$N%$%s%9%H!<(B
$B%k$G$9!%(B</P>
<P>RAM$B%G%#%9%/$N%U%!%$%k$r9=C[$9$k%G%#%l%/%H%j$r(B Makefile $B$K65$($k$?$a$K(B
"configure" $B%9%/%j%W%H$r<B9T$7$^$9!%(B
<PRE>
cd /usr/src/raidtools-0.42
configure --sbindir=/root/raidboot/mnt/sbin --prefix=/root/raidboot/mnt/usr
make
make install
</PRE>
$B$3$3$GCm0U$9$Y$-E@$,$"$j$^$9!%%$%s%9%H!<%k$K;H$&(B Makefile $B$O@5$7$/$J$$(B
$B$N$G!$$3$l$rD>$9$?$a$K<!$N:n6H$r9T$$$^$9!%$3$l$O>-Mh$N%j%j!<%9$G$O=$@5(B
$B$5$l!$:F%j%s%/$OI,MWL5$/$J$kM=Dj$G$9!%(B</P>
<P>
<BLOCKQUOTE>
$B%$%s%9%H!<%k%(%i!<$N=$@5(B
</BLOCKQUOTE>
$B@5$7$/A`:n$9$k$?$a$K$O(B Makefile $B$N(B `LINKS' $B$G;XDj$5$l$F$$$k%U%!%$%k$N(B
$B%j%s%/$r:o=|$7!$D%$jD>$5$J$1$l$P$J$j$^$;$s!%(B
<PRE>
cd /root/raidboot/mnt/sbin
ln -fs mdadd mdrun
ln -fs mdadd mdstop
</PRE>
</P>
<H2><A NAME="ss4.8">4.8</A> <A HREF="Root-RAID-HOWTO.html#toc4.8">$B?7$7$$%U%!%$%k%7%9%F%`$+$i$NITMW$J%G%#%l%/%H%j$H%U%!%$%k$N:o=|(B</A>
</H2>
<P>$B0J2<$N%G%#%l%/%H%j$H%U%!%$%k$r%U%!%$%k%7%9%F%`$+$i:o=|$7$^$9!%(B
(<B>$BCm0U(B: $B8m$C$F8=:_2TF/Cf$N%7%9%F%`$N%U%!%$%k$r>C$5$J$$$h$&$K(B</B>$B!%(B)
$B$3$N%j%9%H$r8+$F%U%!%$%k$r>C$9$@$1$J$i4JC1$G$9$,!$;d$,$3$N%j%9%H$r$I$&(B
$B$d$C$F:n$C$?$N$+$b9M$($F$/$@$5$$!*(B
<PRE>
cd /root/raidboot/mnt
rm -r home/ftp/*
rm -r lost+found
rm -r usr/doc
rm -r usr/info
rm -r usr/local/man
rm -r usr/man
rm -r usr/openwin
rm -r usr/share/locale
rm -r usr/X*
rm -r var/man
rm -r var/log/packages
rm -r var/log/setup
rm -r var/log/disk_contents
</PRE>
</P>
<H2><A NAME="ss4.9">4.9</A> <A HREF="Root-RAID-HOWTO.html#toc4.9">/dev/md<I>x</I> $B$N:n@.(B</A>
</H2>
<P>$B:G8e$N%9%F%C%W$O!$8=:_$N%U%!%$%k%7%9%F%`$+$iI|5l%U%!%$%k%7%9%F%`$K(B
/dev/md* $B%G%P%$%9$r$?$@%3%T!<$9$k$3$H$G$9!%$3$l$O(B mknod $B$G$b9T$&$3$H$,(B
$B$G$-$k$G$7$g$&!%(B
<PRE>
cp -a /dev/md* /root/raidboot/mnt/dev
</PRE>
</P>
<H2><A NAME="ss4.10">4.10</A> <A HREF="Root-RAID-HOWTO.html#toc4.10"><I>initrd</I> $B$N$?$a$NMg$N%U%!%$%k%7%9%F%`:n@.(B</A>
</H2>
<P>$B$3$l$G%+%9%?%^%$%:$G$-!$:FMxMQ$b2DG=$J$^$C$5$i$J%U%!%$%k%7%9%F%`$,$G$-(B
$B$^$7$?!%0lEY%+%9%?%^%$%:$9$k$H!$I|5l%G%#%9%/$K;H$&$3$H$,$G$-$k$3$N%U%!(B
$B%$%k%7%9%F%`$O2u$l$F$7$^$$!$=$@5$9$k$?$a$K$O(BRAID$B%D!<%k$,I,MW$H$J$j$^$9!%(B
$B$3$l$O<!$N>O$G@bL@$9$k(B linuxrc $B%U%!%$%k$rDI2C$9$k$3$H$K$h$C$F!$%V!<%H(B
$B$7$F%k!<%H$K%^%&%s%H$9$k(B RAID $B%G%P%$%9$K;H$&$3$H$b$G$-$^$9!%(B</P>
<P>initrd $B%U%!%$%k$N$?$a$K>.$5$$%G%P%$%9$X%7%9%F%`$r%3%T!<$7$^$9!%(B16$B%a%,(B
$B%P%$%H$b$"$l$P==J,$G$7$g$&!%(B</P>
<P>$B>.$5$$%U%!%$%k%7%9%F%`$r:n$j!$$3$l$r%^%&%s%H$7$^$9!%(B
<PRE>
cd /root/raidboot
dd if=/dev/zero of=bare.fs bs=1024k count=16
</PRE>
$B%U%!%$%k$r(B loop $B%G%P%$%9$H$7!$$3$N%U%!%$%k>e$K(B ext2 $B%U%!%$%k%7%9%F%`9=(B
$BC[$7$^$9!%(B
<PRE>
losetup /dev/loop1 bare.fs
mke2fs -v -m0 -L initrd /dev/loop1
mount /dev/loop1 mnt2
</PRE>
`build'$B%U%!%$%k%7%9%F%`$r(B`bare.fs'$B$K%3%T!<$7$^$9!%(B
<PRE>
cp -a mnt/* mnt2
</PRE>
$B8e$N99?7$rMF0W$K$9$k$?$a!$%+%9%?%^%$%:$NA0$K(B `bare.fs' $B%7%9%F%`$rJ]B8(B
$B$7$^$9!%(B`build' $B%U%!%$%k%7%9%F%`$O$b$&I,MW$"$j$^$;$s$N$G!$>C$7$F$b9=$$(B
$B$^$;$s!%(B
<PRE>
cd /root/raidboot
umount mnt
umount mnt2
losetup -d /dev/loop0
losetup -d /dev/loop1
rm build
cp bare.fs rescue
gzip -9 bare.fs
</PRE>
</P>
<H3>$B5/F0(B/$BI|5lMQ$N(B <I><B>initrd</B></I> $B%U%!%$%k%7%9%F%`$N:n@.(B</H3>
<P>$B<!$K!$:n6HMQ$N%^%7%s$+$i%+!<%M%k$KE,9g$9$k%7%9%F%`0MB8$N%U%!%$%k$r%3%T!<(B
$B$9$k$+!$%?!<%2%C%H$N%7%9%F%`$KE,9g$9$k$h$&$KI|5l%U%!%$%k%7%9%F%`$N%U%!(B
$B%$%k$r<j$G=$@5$9$k$+$7$^$9!%(B
<PRE>
losetup /dev/loop0 rescue
mount /dev/loop0 mnt
</PRE>
etc $B%G%#%l%/%H%j$K(B <CODE>*~</CODE> $B%U%!%$%k$d!$(Bcore, $B%m%0%U%!%$%k$,L5$$$3$H$r(B
$B3NG'$7$^$9!%<!$N(B2$B$D$N%3%^%s%I$O$$$/$D$+%&%)!<%K%s%0$r=P$7$^$9$,!$L5;k(B
$B$7$F$/$@$5$$!%(B
<PRE>
cp -dp /etc/* mnt/etc
cp -dp /etc/rc.d/* mnt/etc/rc.d
mkdir mnt/lib/modules
cp -a /lib/modules/2.x.x mnt/lib/modules <--- your current 2.x.x
</PRE>
</P>
<H3><A NAME="corrections"></A> $BI|5l%7%9%F%`$N=$@5(B </H3>
<P>$BI|5l%7%9%F%`$N0J2<$N%U%!%$%k$r=$@5$7$^$9!%$3$3$G5s$2$k%U%!%$%k$NCf$K$O(B
Slackware $BFCM-$N$b$N$b$"$j$^$9$,!$B>$N%G%#%9%H%j%S%e!<%7%g%s$G$bF1Ey$N(B
$B$b$N$,$"$k$O$:$G$9!%(B
<PRE>
cd mnt
$B%M%C%H%o!<%/4X78$G$J$$$b$N(B
etc/fstab
etc/mdtab $B$=$N$^$^$GBg>fIW$G$7$g$&(B
$B%M%C%H%o!<%/4X78(B
etc/hosts
etc/resolv.conf
etc/hosts.equiv $B5Z$S4XO"%U%!%$%k(B
etc/rc.d/rc.inet1 IP$B%"%I%l%9!$%M%C%H%^%9%/!$%2%$%H%&%'%$$N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$$^$9!%(B
<PRE>
cd /root/raidboot/mnt <— initrd $B$N%k!<%H(B
mkdir dosa DOS $B%Q!<%F%#%7%g%s$N%^%&%s%H%]%$%s%H(B
mkdir dosb DOS $B$N%_%i!<$N%^%&%s%H%]%$%s%H(B
</PRE>
$BI|5l%U%!%$%k%7%9%F%`$O$3$l$G=PMh>e$,$j$G$9!*(B</P>
<P>$BI|5l%U%!%$%k%7%9%F%`$N%U%!%$%k$rD4$Y$l$P!$$^$@B?$/$N%U%!%$%k$r>C$;$k(B
$B$3$H$,J,$+$k$H;W$$$^$9!%$3$N:n6H$OJ#;($9$.$k$3$H$H!$$[$H$s$I$N(B RAID $B%7(B
$B%9%F%`$K$O==J,$J%G%#%9%/$H%a%b%j$,$"$k$3$H$+$i!$;d$O$3$l$r9T$C$F$O$$$^(B
$B$;$s!%%U%!%$%k%7%9%F%`$r$b$C$H%9%^!<%H$K$7$?$1$l$P!$$4<+J,$G$d$C$F$/$@(B
$B$5$$!*(B</P>
<H2><A NAME="ss4.11">4.11</A> <A HREF="Root-RAID-HOWTO.html#toc4.11">`initrd' $B$G(B RAID $B%G%P%$%9$+$i5/F0$5$;$k(B – linuxrc</A>
</H2>
<P>$BI|5l%G%#%9%/$G(B RAID $B%G%P%$%9$r5/F0$9$k$K$O!$$?$@<!$N%9%/%j%W%H%U%!%$%k(B</P>
<P>
<BLOCKQUOTE>
<B>linuxrc</B>
</BLOCKQUOTE>
</P>
<P>$B$r%G%P%$%9$N%k!<%H$K%3%T!<$9$k$@$1$G$9!%(B</P>
<P>$B$3$N(B <B>linuxrc</B> $B%U%!%$%k$NF0:n$K$D$$$F$NOC$O(B
<A HREF="Root-RAID-HOWTO-14.html#Appendix-G">$BIUO?(B G, linuxrc $B$NF0:n$K$D$$$F(B</A>$B$G5DO@$7$^(B
$B$9!%(B</P>
<P>$B$b$C$H4JC1$GM}2r$7$d$9$$(B($BF0:n$b$9$k(B) linuxrc $B$O(B
<A HREF="Root-RAID-HOWTO-11.html#Appendix-D">$BIUO?(B D</A> $B$K$"$j$^$9$,!$(B<I>$B$3$l$O8E$$(B linuxrc $B$HDd;_%9%/%j%W%H$G(B
$B$9(B</I>$B!%0J2<$NItJ,$r(B <B>linuxrc</B>$B$H$7$F:n6H%G%#%l%/%H%j$K%3%T!<$7$F$*$-$^(B
$B$7$g$&!%(B</P>
<P>
<A NAME="linuxrc"></A>
<PRE>
-------------------- linuxrc ----------------------
#!/bin/sh
# ver 1.13 3-6-98
#
################# BEGIN 'linuxrc' ##################
# DEFINE FUNCTIONS #
####################################################
# Define 'Fault' function in the event something
# goes wrong during the execution of 'linuxrc'
#
FaultExit () {
# correct fstab to show '/dev/ram0' for rescue system
/bin/cat /etc/fstab | {
while read Line
do
if [ -z "$( echo ${Line} | /usr/bin/grep md0 )" ]; then
echo ${Line}
else
echo "/dev/ram0 / ext2 defaults 1 1"
fi
done
} > /etc/tmp.$$
/bin/mv /etc/tmp.$$ /etc/fstab
# point root at /dev/ram0 (the rescue system)
echo 0x100>/proc/sys/kernel/real-root-dev
/bin/umount /proc
exit
}
# Define 'Warning' procdure to print banner on boot terminal
#
Warning () {
echo '*********************************'
echo -e " $*"
echo '*********************************'
}
# Define 'SplitKernelArg' to help extract 'Raid' related kernel arguments
SplitKernelArg () { eval $1='$( IFS=,; echo $2)' }
#Define 'SplitConfArgs' to help extract system configuration arguments
SplitConfArgs () {
RaidBootType=$1
RaidBootDevice=$2
RaidConfigPath=$3
}
########################################################
################### MAIN linuxrc #######################
########################################################
# mount the proc file system
/bin/mount /proc
# Get the boot partition and configuration location from command line
CMDLINE=`/bin/cat /proc/cmdline`
for Parameter in $CMDLINE; do
Parameter=$( IFS='='; echo ${Parameter} )
case $Parameter in
Raid*) SplitKernelArg $Parameter;;
esac
done
# check for 'required raid boot'
if [ -z "${Raid_Conf}" ]; then
Warning Kernel command line \'Raid_Conf\' missing
FaultExit
fi
SplitConfArgs $Raid_Conf
# tmp mount the boot partition
/bin/mount -t ${RaidBootType} ${RaidBootDevice} /mnt
# get etc files from primary raid system
pushd /etc
# this will un-tar into 'etc' (see rc.6)
if [ ! -f /mnt/${RaidConfigPath}/raidboot.etc ]; then
# bad news, this file should be here
Warning required file \'raidboot.etc\' \
missing from ${RaidBootDevice}/${RaidConfigPath} \\n \
\\tUsing rescue system defaults
else
/bin/tar -xf /mnt/${RaidConfigPath}/raidboot.etc
fi
# get 'real' raidboot device for this boot
# status path, and name of raidX.conf
if [ ! -f /mnt/${RaidConfigPath}/raidboot.cfg ]; then
# bad news, this file should be here
Warning required file 'raidboot.cfg' \
missing from ${RaidBootDevice}/${RaidConfigPath}\\n \
\\tUsing rescue system defaults
# Get the first raidX.conf file name in $RArg1
RaidBootDevs=$RaidBootDevice
RaidStatusPath=$RaidConfigPath
for RaidConfigEtc in $( ls raid*.conf )
do break; done
else
{
read RaidBootDevs
read RaidStatusPath
read RaidConfigEtc
} < /mnt/${RaidConfigPath}/raidboot.cfg
fi
popd
/bin/umount /mnt
# Set a flag in case the raid status file is not found
#
RAIDOWN="raidboot.ro not found"
RAIDREF="raidgood.ref not found"
echo "Reading md0 shutdown status."
# search for raid shutdown status
for Device in ${RaidBootDevs}
do
# these filesystem types should be in 'fstab' since
# the partitions must be mounted for a clean raid shutdown
/bin/mount ${Device} /mnt
if [ -f /mnt/${RaidStatusPath}/raidboot.ro ]; then
RAIDOWN=`/bin/cat /mnt/${RaidStatusPath}/raidboot.ro`
RAIDREF=`/bin/cat /mnt/${RaidStatusPath}/raidgood.ref`
/bin/umount /mnt
break
fi
/bin/umount /mnt
done
# Test for a clean shutdown with array matching reference
if [ "${RAIDOWN}" != "${RAIDREF}" ]; then
Warning shutdown ERROR ${RAIDOWN}
FaultExit
fi
# The raid array is clean, remove shutdown status files
for Device in ${RaidBootDevs}
do
/bin/mount ${Device} /mnt
/bin/rm -f /mnt/${RaidStatusPath}/raidboot.ro
/bin/umount /mnt
done
# Write a clean superblock on all raid devices
echo "write clean superblocks"
/sbin/mkraid -f --only-superblock /etc/${RaidConfigEtc}
# Activate raid array(s)
if [ -z "$Raid_ALT" ]; then
/sbin/mdadd -ar
else
/sbin/mdadd $Raid_ALT
fi
# If there are errors - BAIL OUT and leave rescue running
if [ $? -ne 0 ]; then
Warning some RAID device has errors
FaultExit
fi
# Everything is fine, let the kernel mount /dev/md0
# tell the kernel to switch to /dev/md0 as the /root device
# The 0x900 value is the device number calculated by:
# 256*major_device_number + minor_device number
echo "/dev/md0 mounted on root"
echo 0x900>/proc/sys/kernel/real-root-dev
# umount /proc to deallocate initrd device ram space
/bin/umount /proc
exit
#------------------ end linuxrc ----------------------
</PRE>
`linuxrc' $B$r(B initrd $B$N5/F0%G%P%$%9$KDI2C$7$^$9!%(B
<PRE>
cd /root/raidboot
chmod 777 linuxrc
cp -p linuxrc mnt
</PRE>
</P>
<H2><A NAME="modify_shutdown"></A> <A NAME="ss4.12">4.12</A> <A HREF="Root-RAID-HOWTO.html#toc4.12">$B%7%c%C%H%@%&%sMQ$N(B rc $B%9%/%j%W%H$N=$@5(B </A>
</H2>
<P>$B%$%s%9%H!<%k$N:G8e$N<j=g$O!$%7%c%C%H%@%&%s;~$K(B md $B$N>uBV$rK\Ev$N%k!<%H(B
$B%G%P%$%9$KJ]B8$9$k$5$;$k$h$&$K(B rc $B%9%/%j%W%H$r=$@5$9$k$3$H$G$9!%(B
<PRE>
Slackware $B$N>l9g$O!$(Brc.0 $B$+$i(B rc.6 $B$G$9!%(BDebian `bo' $B$N>l9g$O!$$3$l$O(B
`halt' $B5Z$S(B `reboot' $B$K$J$j$^$9!%(B
</PRE>
<PRE>
$B$b$7$3$l0J30$N%G%#%9%H%j%S%e!<%7%g%s$G<B9T$7$?>l9g$O!$$3$NJ8=q$KDI2C$9(B
$B$k$?$a!$<j=g$H%5%s%W%k%U%!%$%k$rI.<T$K%a!<%k$GAw$C$F$/$@$5$$!%(B
</PRE>
$B;d$O(BRAID $BDd;_;~$NLdBj2sHr$N$?$a$N(B Bohumil Chalupa $B$5$s$NJ}K!$r>/$7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N%7%c%C%H%@%&%s(B(kill, $B>uBV(B
$BJ]B8Ey(B)$B$H%U%!%$%k%7%9%F%`$N%"%s%^%&%s%H$NA0$NItJ,$K$*$$$F(B
<A HREF="Root-RAID-HOWTO-13.html#Appendix-F">rc.raidown</A>$B$r8F$S=P$7$^$9!%(B
<PRE>
############ Save raid boot and status info ##############
#
if [ -x /etc/rc.d/rc.raidown ]; then
/etc/rc.d/rc.raidown
fi
################## end raid boot #########################
</PRE>
$BA4$F$N%U%!%$%k%7%9%F%`$,%"%s%^%&%s%H$5$l$?8e(B($B%k!<%H%U%!%$%k%7%9%F%`$O(B
$B%"%s%^%&%s%H!V$5$l$^$;$s!W(B)$B$+$D!$EE8;CG$N%9%F!<%?%9%A%'%C%/$NA0$K<!$N(B
$B%3%^%s%I$rF~$l$^$9!%(B
<PRE>
################ for raid arrays #########################
# Stop all known raid arrays (except root which won't stop)
if [ -x /sbin/mdstop ]; then
echo "Stopping raid"
/sbin/mdstop -a
fi
##########################################################
</PRE>
$B$3$l$K$h$j%k!<%H0J30$NA4$F$N(B RAID $B%G%P%$%9$r0BA4$KDd;_$5$;$k$3$H$,$G$-(B
$B$^$9!%%k!<%H$N%9%F!<%?%9$O(B <B>raidstat.ro</B> $B$K5-O?$5$l!$<!2s$N5/F0;~$K(B
$B;2>H$5$l$^$9!%(B</P>
<P>rc $B%U%!%$%k$r?7$7$$(B RAID $B%"%l%$!$$^$@(B <B>/root/raidboot/mnt</B> $B$K(B
$B%^%&%s%H$5$l$F$$$kI|5l%U%!%$%k%7%9%F%`!$(B($B$b$7F1$8%^%7%s$J$i$P(B)
$B:n6HMQ%7%9%F%`$N$=$l$>$l$K%3%T!<$7$^$9!%(B</P>
<P>$BI,MW$K1~$8$FI|5l%U%!%$%k%7%9%F%`$N(B<B>etc/fstab</B>$B$N=$@5$H!$I|5l%U%!(B
$B%$%k%7%9%F%`$N(B <B>mdtab</B> $B$,@5$7$$$+$I$&$+$N%A%'%C%/$r9T$$$^$9!%(B</P>
<P>$B$5$F!$I|5l%G%#%9%/$r(B DOS $B%Q!<%F%#%7%g%s$K%3%T!<$9$l$P!$(BRAID $B%G%P%$%9$r(B
$B%k!<%H%U%!%$%k%7%9%F%`$H$7$F%7%9%F%`$r5/F0$9$k=`Hw$O=*$o$j$G$9!%(B
<PRE>
umount mnt
losetup -d /dev/loop0
gzip -9 rescue
</PRE>
$B5/F0%Q!<%F%#%7%g%s$K(B rescue.gz $B$r%3%T!<$7$^$9!%(B</P>
<P>$B;D$k:n6H$O!$@_Dj%U%!%$%k(B <B>raidboot.conf</B> $B$r:n$j!$%7%9%F%`$r:F5/F0$7(B
$B$F?7$7$$%U%!%$%k%7%9%F%`$r%F%9%H$9$k$3$H$@$1$G$9!%(B</P>
<H2><A NAME="raidboot-conf"></A> <A NAME="ss4.13">4.13</A> <A HREF="Root-RAID-HOWTO.html#toc4.13">Configuring RAIDBOOT - raidboot.conf </A>
</H2>
<P>$B@_DjNc$N8e$N%3%a%s%H$O!$@_Dj%U%!%$%k$N:G=i$N(B3$B9T$N$=$l$>$l$K$D$$$F$N@b(B
$BL@$G$9!%Nc$O(B 4 $B%I%i%$%V$N(B SCSI RAID5 $B%"%l%$$G!$5/F0%Q!<%F%#%7%g%s$r(B
sda1 $B$H(B sdb1 $B%I%i%$%V$KJ#@=$7$F$$$k>l9g$N$b$N$G$9!%<B:]$K;HMQ$9$k>l9g(B
$B$K$O!$$3$NBe$o$j$K%U%!%$%k%7%9%F%`$K1~$8$?%Q%i%a!<%?$r@_Dj$7$F$/$@$5$$!%(B
<PRE>
/dev/sda1 /dev/sdb1
linux
raid5.conf
# $B%3%a%s%H$O(B3$B$D$N@_Dj9T$N!V8e!W$K$N$_5-=R$9$k$3$H$,$G$-$^$9!%(B
#
# $B$3$N%U%!%$%k$O(B 'raidboot.conf' $B$G$9!%(B
#
# 1$B9TL\(B, 'initrd' RAID-$BI|5l%7%9%F%`$N$"$k%Q!<%F%#%7%g%s(B
# $B$3$l$i$N%Q!<%F%#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dev/sdb3 /dev/sdc3 /dev/sdd3"
</PRE>
$B$h$j>\$7$/$O(B<B>man lilo.conf</B>$B$r;2>H$7$F$/$@$5$$!%(B</P>
<P>$BI.<T$O(B DOS $B$N@_Dj%f!<%F%#%j%F%#$rI,MW$H$9$k%O!<%I%&%'%"$r;}$C$F$$$k$N(B
$B$G!$%7%9%F%`$K>.$5$J(B DOS $B%Q!<%F%#%7%g%s$r:n$C$F$$$^$9!%$7$?$,$C$F!$(B
$BBP$K$J$k%G%#%9%/>e$K%_%i!<(B($B%3%T!<(B)$B$r;}$D(B RAID5 $B%7%9%F%`$r5/F0$9$k$N$K(B
loadlin $B$r;H$C$F$$$^$9!%F1$8J}K!$r(B RAID1 $B%7%9%F%`$G$b;H$C$F$$$^$9!%0J(B
$B2<$NNc$G$O(B loadlin $B$r;H$C$F$$$^$9$,!$$d$jJ}$O(B LILO $B$H$h$/;w$F$$$^$9!%(B</P>
<P>$BI,MW$K1~$8$F(B loadlin $B$N5/F0%Q%i%a!<%?$rJT=8$7$?$j!$%F%9%HCf$K%9%o%C%W(B
$B%G%#%9%/>e$G(B Linux $B%7%9%F%`$r5/F0$G$-$k$h$&$K!$(BDOS $B$K%k!<%H$r;}$D%7%9(B
$B%F%`$K$O>.$5$$%(%G%#%?$rF~$l$F$$$^$9!%(B</P>
<P>DOS $B%7%9%F%`$K$O(B Linux $B$N$?$a$K0J2<$N$h$&$J%U%!%$%k$r;}$C$F$$$^$9!%(B
<PRE>
c:\raidboot.bat
c:\raidboot\loadlin.exe
c:\raidboot\zimage
c:\raidboot\rescue.gz
c:\raidboot\raidboot.cfg
c:\raidboot\raidboot.etc
c:\raidboot\raidgood.ref
c:\raidboot\raidstat.ro (only at shutdown)
</PRE>
<A NAME="linuxbat"></A> linux.bat $B$NFbMF$O0J2<$G$9!%(B
<PRE>
---------------------- linux.bat ---------------------------
echo "Start the LOADLIN process:"
c:\raidboot\loadlin @c:\raidboot\boot.par
-------------------- end linux.bat -------------------------
</PRE>
boot.par $B$NFbMF$O0J2<$G$9!%(B
<PRE>
# loadlin boot parameter file
#
# version 1.02 3-6-98
# linux kernel image
c:\linux\zimage
# target root device
root=/dev/md0
#root=/dev/ram0
#root=/dev/sdc5
# mount root device as 'ro'
ro
# size of ram disk
ramdisk_size=16384
# initrd file name
initrd=c:\raidboot\rescue.gz
#noinitrd
# memory ends here
mem=131072k
# points to raid boot device, configuration file
# for floppy rescue boot, you may want to specify
# this on the command line instead of here
# format 'filesystem-type,device,path-to-config-frm_mntpnt'
Raid_Conf=msdos,/dev/sda1,raidboot
# Alternate mdadd parameters
# necessary when boot with non-redundant raid
# otherwise, COMMENT OUT OR SPECIFY 'NULL'
#Raid_ALT=-r,-p5,/dev/md0,/dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3
# ethernet devices
ether=10,0x300,eth0
</PRE>
<PRE>
***** >> $BCm0U(B!! $BI|5l%7%9%F%`$N5/F0$H!$(BRAID $B%G%P%$%9$N%^%&%s%H$N>l9g$G(B
$B$O!$(Bloadlin $B$N%Q%i%a!<%?$,(B
root=/dev/ram0 for the rescue system
root=/dev/md0 for RAID
$B$N$h$&$K0[$J$k$@$1$G$9!%(Broot=/dev/ram0 $B$r;XDj$9$k$H!$(BRAID
$B%G%P%$%9$O%^%&%s%H$5$l$:!$I,$:I|5l%7%9%F%`$,5/F0$5$l$^$9!%(B
</PRE>
RAID $B%"%l%$$NG'<1$K<:GT$9$k$H!$I|5l%7%9%F%`$O%^%&%s%H$5$l!$F0:n$7$^$9!%(B</P>
<HR>
<A HREF="Root-RAID-HOWTO-5.html">$B<!$N%Z!<%8(B</A>
<A HREF="Root-RAID-HOWTO-3.html">$BA0$N%Z!<%8(B</A>
<A HREF="Root-RAID-HOWTO.html#toc4">$BL\<!$X(B</A>
</BODY>
</HTML>
|