����� RAID ������ġ���(rescue tools) ��ޤ� `initrd' RAM�ǥ������� ��뤿��μ�³���Ǥ���
��ʸ��Ǥ��ä� RAID1 �� RAID5 �μ����ˤĤ���������Ԥ��ޤ���
�����ѤΥե����륷���ƥ�ϥ�����ɥ�����ǻ��ѤǤ��ޤ���RAID ���쥤�� �ޥ���Ȥ˼��Ԥ�����硤���쥷���ƥब�ޥ���Ȥ����ư��ޤ��� �Ǥ����饻�����ƥ��ˤϽ�ʬ���դ��Ƥ���������
�ǽ�κ�Ȥϡ��ѥå������Ƥƥ����ͥ��ƹ��ۤ��뤳�Ȥ� RAID ���ġ��� �˴���뤳�ȤǤ�����Ͽ E �� Gadi ��� RAID ��ߥѥå� ���ǧ�������� �ͥ�˴ޤ�Ƥ��������������ԤäƤ��� RAID �ǥХ�����ޥ���ȡ��ƥ��� ���ޤ����ܺ٤ʼ��� raidtools �ѥå������˴ޤޤ�Ƥ��ޤ�������ʸ ��Ǥ��ǽҤ٤ޤ���
�������/��ư�ѤΥե����륷���ƥ�ȻŻ��ѤΥޥ���Υե����륷���ƥ�� ���ۤ���ݤ� Slackware-3.4 �ǥ����ȥ�ӥ塼������Ȥ��ޤ������� �������ɤ� Linux �ǥ����ȥ�ӥ塼�����Ǥ�����ʤ��Ȼפ��ޤ����ۤʤ� �ǥ����ȥ�ӥ塼������Ȥ����ˤϡ����Τ��� Slackware ���ò����� ��ʬ���ǧ����ɬ�פ˱����ƽ������Ƥ���������
ɮ�Ԥ� loadlin ��Ȥäƥ����ͥ륤�����RAM�ǥ������� DOS �ѡ��ƥ����� �鵯ư���Ƥ��ޤ���������ϡ�ñ�� DOS ������եȥ�������Ȥ����� ���ǥХ�����ȤäƤ��뤫��Ǥ���LILO �Ǥ⤦�ޤ�ư��ޤ�����RAID/��ư �ե������ lilo �쥳���ɤ�����ޤྮ���� Linux �ѡ��ƥ�������� �ѤǤ��ޤ���
ɮ�ԤϺǽ�� Slackware �� `setup' ������ץȤ�ȤäƺǾ��¤�RAM�ǥ��� �������ƥ���ꡤ���ˤ���RAM�ǥ���������Ǥ�Slackware �� `linuxthreads' �ѥå������� `raidtools' �����ȡ��뤹�뤳�Ȥ� ���ޤ�������ϻŻ��ѤΥޥ�����ۤ���Ȥ��ˤ�����Ʊ����³������ ���ޤ������Ǥ����顤���쥷���ƥ�ȻŻ��ѥ����ƥ�Ϥۤ�Ʊ�������ˤʤä� ���ޤ���
���Υ��ȡ���ˤ�ä�`���'�����ƥब�Ǥ��ޤ�(�ե�����Υ��ԡ����� ¸���Ƥ����ޤ��礦)�����Υ����ƥ��
/lib/modules/2.x.x...... /etc .... with a modified fstab, mdtab, raidX.conf, raidboot.conf /etc/rc.d /dev/md*
�ȤäƤ��륷���ƥफ�����ԡ��������ߤ��뤤�Ϥ��줫��ư� ���褦�Ȥ��Ƥ��륷���ƥ�˹�碌�ƥ������ޥ������ޤ���
����ˤ�ꡤ��ư/���쥷���ƥ��ư��Ƥ��� RAID �ǥХ�����롼�� �˥ޥ���Ȥ��������ƥ��Ʊ���ˤǤ��ޤ����饤�֥�����ΥС������Ͼ�� �ǿ��ˤǤ��ޤ��������������������ƥ�ˤʤ�ޤ���
�桼�� root �Υۡ���ǥ��쥯�ȥ�(/root)�ǰʲ��Υ��ޥ�ɤ�¹Ԥ��ޤ�:
cd /root mkdir raidboot cd raidboot
�ޥ���ȥݥ���Ȥ�������ޤ���
mkdir mnt mkdir mnt2
�ե����륷���ƥ�ȡ��뤹��Τ˽�ʬ���礭���Υե��������ޤ��� ����Ϻǽ�Ū������ե����륷���ƥ��ꤺ�ä��礭���ʤ�ޤ���16�ᥬ�Х� �ȤǤϽ�ʬ�ǤϤʤ��ä��Τǡ����24�ᥬ�Х��ȻȤ����Ȥˤ��ޤ�����
dd if=/dev/zero of=build bs=1024k count=24�ե������ loop �ǥХ����Ȥ���ext2 �ե����륷���ƥ�Υե������� �������ޤ���
losetup /dev/loop0 build mke2fs -v -m0 -L initrd /dev/loop0 mount /dev/loop0 mnt
Slackware �ˤ������Ѥ��ʤ�����ʤΤǡ�Slackware �ʳ��Υǥ����ȥ�ӥ塼 ������Ȥ����ˤ� ���ξϤ˿ʤ������������
���ߤ϶��Υե����륷���ƥब����ƥޥ���Ȥ���Ƥ�����֤Ǥ��� ������"setup"��¹Ԥ��ޤ���
'target' �ˤ�
/root/raidboot/mnt
����ꤷ�ޤ���`source'�ˤ��̾�Υ��ȡ��븵��Ŭ�����ꤷ�ޤ����ѥå��� ������ϼ�ͳ�˹ԤäƤ��ޤ��ޤ���`configure' ���Ԥ�ʤ��Ǥ���������
�ץ���ץȤΥ⡼�ɤȤ��Ƥ� `EXPERT' �����ޤ���
��ϥ����ƥ�κǾ������� `A', `AP', `N' �˲ä����Ȥ�����Ƥ��ƥ������� ���������ǥ���(vi, jed, joe)�����ޤ�����
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`AP' ���������ϻ�ι����ʥ��ǥ��� `JOE' �ȥ���ѥ��Ȥ������ʥե��� �����ġ���Ǥ��� `MC' ���������ޤ�����������ɬ�פ˱����ƥ桼�ƥ� ��ƥ������Ƥ���������
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`N' �ѥå���������� TCP/IP ����������ޤ����������ɬ������ɬ�פǤϤ� ��ޤ������������Ǥ������롼�Ȥ� RAID ���쥤���ޥ���Ȥ���Ƥ��� �����֤�����乹���κ�Ȥ�Ԥ��ݤ˥ͥåȥ���˥��������Ǥ���褦�ˤ� ��ޤ���TCP/IP �ˤ� `A' �˴ޤޤ�륢�ץꥱ�������Τ����Ĥ������Ѥ��� `biff' ��ޤ�Ǥ��ޤ���`N' �ȡ��뤷�ʤ��ä��Ȥ��Ƥ⡤biff �ѥ� �����������줿���ʤ�Ȼפ��ޤ���
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���ȡ��뤬��λ�����顤����ʳ��ι��ܤˤ����� `no' ������(���Ƥ��� ����ܤ� `no' ��������)��������ץȤ�λ���ޤ���
����`linuxthreads-0.71' �饤�֥��ȡ��뤷�ʤ���Фʤ�ޤ��� �����Ǥϼ��Ȥˤ�륤�ȡ����ܤ���������������ˡ�linuxthreads �� Makefile ���Ф��뺹ʬ�ѥå����ޤ������� Makefile ����¸���Ƥ��� diff ���ޥ�ɤǥѥå������ơ������� make ��Ԥ��ޤ���
cd /usr/src/linuxthreads-0.71 patch make make install
-------------------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
���ȡ���μ��Υ��ƥåפϡ�RAID �ġ��� raidtools-0.42 �Υ��ȡ� ��Ǥ���
RAM�ǥ������Υե�������ۤ���ǥ��쥯�ȥ�� Makefile �˶����뤿��� "configure" ������ץȤ�¹Ԥ��ޤ���
cd /usr/src/raidtools-0.42 configure --sbindir=/root/raidboot/mnt/sbin --prefix=/root/raidboot/mnt/usr make make install���������դ��٤���������ޤ������ȡ���˻Ȥ� Makefile ���������ʤ� �Τǡ������ľ������˼��κ�Ȥ�Ԥ��ޤ�������Ͼ���Υ����ǤϽ��� ���졤�ƥ��ɬ��̵���ʤ�ͽ��Ǥ���
���ȡ��륨�顼�ν������������뤿��ˤ� Makefile �� `LINKS' �ǻ��ꤵ��Ƥ���ե������ ���������ĥ��ľ���ʤ���Фʤ�ޤ���
cd /root/raidboot/mnt/sbin ln -fs mdadd mdrun ln -fs mdadd mdstop
�ʲ��Υǥ��쥯�ȥ�ȥե������ե����륷���ƥफ�������ޤ��� (����: ���äƸ��߲�Ư��Υ����ƥ�Υե������ä��ʤ��褦����) ���Υꥹ�Ȥƥե������ä������ʤ��ñ�Ǥ������䤬���Υꥹ�Ȥ�ɤ� ��äƺ�ä��Τ���ͤ��Ƥ���������
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
�Ǹ�Υ��ƥåפϡ����ߤΥե����륷���ƥफ������ե����륷���ƥ�� /dev/md* �ǥХ��������ԡ����뤳�ȤǤ�������� mknod �Ǥ�Ԥ����Ȥ� �Ǥ���Ǥ��礦��
cp -a /dev/md* /root/raidboot/mnt/dev
����ǥ������ޥ����Ǥ��������Ѥ��ǽ�ʤޤä���ʥե����륷���ƥब�Ǥ� �ޤ��������٥������ޥ�������ȡ�����ǥ������˻Ȥ����Ȥ��Ǥ��뤳�Υե� ���륷���ƥ�ϲ���Ƥ��ޤ����������뤿��ˤ�RAID�ġ��뤬ɬ�פȤʤ�ޤ��� ����ϼ��ξϤ��������� linuxrc �ե�������ɲä��뤳�Ȥˤ�äơ��֡��� ���ƥ롼�Ȥ˥ޥ���Ȥ��� RAID �ǥХ����˻Ȥ����Ȥ�Ǥ��ޤ���
initrd �ե�����Τ���˾������ǥХ����إ����ƥ�ԡ����ޤ���16�ᥬ �Х��Ȥ⤢��н�ʬ�Ǥ��礦��
�������ե����륷���ƥ���ꡤ�����ޥ���Ȥ��ޤ���
cd /root/raidboot dd if=/dev/zero of=bare.fs bs=1024k count=16�ե������ loop �ǥХ����Ȥ������Υե������� ext2 �ե����륷���ƥ �ۤ��ޤ���
losetup /dev/loop1 bare.fs mke2fs -v -m0 -L initrd /dev/loop1 mount /dev/loop1 mnt2`build'�ե����륷���ƥ��`bare.fs'�˥��ԡ����ޤ���
cp -a mnt/* mnt2��ι������ưפˤ��뤿�ᡤ�������ޥ��������� `bare.fs' �����ƥ����¸ ���ޤ���`build' �ե����륷���ƥ�Ϥ⤦ɬ�פ���ޤ���Τǡ��ä��Ƥ�� �ޤ���
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
���ˡ�����ѤΥޥ��饫���ͥ��Ŭ�礹�륷���ƥ��¸�Υե�����ԡ� ���뤫���������åȤΥ����ƥ��Ŭ�礹��褦������ե����륷���ƥ�Υե� ������ǽ������뤫���ޤ���
losetup /dev/loop0 rescue mount /dev/loop0 mntetc �ǥ��쥯�ȥ��
*~
�ե�����䡤core, �����ե����뤬̵�����Ȥ�
��ǧ���ޤ�������2�ĤΥ��ޥ�ɤϤ����Ĥ��������˥�Ф��ޤ�����̵��
���Ƥ���������
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
���쥷���ƥ�ΰʲ��Υե�����������ޤ��������ǵ�ե��������ˤ� Slackware ��ͭ�Τ�Τ⤢��ޤ�����¾�Υǥ����ȥ�ӥ塼�����Ǥ�Ʊ���� ��Τ�����Ϥ��Ǥ���
cd mnt �ͥåȥ���ط��Ǥʤ���� etc/fstab etc/mdtab ���Τޤޤ�����פǤ��礦 �ͥåȥ���ط� etc/hosts etc/resolv.conf etc/hosts.equiv �ڤӴ�Ϣ�ե����� etc/rc.d/rc.inet1 IP���ɥ쥹���ͥåȥޥ����������ȥ�����������������ޤ� etc/rc.d/rc.S �ե����륷���ƥ�Υ��ơ������ط�����ʬ�����ƺ�����ޤ� # Test to see if the root partition is read-only ����ʬ���� # remove /etc/mtab* so that mount will ..... ��ޤޤʤ���ʬ�ޤǤ������ޤ��� ����� RAM�ǥ��������ɤ߽�ǽ�ǥޥ��� �Ȥ����ȽФ뤦�뤵���������˥�� �ʤ��褦�ˤ��ޤ��� etc/rc.d/rc.xxxxx ɬ�פʤ��¾�Υե�����⡥��ʸ��Ǹ�Ҥ��ޤ� root/.rhosts �⤷¸�ߤ���� home/xxxx/xxxx ɬ�פʤ��¾�Υե������ �ٹ�: ���κ�Ȥ� passwd �� shadow �Υե���������쥷���ƥ�� ���ԡ�����Ƥ��ޤ��ޤ�������ϥ������ƥ������ͳ�ǹ� �ޤ����ʤ����⤢��Ǥ��礦��ɬ�פ˱����� /dev/disk ��ޥ���Ȥ��뤿��Υǥ��쥯�ȥ����ޤ��� ����ϥ����ƥ�ǰ�դ˷�ޤ�ʤ���Фʤ�ޤ������ϥ����ƥ��ư ���뤿��Υޥ���ȥݥ����(��ư�ѡ��ƥ������ȵ�ư�ѡ��ƥ������ΥХ� �����å�)�ˤʤ�ޤ���ɮ�ԤΥ����ƥ�� loadlin �����Ѥ��� DOS ���� ��ư����褦�ˤʤäƤ��ޤ�����Linux �ѡ��ƥ������� LILO �Ǥ⤦�ޤ�ư ��ޤ���ɮ�ԤΥ����ƥ�Ǥϰʲ��Τ褦�ˤʤäƤ��ޤ���
cd /root/raidboot/mnt <— initrd �Υ롼�� mkdir dosa DOS �ѡ��ƥ������Υޥ���ȥݥ���� mkdir dosb DOS �Υߥ顼�Υޥ���ȥݥ��������ե����륷���ƥ�Ϥ���ǽ���夬��Ǥ���
����ե����륷���ƥ�Υե������Ĵ�٤�С��ޤ�¿���Υե������ä��� ���Ȥ�ʬ����Ȼפ��ޤ������κ�Ȥ�ʣ�������뤳�Ȥȡ��ۤȤ�ɤ� RAID �� ���ƥ�ˤϽ�ʬ�ʥǥ������ȥ��꤬���뤳�Ȥ��顤��Ϥ����ԤäƤϤ��� ���ե����륷���ƥ���äȥ��ޡ��Ȥˤ�������С�����ʬ�Ǥ�äƤ��� ������
����ǥ������� RAID �ǥХ�����ư����ˤϡ��������Υ�����ץȥե�����
linuxrc
��ǥХ����Υ롼�Ȥ˥��ԡ���������Ǥ���
���� linuxrc �ե������ư��ˤĤ��Ƥ��ä� ��Ͽ G, linuxrc ��ư��ˤĤ����ǵ������� ����
��äȴ�ñ�����䤹��(ư��⤹��) linuxrc �� ��Ͽ D �ˤ���ޤ���������ϸŤ� linuxrc ����ߥ�����ץȤ� �����ʲ�����ʬ�� linuxrc�Ȥ��ƺ�ȥǥ��쥯�ȥ�˥��ԡ����Ƥ����� ���礦��
-------------------- 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 ----------------------`linuxrc' �� initrd �ε�ư�ǥХ������ɲä��ޤ���
cd /root/raidboot chmod 777 linuxrc cp -p linuxrc mnt
���ȡ���κǸ�μ��ϡ�����åȥ�������� md �ξ��֤������Υ롼�� �ǥХ�������¸���뤵����褦�� rc ������ץȤ������뤳�ȤǤ���
Slackware �ξ��ϡ�rc.0 ���� rc.6 �Ǥ���Debian `bo' �ξ��ϡ������ `halt' �ڤ� `reboot' �ˤʤ�ޤ���
�⤷����ʳ��Υǥ����ȥ�ӥ塼�����Ǽ¹Ԥ������ϡ�����ʸ����ɲä� �뤿�ᡤ���ȥ���ץ�ե������ɮ�Ԥ˥������äƤ������������RAID ������������Τ���� Bohumil Chalupa �������ˡ���� ��������Τ�ȤäƤ��ޤ�����μ�����������ˡ�� ��ϿA�ǽҤ٤ޤ���
��λŻ��ѥ����ƥ�ˤ� md0 �ʳ��� Linux �ѡ��ƥ������ϻĤäƤ� �ʤ��Τǡ�raidOK readonly �Υ��ơ���������¸���뤿��˵�ư�ѡ��ƥ� ������ȤäƤ��ޤ���ɮ�Ԥϥ���åȥ�������� md ���쥤�Υ��ơ������� �ޤ൯ư�ѡ��ƥ������Ȥ���ʣ����ξ���إե��������ߡ�md �ǥХ� ������ɥ����Ǻƥޥ���Ȥ��줿���Ȥ�Ͽ���뤳�Ȥˤ��ޤ��������� �ϥϡ��ɥǥ������Τɤ줫�����줿�Ȥ��ξ㳲�к��Ȥʤ�ޤ���
����åȥ�������ץȤϽ������졤 rc.raidown �Ȥ���̾���ˤʤ�ޤ�������ϡ��������Ƶ�ư���ơ� RAID �ǥХ�����ޥ���Ȥ��뤿���ɬ�פʾ������¸���뤿��Τ�ΤǤ��� �ƥǥ����ȥ�ӥ塼������ѤΥ���åȥ�������ץȤ���� ��Ͽ B�ǾҲ𤷤ޤ���
RAID ���쥤�Υ���åȥ�������ΤΥ��ơ����������뤿��ˡ����Ƥ� case ʸ(�⤷�����)�θ�ǡ����ġ��ºݤΥ���åȥ�����(kill, ���� ��¸��)�ȥե����륷���ƥ�Υ���ޥ���Ȥ�������ʬ�ˤ����� rc.raidown��ƤӽФ��ޤ���
############ Save raid boot and status info ############## # if [ -x /etc/rc.d/rc.raidown ]; then /etc/rc.d/rc.raidown fi ################## end raid boot #########################���ƤΥե����륷���ƥब����ޥ���Ȥ��줿��(�롼�ȥե����륷���ƥ�� ����ޥ���ȡ֤���ޤ����)���ġ��Ÿ��ǤΥ��ơ����������å������˼��� ���ޥ�ɤ�����ޤ���
################ 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 ##########################################################����ˤ��롼�Ȱʳ������Ƥ� RAID �ǥХ������������ߤ����뤳�Ȥ��Ǥ� �ޤ����롼�ȤΥ��ơ������� raidstat.ro �˵�Ͽ���졤����ε�ư���� ���Ȥ���ޤ���
rc �ե�������� RAID ���쥤���ޤ� /root/raidboot/mnt �� �ޥ���Ȥ���Ƥ�������ե����륷���ƥࡤ(�⤷Ʊ���ޥ���ʤ��) ����ѥ����ƥ�Τ��줾��˥��ԡ����ޤ���
ɬ�פ˱���������ե����륷���ƥ��etc/fstab�ν����ȡ�����ե� ���륷���ƥ�� mdtab �����������ɤ����Υ����å���Ԥ��ޤ���
���ơ�����ǥ������� DOS �ѡ��ƥ������˥��ԡ�����С�RAID �ǥХ����� �롼�ȥե����륷���ƥ�Ȥ��ƥ����ƥ��ư��������Ͻ����Ǥ���
umount mnt losetup -d /dev/loop0 gzip -9 rescue��ư�ѡ��ƥ������� rescue.gz �ԡ����ޤ���
�Ĥ��Ȥϡ�����ե����� raidboot.conf ���ꡤ�����ƥ��Ƶ�ư�� �ƿ������ե����륷���ƥ��ƥ��Ȥ��뤳�Ȥ����Ǥ���
������θ�Υ����Ȥϡ�����ե�����κǽ��3�ԤΤ��줾��ˤĤ��Ƥ��� ���Ǥ������ 4 �ɥ饤�֤� SCSI RAID5 ���쥤�ǡ���ư�ѡ��ƥ������� sda1 �� sdb1 �ɥ饤�֤�ʣ�����Ƥ�����Τ�ΤǤ����ºݤ˻��Ѥ����� �ˤϡ���������˥ե����륷���ƥ�˱������ѥ��������ꤷ�Ƥ���������
/dev/sda1 /dev/sdb1 linux raid5.conf # �����Ȥ�3�Ĥ�����ԤΡָ�פˤΤߵ��Ҥ��뤳�Ȥ��Ǥ��ޤ��� # # ���Υե������ 'raidboot.conf' �Ǥ��� # # 1����, 'initrd' RAID-���쥷���ƥ�Τ���ѡ��ƥ������ # �����Υѡ��ƥ�����鵯ư����ɬ�פϤ���ޤ������쥷�� # �ƥ�ϥե��åԡ��ǥ������ˤ�����ʤ��Ǥ��礦���顤���쥷���ƥ� # ��ɤΥѡ��ƥ����������ɤ���Τ��狼��ʤ���Фʤ�ޤ��� # # 2����, raidboot ���������ؤΥѥ� # ����åȥ�������Υ��ơ�����������ư���ˤɤ��ˤ���Τ������ޤ��� # ����ϥޥ���ȥݥ���Ȥξ���ϴޤޤ���'�ѥ�' # /�ޥ���ȥݥ����/'�ѥ�'�Τߤ�ޤߤޤ��� # # 3����, RAID ����ե�����Υե�����̾ # ���ߤ� RAID ����ե�����Ǥ����顤�Ĥޤ� raid1.conf, # raid5.conf �ˤʤ�ޤ���
�����RAID��2�ĤΥ����ͥ�ѥ���������ޤ��������ꤹ��ɬ�פ������ �����ԤΤߤǤ���
���Υѥ����� RAID ��ư�ǥХ���������ե��������ꤷ�ޤ����ե��åԡ� �ǥ����������쥷���ƥ��ư������ˤϡ������ͥ�Υ��ޥ�ɥ饤�� loadlin ���뤤�� LILO �ε�ư�ե�����ˤ��ε��Ҥޤ���
��: '�ե����륷���ƥ�μ���,�ǥХ���,�ޥ���ȥݥ���Ȥ�������ե�����ؤΥѥ�'
mdadd �Υѥ���������ˤʤ�ޤ�����Ĺ�Ǥʤ� RAID ���쥤���鵯ư�� ��Ȥ���ɬ�פȤʤ�ޤ���mdadd �Υ��ޥ�ɥ饤��ѥ������ ���ڤ�ǵ��Ҥ��ޤ�����»����/���Ĺ���쥤��ư����ɬ�פ�����Ȥ��ʳ��� �ϡ������ȥ����Ȥ��뤫'�̥�ʸ����'����ꤷ�ޤ���
���ʤ�� Raid_ALT= ����ꤷ�ޤ���
LILO �ǵ�ư������ˤϡ�LILO ������ե�����ؤε��Ҥϼ��Τ褦�� �ʤ�ޤ���
append="Raid_Conf=msdos,/dev/sda1,raidboot" append="Raid_ALT=-r,-p5,/dev/md0,/dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3"���ܤ�����man lilo.conf�Ȥ��Ƥ���������
ɮ�Ԥ� DOS ������桼�ƥ���ƥ���ɬ�פȤ���ϡ��ɥ���������äƤ���� �ǡ������ƥ�˾����� DOS �ѡ��ƥ��������äƤ��ޤ����������äơ� �Фˤʤ�ǥ�������˥ߥ顼(���ԡ�)����� RAID5 �����ƥ��ư����Τ� loadlin ��ȤäƤ��ޤ���Ʊ����ˡ�� RAID1 �����ƥ�Ǥ�ȤäƤ��ޤ����� ������Ǥ� loadlin ��ȤäƤ��ޤ������������ LILO �Ȥ褯���Ƥ��ޤ���
ɬ�פ˱����� loadlin �ε�ư�ѥ������Խ������ꡤ�ƥ�����˥���å� �ǥ�������� Linux �����ƥ��ư�Ǥ���褦�ˡ�DOS �˥롼�Ȥ���ĥ��� �ƥ�ˤϾ��������ǥ���������Ƥ��ޤ���
DOS �����ƥ�ˤ� Linux �Τ���˰ʲ��Τ褦�ʥե��������äƤ��ޤ���
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)linux.bat �����Ƥϰʲ��Ǥ���
---------------------- linux.bat --------------------------- echo "Start the LOADLIN process:" c:\raidboot\loadlin @c:\raidboot\boot.par -------------------- end linux.bat -------------------------boot.par �����Ƥϰʲ��Ǥ���
# 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
***** >> ����!! ���쥷���ƥ�ε�ư�ȡ�RAID �ǥХ����Υޥ���Ȥξ��� �ϡ�loadlin �Υѥ����� root=/dev/ram0 for the rescue system root=/dev/md0 for RAID �Τ褦�˰ۤʤ�����Ǥ���root=/dev/ram0 ����ꤹ��ȡ�RAID �ǥХ����ϥޥ���Ȥ��줺��ɬ�����쥷���ƥब��ư����ޤ���RAID ���쥤��ǧ���˼��Ԥ���ȡ����쥷���ƥ�ϥޥ���Ȥ��졤ư��ޤ���