re. - /unix - . , " ", . &dDSUN&d@ Boot-prom "BOOT BLOKS" - 1- . "boot-bloks" 1-15 , "/". 0. "Boot- blocks" ( SCSI- 3) installboot. - : installboot /dev/rdsk/c0t3d0s0 Boot-blocks " " unix - ufs . "/ufsboot" - 2- - . /ufsboot /kernel/unix . Unix . . "" , , , , . boot-prompt: STOP+A single user: bo: boot -s &dDMotorola 922&d@. Boot-prom - /stand/boot, /stand/unix boot-prom unix' , unix boot - /stand. " " bfs (Boot File System), boot-prom' . boot-prompt: : "Idle MPU: none" single user: : "Press _-_to enter system_maintence. &dDLinux&d@. BIOS . LILO (LInux LOader). Lilo /vmlinuz /etc/lilo.conf lilo Lilo-prompt: Left_ALT "Lilo ..." single user: Lilo: linux root=/dev/hda2 single single user: Lilo: linux init=/bin/sh mount -n -o remount /dev/hda2 / insmod de4x5 ifconfig eth0 195.232.171.30 route add -net 195.232.171.0 gw 195.232.171.30 insmod nfs &dDHP-UX&d@ HP 9000 "PDC" - "Processor Dependent Code" - , ESC . Boot- LIF ( ) LIF- 4 "" ISL - "" HPUX - AUTOBOOT - , : PDS ISL bo scsi.6.0 isl ISL hpux /stand/vmunix PDC-prompt: ESC 10 single user: PDC> bo pri isl ISL> hpux -is /stand/vmunix &dD * init * &d@ init. init - , , . . , init-, . init - " ". - . ( ) 0,1,2,3,4,5,6,s,S 0 - prom - ; 1, s, S - single user mode. ; 2 - NFS-; 3 - NFS-; 6 - ; &dD * /etc/inittab * &d@ bchk::sysinit:/etc/bcheckrc/dev/console 2>&1 brc::sysinit:/etc/brc > /dev/console 2>&1 is:3:initdefault: rc:12345:wait:/etc/rc > /dev/console 2>&1 r0:0:wait:/etc/rc0 > /dev/console 2>&1 r2:23:wait:/etc/rc2 > /dev/console 2>&1 r3:3:wait:/etc/rc3 > /dev/console 2>&1 pf:12345:powerfail:/etc/powerfail > /dev/console 2>&1 co:12345:respawn:/etc/sysmonitor console console t1:23:respawn:/etc/sysmonitor tty01 9600 t2:23:off:/etc/sysmonitor tty02 9600 : :_:_: : - - _: sysinit ; : wait - , ; respawn - , , - ; off - ( ). , , - . init , "sysinit" "sysinit" , init /etc/inittab initdefault 3 - "" 3. &dD * Run Command - RC- * &d@ 3, init "3" - /etc/rc2 - . : /etc/rc2 /etc/rc2.d/S*, /etc/rc2.d. "start" /etc/rc2, init /etc/rc3. sysmonitor - . , : "Login: " , , , "" , . init "respawn" - sysmonitor - "Login: " . &dDLinux Slackware&d@ init 5. /etc/rc.d/rc.S /etc/rc.d/rc.M /etc/rc.d/rc.inet1 /etc/rc.d/rc.inet2 /etc/rc.d/rc.local - , , httpd, .. &dDLinux RedHat&d@ rc- System V RC-: /etc/rc.d/rc[0123456].d/ /etc/rc.d/init.d/ RC-: /etc/sysconfig/ &dDHP-UX 10.20&d@ BSD- , rc- System V RC-: /sbin/rc[0123].d/ /sbin/init.d/ RC-: /etc/rc.defaults.d/ &dDSVR4: SUN, Motorola&d@ rc- System V RC-: /etc/rc[0123456].d/ /etc/init.d/ . &dDUnix, &d@. Unix. - , /unix /stand/unix /vmunix /vmlinuz ( - ). - . - , . . . , , , , , , . : , - . : , - , ... . (, MS-DOS "21 ", / .) - , - , : , , , .. .. ( 1500 ) Unix. , , , jump' . . . . . - . , , . , - , - - - . , , . . Unix . . . . (- ) , . , - . . ( Windows DLL - ). - (, printf, ) - (SHARED LIBRARY). , , . "" . : , . SWAPING. Unix- 32- , - . - , . - PAGING' - " ", swap- . SWAPING' Unix' , PAGING. (swaping - - , swap- ). , , : TEXT ( ), DATA ( - ), STACK ( ). TEXT', . . - , TEXT , . . , - , . - : "text file busy", . . (sticky bit). . " - ". , ( ) , - . , - - - , . . &dD Unix&d@. Unix - "", . - . "- " , . "". : mount -F ufs /dev/dsk/m197_c0d0s5 /home1 mount -F ufs /dev/dsk/m197_c0d0s4 /usr df "" . MS-DOS - , - "" ( a: b: c: d: e: ... k: l: m: n:) Unix - . Unix , , , , /usr/spool/moshkow /home1/moshkow/bin/mcopy ... Unix . - , - , . , . "", Unix- . Unix - - , - fsck (File System Check) - .. &dD Unix&d@. , , . . 1 Kb. : , . . . . - INOD-. 8% . inode - Index-node - . - , , . inod' : (, , , ) () / , - ... . ∐ - . - . , . - . - : , _1 _1 _2 _2 . . . , 1. , , 2. _ , 3. inod inod', 4. inod' , - , 5. . . . 64- - inod'. inod' : (// /fifo/socket) ( ) - , , 1- 2- ... 10- ( 256 ) 2- ( 256 ) 3- ( ) . man fs . &dD &d@ Unix - . - . (). , ? "", . , , , , /dev/console - - . , /dev/console, . /dev/console (!) , , , . su echo > /dev/console cat /dev/console Ctrl-C unix- . , : /dev/contty01 /dev/tty02 /dev/ttyFD02 /dev/ttyS0 ( .., ) ( , , telnet, rlogin) /dev/pty*, /dev/pty/* who, who am i , . , (/dev/rdsk/m197_c0d0s7) (/dev/dsk/m197_c0d0s*). , , , ... - , () . /dev/mem - , . /dev/audio - "" (*.wav, *.au, ...?) - - , cat /dev/audio , . - , , PC, Silicon Graphic SPARCstation. /dev/zero - /dev/null - , - , - : NULL - null. MSDOS NUL. : - . - , . ls -al /dev/fd* brw-rw---- 1 root floppy 2, 28 Jul 18 1994 /dev/fd0H1440 brw-rw---- 1 root floppy 2, 32 Jul 18 1994 /dev/fd0H2880 brw-rw---- 1 root floppy 2, 12 Jul 18 1994 /dev/fd0H360 (, , row) - . , - , - . ls -al /dev/tty* crw--w--w- 1 moshkow sys 4, 1 Jan 15 22:00 /dev/tty1 crw--w--w- 1 root root 4, 2 Jan 15 20:37 /dev/tty2 crw--w--w- 1 root root 4, 2 Jan 15 20:37 /dev/tty2 - ls -l "" . . . ls : "" "" - . , "" - , "" - - . &dD &d@ - . . mknod /dev/filename { c | b } MAJOR MINOR &dDHP-UX: &d@ /etc/inittab /sbin/ioinitrc, , , , . . ioscan mksf insf &dDSolaris: &d@ boot- -r STOP+A ok boot -r - . . &dD, , &d@. &dD * SCSI * &d@ &dDMOTOROLA: SCSI &d@. scsiscan - , SCSI (SCSI-id) Motorola 922 /sbin/auto-boot, , . &dDSUN: SCSI &d@. Sun SPARC SCSI-: BOOT-prom ( Stop+A) probe-scsi ok probe-scsi , "reconfiguration boot": BOOT- ok boot -r &dDLINUX: SCSI &d@. IBM PC/Linux . , SCSI (if exists) . , dmesg &dDHP-UX&d@ boot , SEA (search) ioscan &dD * * &d@ , , ( ) . . Seagate, , http://www.seagate.com http://www.seagate.com &dDLinux, FreeBDS: &d@ . &dDMOTOROLA: &d@ "" /etc/dskdefs/. "" , , , 1Gb Seagate-ST31 - "msea11200". : /etc/scsifmt.info ddefs . "Template" "" . , , , , . ddefs -n filename : , , ... ( ): Root offset: 648 (.. VTOC 648 ) Slice count: 16 ( 16 ) Interleave: 1 ( "") Precomp cylinder: {} ( ) Bad spots: 100 ( bad-) Controller attribute: 850 ( , , Attribute: 10 ) Word attribute: 10 ddefs "w" "q" . ddefs "help" /etc/scsifmt.info . , scsiscan. , : scsiscan SEAGATE ST51080N m187_0c0d1 ... cat >> /etc/scsifmt.info "SEAGATE" "ST51080N" filename 7 "1GB SCSI" ^D &dDSUN: &d@ Sun', /etc/format.dat &dD * * &d@ "" " ". . , , : /dev . SVR4 : /dev/rdsk/* - /dev/dsk/* - /dev/rmt/* - /dev/term/* - (dial-in) /dev/cua/* - (dial-out) /dev/pts/* - &dDMOTOROLA: :&d@ controller_cXdYsuffix : controller - X - Y - suffix - , : ( SCSI ) Motorola 922 /dev/dsk/m197_c0d0s1 SCSI m197 0, SCSI 0 (slice) 1 /dev/dsk/m328_c0d0s0 SCSI m328 0, . . . SCSI 0 (slice) 0 () /dev/rdsk/m328_c0d0s7 /dev/rdsk/m197_c0d1s7 , () /dev/rdsk/m197_c0d0s1 /dev/rdsk/m197_c0d1s2 . /dev/rmt/ctape1 /dev/rmt/m197_c0d4 CD-ROM. /dev/rdsk/m197_c0d6s7 - "" () /dev/dsk/m197_c0d6s0 - CD-ROM "" ufs /dev/dsk/m197_c0d6s7 - CD-ROM iso9660 &dDSUN:&d@. () SPARCstation: 8 0 8. SCSI : /dev/dsk/c0t2d0s3 Controller 0 ( 0) Taget 2 (SCSI ID) Disk 0 (LUN Logical Unit Number - 0) Slice 3 ( ) () /dev/rdsk/c0t3d0s2 - 2 SPARC- station 3- SCSI . CD-ROM () /dev/dsk/c0t6d0s2 CD 6- SCSI . - . . /dev/rmt/0 1- ( 150) /dev/rmt/1 2- ( DAT 4) Sun'. "reconfiguration boot". boot prom'a: ok boot -r &dDLinux:&d@. 4 primary 1 4. extended - 4 5 8 () /dev/hda IDE /dev/hdb IDE /dev/hdc IDE hd ( CD) - master /dev/hdc IDE hd ( CD) - slave /dev/sda SCSI ... /dev/sda1, /dev/sda2, ... ,8 SCSI /dev/hdb1, /dev/hdb2, ... ,8 IDE CD-ROM /dev/sbpcd,/dev/sonycd, ... /dev/hdc - IDE CD /dev/cdrom . /dev/rmt1 . /dev/fd0 - A: /dev/fd1 - B: &dDHP-UX&d@ () /dev/rdsk/c0t6d0 (raw) /dev/dsk/c0t6d0 HP-UX , LVM - /dev/vg00/lvol12 char logical volume /dev/vg00/rlvol12 block logical volume /dev/rmt/0m /dev/rmt/0mn &dD * SCSI * &d@. SCSI Unix . bad block' - . &dDMOTOROLA: &d@ - - scsifmt. ( /dev/rdsk, slice 7). : scsifmt /dev/rdsk/m197_c0d1s7 scsifmt /dev/rdsk/m328_c1d0s7 : ? 20 . ? Ctrl-C. ENTER Ctrl-C ? 30 . " Unix". scsifmt , . scsifmt dinit , . dinit . ( , -, ) dinit. dinit [-f] [-q] [-b] filename /dev/rdsk/m187_c0d1s7 -X 9 debug-level -f -q "" -b -v {0-4} write man dinit &dDSUN:&d@ SunOS . , . . prtvtoc /dev/rdsk/c0t0d0s2 &dDHP-UX&d@ format /dev/rdsk/c0t6d0 &dD * . Partition Table * &d@ &dDLinux: fdisk&d@ partiotion table Linux fdisk. - , . fdisk /dev/hda # /dev/sdb ... mke2fs /dev/hda1 # ext2 : fdisk -p /dev/hda # /dev/sdb ... &dDSUN: &d@ Sun', /etc/format.dat - format, . format Boot- boot-. installboot dd installboot /dev/rdsk/c0t3d0s0 dd if=/usr/lib/fs/ufs/bootblk bs=1k skip=1 of=/dev/dsk/c0t3d0s0 &dDSUN: &d@. newfs /dev/dsk/c0t0d0s7 SUN: . ufs Unix File System hsfs High Sierra, ISO 9660, Rock Rige Extension CD-ROM' pcfs MS-DOS FAT 3" nfs Network File System rfs Remote File System System V - FS tmpfs swap- lofs Loop Back FS mount -F nfs localhost:/ /mnt procfs Process FS - " " fifofs FIFO FS fdfs File Descriptors FS namefs &dDMOTOROLA: &d@. Disk Slice Editorom dse. 15 slice' (). 0 6, 8 f. 7 , . dse __ # : dse /dev/rdsk/m197_c0d0s7 DSE , VI : :q! :wq h,j,k,l ( - ) C dw dd cw : 648 ( ), VTOC (Volume Table Of Contents). . SVR4/88 3 - ufs, s5, bfs. "UFS". Motorola: . ufs Unix File System s5 System V. , - SV 3.1. , bfs Boot File System /stand " " . boot unix cdfs CD File System CD ROM' ISO 9660 dse mkfs - , , mkfs, . dse VTOC, fmthard. , . fmthard -S file_with_vtoc_description /dev/rmt/m187_c0d1s7 dse. : prtvtoc /dev/rdsk/m187_c0d0s7 &dD * * &d@ &dDMOTOROLA: &d@ fstyp __ (.. , /stand, /boot ) Unix' "ufs" - Unix File System. BSD- , ( 256 ), , "" inod' ( , ) &dDmkfs - &d@. # s5 4- , - # 200 !!! 512- mkfs -F s5 /dev/rdsk/m328_c2d0s4 400000 # ufs 5- mkfs -F ufs -o bsize=4096,nsect=36,ntrack=9,free=1 \ /dev/rdsk/m328_c2d0s5 &dDLinux: &d@ mke2fs /dev/hda9 &dDHP-UX: &d@ newfs -F hfs /dev/rvol12 &dDHP-UX: JFS vs HFS&d@ HP-UX : HFS (High Perfomance) - AKA ufs, JFS (Journal) AKA Verytas vxfs 0. vxfs - , . , fs __ . " ", . &dD:&d@ 1. vxfs . fs. . "close file" - sync inod' , ufs. 2. vxfs - . 3. inod vxfs- 256 ( 128), (<=96) inod' 4. vxfs - , . 5. vxfs inod', - vxfs . . &dD:&d@ 1. vxfs 2. vxfs, /stand HFS' &dD Live JFS (AKA OnLine VxFS) Only:&d@ vxfs, , , vxfs : 6. fs . 7. fs (- speed disk) . 8. Snapshot () fs. - - "" . : . "" , - , , . , vxfs ( 2-4 ) cd /hfs ; time tar xf /tmp/big.tar cd /vxfs ; time tar xf /tmp/big.tar time cat bigfile bigfile bigfile bigfile bigfile > /vxfs/big time cat bigfile bigfile bigfile bigfile bigfile > /hfs/big : vxfs , - , , . HFS "readonly" , /usr - , hfs . &dDLinux. CDROM&d@ mkisofs -R -o image directory cd-r cdrecord &dD * * &d@. "" , , Unix mount. Mount "" . " " - , "" . : mount -F ufs /dev/dsk/m197_c0d0s8 /home1 , , df , swap - , /etc/vfstab . . &dDMOTOROLA: CD-ROM&d@. CDROM'