4. Startup und Shutdown
========================
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 1 |
UNIX-Systeme müssen immer definiert angehalten werden:
shutdown, init 0, halt, poweroff, reboot !!!
Mittels "booten" werden UNIX-Systeme in einen definierten Arbeits-
zustand gebracht:
single-user
multi-user ohne Netzwerk
multi-user mit Netzwerk
multi-user mit Netzwerk und XDM
Booten eines UNIX-Systems(Kurzfassung):
Hardware/Softwarevoraussetzungen:
BIOS, EPROM, EEPROM, NVRAM, ROM mit Bootmonitor
SUN, DEC, PC
EPROM, ROM mit festem Bootprogram
IBM/RS6000, HP
Bootmanager, Bootprogramm auf Datenträger:
LINUX: LILO, GRUP
IBM/RS6000: spezielle Datenträger, auswahl mittels einschalten
HP: spezielle Datenträger, flinke Finger, warten
SUN: Serviceprozessor
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 2 |
Bootvorgang:
- laden eines intelligenten Ladeprogramms vom Bootmedium (ufsboot,
inetboot, osf_boot, boot.b (Hardware-boot)
- laden des Kernels vom Bootmedium (OS Loader)
/vmunix (SunOS, True64), /stand/vmunix (HP-UX),
/kernel/kmbd/sparcv9/genunix (SOLARIS),
/unix - /usr/lib/boot (AIX), /boot/vmlinuz... (Linux)
- Kernelinitialisierung (Kernel Startup)
Hardwaretest, Geräteerkennung, laden der Firmware, laden und
initialisieren der Driver, Aufbau der internen Tabellen
- Kernelfork und starten des init-Programms (init, inittab)
- Abarbeiten von Scripten (Hier kann der Sysadmin mitwirken) (Boot Scripts)
- Prüfung der Filesystemintegrität (fsck, ...)
- Mounten von lokalen Platten (root-Filesystem ist immer das erste)
mount -o rw,remount / # ro-Filesystem --> rw-Filesystem
- Crashdump sichern
- Swap-Space zuordnen
- Sicherheits-Checks (passwd, ...)
- Cleaning der Filesysteme (/tmp, /usr/spool/lock, ...)
- Starten der lokalen Serverprozesse
- Starten des Netzwerkes
- Starten der Netzwerkdämonen
- Nutzer freigeben
dauert am längsten - Parallelisierung angestrebt
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 3 |
NVRAM-Einstellungen:
Möglich bei: PC, SUN, DEC3000, DEC1000
Was?: Bootdevice (lokaler Datenträger, Netz)
Passwort
Hardware
Umgebungsvariable
Bootparameter
Hardware-Einstellungen:
IBM/RS6000: Schlüssel
Booten in Single-User:
Bootmonitor/Bootmanager:
z.B.:
Solaris: ok boot -s
linux: boot: linux single (LILO)
grub> root (hd0,0) (GRUB)
grub> kernel /vmlinuz ro root=/dev/hda2 single
grub> initrd /initrd.img
grub> boot
HP-UX: nach Einschalten Taste drücken
> bo P1
Interact with ISL? y
ISL> hpux -is
True64: >>> boot -fl s
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 4 |
Achtung: Single-User mit Passwort absichern!!
AIX: automatisch
HP-UX: automatisch
Solaris: erforderlich
Linux: erforderlich
auch /boot/grub/menu.lst absichern
Hardware:
Stellung des Schlüssels
Booten in Multi-User:
Standard oder Single-User mit ^D beenden
z.B.
Solaris: > boot
> boot cdrom
> boot disk
> boot -r
Mögliche Systemzustände:
Single-User
Sysadmin-Zustand
Multi-User ohne Netzwerk
Multi-User mit Netzwerk
X-Workstation
Reboot
Powerdown
Powerfail
Systemdiagnose
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 5 |
Erfragen des Aktuellen Systemzustandes:
who -r (Solaris, Linux)
runlevel (Linux)
Wechsel der Systemzustände:
init <Nummer des Zielzustandes>
Linux mit Kommando dmesg:
Linux version 2.6.11.4-20a-default (geeko@buildhost)
(gcc version 3.3.5 20050117 (prerelease) (SUSE Linux))
#1 Wed Mar 23 21:52:37 UTC 2005
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
BIOS-e820: 000000000009f000 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000d2000 - 00000000000d4000 (reserved)
BIOS-e820: 00000000000dc000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000003ff60000 (usable)
...........
Neu:
startpar - paralleles abarbeiten der init-Scripts
/etc/init.d/.depend.start
/etc/init.d/.depend.stop
/etc/init.d/.depend.boot
systemd (systemctl)
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 6 |
SunOS mit Kommando dmesg: SuperSPARC: PAC ENABLED SunOS Release 4.1.3 (BELLUS) #2: Fri Jun 16 16:08:49 MET DST 1995 Copyright (c) 1983-1992, Sun Microsystems, Inc. cpu = SUNW,SPARCstation-10 mod0 = TI,TMS390Z50 (mid = 8) mem = 48752K (0x2f9c000) avail mem = 44986368 cpu0 at Mbus 0x8 0x230000 entering uniprocessor mode Ethernet address = 8:0:20:1d:8d:30 espdma0 at SBus slot f 0x400000 esp0 at SBus slot f 0x800000 pri 4 (onboard) sd0 at esp0 target 3 lun 0 sd0: <SUN1.05 cyl 2036 alt 2 hd 14 sec 72> sr0 at esp0 target 6 lun 0 ledma0 at SBus slot f 0x400010 le0 at SBus slot f 0xc00000 pri 6 (onboard) SUNW,bpp0 at SBus slot f 0x4800000 pri 3 (sbus level 2) SUNW,DBRIe0 at SBus slot f 0x8010000 pri 9 (sbus level 5) cgsix0 at SBus slot 2 0x0 pri 9 (sbus level 5) cgsix0: screen 1152x900, single buffered, 1M mappable, rev 8 zs0 at obio 0x100000 pri 12 (onboard) zs1 at obio 0x0 pri 12 (onboard) SUNW,fdtwo0 at obio 0x700000 pri 11 (onboard) MMCODEC: manufacturer id 1, rev 2 root on sd0a fstype 4.2 swap on sd0b fstype spec size 69552K dump on sd0b fstype spec size 69540K |
| next | back | 4. Startup und Shutdown | WS 2013/14 - 7 |
le0: Twisted Pair Ethernet NFS lookup failed for server hp832: RPC: Timed out |
| next | back | 4. Startup und Shutdown | WS 2013/14 - 8 |
SOLARIS mit Kommando dmesg:
/var/adm/messages
Oct 16 09:31:16 condor
genunix: [ID 540533 kern.notice]
MSunOS Release 5.10 Version Generic_139555-08 64-bit
genunix: [ID 943908 kern.notice] Copyright 1983-2009 Sun Microsystems, Inc.
All rights reserved.
Use is subject to license terms.
genunix: [ID 678236 kern.info] Ethernet address = 0:21:28:44:79:be
unix: [ID 200854 kern.info] NOTICE: DR Kernel Cage is ENABLED
unix: [ID 389951 kern.info] mem = 33554432K (0x800000000)
unix: [ID 930857 kern.info] avail mem = 33441013760
rootnex: [ID 466748 kern.info] root nexus = Sun SPARC Enterprise M4000 Server
rootnex: [ID 349649 kern.info] pseudo0 at root
genunix: [ID 936769 kern.info] pseudo0 is /pseudo
rootnex: [ID 349649 kern.info] scsi_vhci0 at root
genunix: [ID 936769 kern.info] scsi_vhci0 is /scsi_vhci
rootnex: [ID 349649 kern.info] px0 at root: SAFARI 0x0 0x600000
genunix: [ID 936769 kern.info] px0 is /pci@0,600000
px: [ID 236367 kern.info] PCI Express-device: pci@0, pxb_plx0
genunix: [ID 936769 kern.info] pxb_plx0 is /pci@0,600000/pci@0
pxb_plx: [ID 370704 kern.info] PCI-device: pci@8, pxb_plx1
genunix: [ID 936769 kern.info] pxb_plx1 is /pci@0,600000/pci@0/pci@8
pxb_plx: [ID 370704 kern.info] PCI-device: pci@0, px_pci0
genunix: [ID 936769 kern.info] px_pci0 is /pci@0,600000/pci@0/pci@8/pci@0
scsi: [ID 365881 kern.info] /pci@0,600000/pci@0/pci@8/pci@0/scsi@1 (mpt0):
initiator SCSI ID now 7
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 9 |
scsi: [ID 365881 kern.info] /pci@0,600000/pci@0/pci@8/pci@0/scsi@1 (mpt0):
Rev. 2 LSI, Inc. 1064 found.
scsi: [ID 365881 kern.info] /pci@0,600000/pci@0/pci@8/pci@0/scsi@1 (mpt0):
mpt0 supports power management.
scsi: [ID 365881 kern.info] /pci@0,600000/pci@0/pci@8/pci@0/scsi@1 (mpt0):
mpt0 Firmware version v1.b.0.0 (IT)
scsi: [ID 365881 kern.info] /pci@0,600000/pci@0/pci@8/pci@0/scsi@1 (mpt0):
mpt0: IOC Operational.
scsi: [ID 243001 kern.info] /pci@0,600000/pci@0/pci@8/pci@0/scsi@1 (mpt0):
mpt0: Initiator WWNs: 0x5080020000027a5c-0x5080020000027a5f
px_pci: [ID 370704 kern.info] PCI-device: scsi@1, mpt0
genunix: [ID 936769 kern.info] mpt0 is /pci@0,600000/pci@0/pci@8/pci@0/scsi@1
scsi: [ID 193665 kern.info] sd1 at mpt0: target 0 lun 0
genunix: [ID 936769 kern.info] sd1 is /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@0,0
genunix: [ID 408114 kern.info] /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@0,0 (sd1)
online
pseudo: [ID 129642 kern.info] pseudo-device: dr0
genunix: [ID 936769 kern.info] dr0 is /pseudo/dr@0
pseudo: [ID 129642 kern.info] pseudo-device: dld0
genunix: [ID 936769 kern.info] dld0 is /pseudo/dld@0
rootnex: [ID 349649 kern.info] oplmsu0 at root
genunix: [ID 936769 kern.info] oplmsu0 is /pseudo-console
rootnex: [ID 349649 kern.info] pcicmu0 at root: SAFARI 0x8 0x4000
genunix: [ID 936769 kern.info] pcicmu0 is /pci@8,4000
genunix: [ID 408114 kern.info] /pci@8,4000 (pcicmu0) online
pcicmu: [ID 370704 kern.info] PCI-device: ebus@1, ebus0
genunix: [ID 936769 kern.info] ebus0 is /pci@8,4000/ebus@1
genunix: [ID 408114 kern.info] /pci@8,4000/ebus@1 (ebus0) online
ebus: [ID 521012 kern.info] su0 at ebus0: offset 14,400000
genunix: [ID 936769 kern.info] su0 is /pci@8,4000/ebus@1/serial@14,400000
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 10 |
genunix: [ID 408114 kern.info] /pci@8,4000/ebus@1/serial@14,400000 (su0) online
ebus: [ID 521012 kern.info] scfd0 at ebus0: offset 14,200000
genunix: [ID 936769 kern.info] scfd0 is /pci@8,4000/ebus@1/scfc@14,200000
genunix: [ID 408114 kern.info] /pci@8,4000/ebus@1/scfc@14,200000 (scfd0) online
ebus: [ID 521012 kern.info] oplpanel0 at ebus0: offset 14,280030
genunix: [ID 936769 kern.info] oplpanel0 is /pci@8,4000/ebus@1/panel@14,280030
genunix: [ID 408114 kern.info] /pci@8,4000/ebus@1/panel@14,280030 (oplpanel0) online
unix: [ID 950921 kern.info] cpu0: SPARC64-VII (0x91 clock 2400 MHz)
unix: [ID 950921 kern.info] cpu1: SPARC64-VII (0x7 ver 0x91 clock 2400 MHz)
unix: [ID 557827 kern.info] cpu1 initialization complete - online
......
unix: [ID 950921 kern.info] cpu30: SPARC64-VII (0x7 ver 0x91 clock 2400 MHz)
unix: [ID 557827 kern.info] cpu30 initialization complete - online
unix: [ID 950921 kern.info] cpu31: SPARC64-VII (0x7 ver 0x91 clock 2400 MHz)
unix: [ID 557827 kern.info] cpu31 initialization complete - online
rootnex: [ID 349649 kern.info] iscsi0 at root
genunix: [ID 936769 kern.info] iscsi0 is /iscsi
pxb_plx: [ID 370704 kern.info] PCI-device: pci@0,1, px_pci1
genunix: [ID 936769 kern.info] px_pci1 is /pci@0,600000/pci@0/pci@8/pci@0,1
rootnex: [ID 349649 kern.info] mc-opl0 at root: SAFARI 0x200 0x200 ...
genunix: [ID 936769 kern.info] mc-opl0 is /pseudo-mc@200,200
pxb_plx: [ID 370704 kern.info] PCI-device: pci@9, pxb_plx2
genunix: [ID 936769 kern.info] pxb_plx2 is /pci@0,600000/pci@0/pci@9
mac: [ID 469746 kern.info] NOTICE: bge0 registered
bge: [ID 801725 kern.info] NOTICE: bge0: link down (initialized)
genunix: [ID 454863 kern.info] dump on /dev/dsk/c0t0d0s1 size 4104 MB
pseudo: [ID 129642 kern.info] pseudo-device: zfs0
genunix: [ID 936769 kern.info] zfs0 is /pseudo/zfs@0
pseudo: [ID 129642 kern.info] pseudo-device: devinfo0
genunix: [ID 936769 kern.info] devinfo0 is /pseudo/devinfo@0
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 11 |
pseudo: [ID 129642 kern.info] pseudo-device: tod0
genunix: [ID 936769 kern.info] tod0 is /pseudo/tod@0
pseudo: [ID 129642 kern.info] pseudo-device: pm0
genunix: [ID 936769 kern.info] pm0 is /pseudo/pm@0
bge: [ID 801725 kern.info] NOTICE: bge0: link up 1000Mbps Full-Duplex (initialized)
pseudo: [ID 129642 kern.info] pseudo-device: fcode0
genunix: [ID 936769 kern.info] fcode0 is /pseudo/fcode@0
pseudo: [ID 129642 kern.info] pseudo-device: oplkmdrv0
genunix: [ID 936769 kern.info] oplkmdrv0 is /pseudo/oplkmdrv@0
pseudo: [ID 129642 kern.info] pseudo-device: dm2s0
genunix: [ID 936769 kern.info] dm2s0 is /pseudo/dm2s@0
pppd[282]: [ID 860527 daemon.notice] pppd 2.4.0b1 (Sun Microsystems, Inc.)
pppd[282]: [ID 702911 daemon.notice] Connect: sppp0 <--> /dev/dm2s0
pppd[282]: [ID 702911 daemon.notice] local IP address 10.1.1.2
pppd[282]: [ID 702911 daemon.notice] remote IP address 10.1.1.1
pseudo: [ID 129642 kern.info] pseudo-device: dtrace0
genunix: [ID 936769 kern.info] dtrace0 is /pseudo/dtrace@0
pseudo: [ID 129642 kern.info] pseudo-device: pool0
genunix: [ID 936769 kern.info] pool0 is /pseudo/pool@0
pseudo: [ID 129642 kern.info] pseudo-device: vol0
genunix: [ID 936769 kern.info] vol0 is /pseudo/vol@0
scsi: [ID 193665 kern.info] sd0 at mpt0: target 1 lun 0
genunix: [ID 936769 kern.info] sd0 is /pci@0,600000/pci@0/pci@8/pci@0/
scsi@1/sd@1,0
scsi: [ID 193665 kern.info] sd2 at mpt0: target 3 lun 0
genunix: [ID 936769 kern.info] sd2 is /pci@0,600000/pci@0/pci@8/pci@0/
scsi@1/sd@3,0
pseudo: [ID 129642 kern.info] pseudo-device: devinfo0
genunix: [ID 936769 kern.info] devinfo0 is /pseudo/devinfo@0
svc.startd[7]: [ID 694882 daemon.notice] instance
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 12 |
svc:/system/console-login:default
scsi: [ID 193665 kern.info] sd0 at mpt0: target 1 lun 0
genunix: [ID 936769 kern.info] sd0 is /pci@0,600000/pci@0/pci@8/pci@0/
scsi@1/sd@1,0
rootnex: [ID 349649 kern.info] px1 at root: SAFARI 0x1 0x700000
genunix: [ID 936769 kern.info] px1 is /pci@1,700000
rootnex: [ID 349649 kern.info] px2 at root: SAFARI 0x2 0x600000
genunix: [ID 936769 kern.info] px2 is /pci@2,600000
rootnex: [ID 349649 kern.info] px3 at root: SAFARI 0x3 0x700000
genunix: [ID 936769 kern.info] px3 is /pci@3,700000
rootnex: [ID 349649 kern.info] ramdisk0 at root
genunix: [ID 936769 kern.info] ramdisk0 is /ramdisk-root
pseudo: [ID 129642 kern.info] pseudo-device: pseudo1
genunix: [ID 936769 kern.info] pseudo1 is /pseudo/zconsnex@1
pseudo: [ID 129642 kern.info] pseudo-device: ramdisk1024
genunix: [ID 936769 kern.info] ramdisk1024 is /pseudo/ramdisk@1024
pseudo: [ID 129642 kern.info] pseudo-device: lockstat0
genunix: [ID 936769 kern.info] lockstat0 is /pseudo/lockstat@0
pseudo: [ID 129642 kern.info] pseudo-device: llc10
genunix: [ID 936769 kern.info] llc10 is /pseudo/llc1@0
pseudo: [ID 129642 kern.info] pseudo-device: tod0
genunix: [ID 936769 kern.info] tod0 is /pseudo/tod@0
pseudo: [ID 129642 kern.info] pseudo-device: lofi0
genunix: [ID 936769 kern.info] lofi0 is /pseudo/lofi@0
mac: [ID 469746 kern.info] NOTICE: bge1 registered
pseudo: [ID 129642 kern.info] pseudo-device: trapstat0
genunix: [ID 936769 kern.info] trapstat0 is /pseudo/trapstat@0
pseudo: [ID 129642 kern.info] pseudo-device: fbt0
genunix: [ID 936769 kern.info] fbt0 is /pseudo/fbt@0
pseudo: [ID 129642 kern.info] pseudo-device: profile0
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 13 |
genunix: [ID 936769 kern.info] profile0 is /pseudo/profile@0
pseudo: [ID 129642 kern.info] pseudo-device: systrace0
genunix: [ID 936769 kern.info] systrace0 is /pseudo/systrace@0
pseudo: [ID 129642 kern.info] pseudo-device: sdt0
genunix: [ID 936769 kern.info] sdt0 is /pseudo/sdt@0
pseudo: [ID 129642 kern.info] pseudo-device: fasttrap0
genunix: [ID 936769 kern.info] fasttrap0 is /pseudo/fasttrap@0
pseudo: [ID 129642 kern.info] pseudo-device: mem_cache0
genunix: [ID 936769 kern.info] mem_cache0 is /pseudo/mem_cache@0
pseudo: [ID 129642 kern.info] pseudo-device: wrsmd0
genunix: [ID 936769 kern.info] wrsmd0 is /pseudo/wrsmd@0
pseudo: [ID 129642 kern.info] pseudo-device: wrsmd1
genunix: [ID 936769 kern.info] wrsmd1 is /pseudo/wrsmd@1
pseudo: [ID 129642 kern.info] pseudo-device: wrsmd2
genunix: [ID 936769 kern.info] wrsmd2 is /pseudo/wrsmd@2
.....
pseudo: [ID 129642 kern.info] pseudo-device: wrsmd14
genunix: [ID 936769 kern.info] wrsmd14 is /pseudo/wrsmd@14
pseudo: [ID 129642 kern.info] pseudo-device: wrsmd15
genunix: [ID 936769 kern.info] wrsmd15 is /pseudo/wrsmd@15
pseudo: [ID 129642 kern.info] pseudo-device: fcp0
genunix: [ID 936769 kern.info] fcp0 is /pseudo/fcp@0
pseudo: [ID 129642 kern.info] pseudo-device: fcsm0
genunix: [ID 936769 kern.info] fcsm0 is /pseudo/fcsm@0
pseudo: [ID 129642 kern.info] pseudo-device: fssnap0
genunix: [ID 936769 kern.info] fssnap0 is /pseudo/fssnap@0
pseudo: [ID 129642 kern.info] pseudo-device: winlock0
genunix: [ID 936769 kern.info] winlock0 is /pseudo/winlock@0
pseudo: [ID 129642 kern.info] pseudo-device: pm0
genunix: [ID 936769 kern.info] pm0 is /pseudo/pm@0
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 14 |
pseudo: [ID 129642 kern.info] pseudo-device: rsm0
genunix: [ID 936769 kern.info] rsm0 is /pseudo/rsm@0
ipf: [ID 774698 kern.info] IP Filter: v4.1.9, running.
Neu:
paralleles abarbeiten der init-Scripts
SMF - Service Managment Facility
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 15 |
DEC-OSF File: /var/adm/messages:
(verkürzt)
vmunix: panic (cpu 0): bad dir
syncing disks... done
Alpha boot: available memory from 0x6c0000 to 0x4000000
DEC OSF/1 V3.0 (Rev. 347); Fri Aug 25 13:22:40 MET DST 1995
physical memory = 64.00 megabytes.
available memory = 54.78 megabytes.
using 238 buffers containing 1.85 megabytes of memory
tc0 at nexus
scc0 at tc0 slot 7
tcds0 at tc0 slot 6
scsi0 at tcds0 slot 0
rz0 at scsi0 bus 0 target 0 lun 0 (DEC RZ26 (C) DEC 392A)
rz3 at scsi0 bus 0 target 3 lun 0 (DEC RZ26L (C) DEC 440C)
rz4 at scsi0 bus 0 target 4 lun 0 (DEC RRD42 (C) DEC 4.5d)
tz5 at scsi0 bus 0 target 5 lun 0 (DEC TLZ06 (C) DEC 0491)
scsi1 at tcds0 slot 1
rz8 at scsi1 bus 1 target 0 lun 0 (DEC RZ28 (C) DEC 435E)
rz9 at scsi1 bus 1 target 1 lun 0 (DEC RZ28 (C) DEC 435E)
rz10 at scsi1 bus 1 target 2 lun 0 (DEC RZ28 (C) DEC 435E)
rz11 at scsi1 bus 1 target 3 lun 0 (DEC RZ28 (C) DEC 435E)
bba0 at tc0 slot 7
ln0: DEC LANCE Module Name: PMAD-BA
ln0 at tc0 slot 7
ln0: DEC LANCE Ethernet Interface, hardware address:
08-00-2B-3E-18-80
fta0: DEC DEFTA FDDI Module Name: PMAF-FA
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 16 |
fta0 at tc0 slot 0
fta0: DMA Available.
fta0: DEC DEFTA (PDQ) FDDI Interface, Hardware address:
08-00-2B-A2-B4-49
fta0: Firmware rev: 1.1
tcds1 at tc0 slot 4
scsi2 at tcds1 slot 0
rz16 at scsi2 bus 2 target 0 lun 0 (DEC RZ28 (C) DEC 435E)
rz17 at scsi2 bus 2 target 1 lun 0 (DEC RZ28 (C) DEC 435E)
rz18 at scsi2 bus 2 target 2 lun 0 (DEC RZ28 (C) DEC 435E)
rz19 at scsi2 bus 2 target 3 lun 0 (DEC RZ28 (C) DEC 435E)
rz20 at scsi2 bus 2 target 4 lun 0 (DEC RZ28 (C) DEC 435E)
scsi3 at tcds1 slot 1
tz28 at scsi3 bus 3 target 4 lun 0 (DEC TLZ7 (C)DEC 4BQD)
DEC3000 - M800 system
Firmware revision: 5.1
PALcode: OSF version 1.35
lvm0: configured.
lvm1: configured.
SuperLAT. Copyright 1993 Meridian Technology Corp.
All rights reserved.
dli: configured
fta0: Link Unavailable.
fta0: Link Available.
NFS server: stale file handle fs(8,36866) file 54523 gen 818875302
getattr, client address = 141.20.22.146, errno 22
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 17 |
Konfigurationsfiles für das Booten
===================================
SunOS (klassisches BSD-System):
Script-Files:
/etc/rc.boot
/etc/rc.ip
/etc/rc.single
/etc/rc
/etc/rc.local
Datenfiles:
/fastboot - ob fastboot
/etc/hostname.??0 - Hostname für Interface
/etc/defaultrouter - default Router
/etc/defaultdomain - default NIS-Domain
/etc/ttytab
Ablauf:
/usr/etc/init [ -bs ]
/etc/rc.boot
single-user /etc/rc.ip, /etc/rc.single
oder
multi-user /etc/rc, /etc/rc.local
getty aufsetzen (abhängig von /etc/inittab)
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 18 |
Solaris 2.1-2.9 (klassisches AT&T System V):
Script-Files:
/etc/rc0 - shutdown /sbin/rc0
/etc/rc1 - Administrationstatus - single-user /sbin/rc1
/etc/rc2 - Multiuser mit Netzwerk /sbin/rc2
/etc/rc3 - Multiuser mit NFS /sbin/rc3
/etc/rc5 - shutdown /sbin/rc5
/etc/rc6 - shutdown /sbin/rc6
/etc/rcS - Singeluser /sbin/rcS
/etc/rc[0123S].d/* - Startup/Shutdown-Scripte
/etc/rc2.d/S69inet start - Aufruf eines Startup-Scripts
/etc/rc2.d/K16apache stop - Aufruf eines Shutdown-Scripts
/etc/init.d/* - Muster für alle Startup/Shutdown-Scripte
Datenfiles:
/etc/inittab
/etc/default/init
/etc/defaultdomain
/etc/defaultrouter
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 19 |
Ablauf:
/sbin/init - /sbin/init [0123456abcQqSs]
/etc/default/init
/etc/inittab
Eintrag in inittab:
id:rstate:action:process
id - 1..2 Buchstaben
rstate - run level
action - Verhalten (respawn, wait, once,
boot, bootwait, powerfail,
powerwait, off, initdefault,
sysinit)
prozess - abzuarbeitendes Programm/Script
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 20 |
Beispiel Solaris 2.8:
ap::sysinit:/sbin/autopush -f /etc/iu.ap
ap::sysinit:/sbin/soconfig -f /etc/sock2path
fs::sysinit:/sbin/rcS sysinit >/dev/msglog 2<>/dev/msglog </dev/console
is:3:initdefault:
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog
2<>/dev/msglog
sS:s:wait:/sbin/rcS >/dev/msglog 2<>/dev/msglog </dev/console
s0:0:wait:/sbin/rc0 >/dev/msglog 2<>/dev/msglog </dev/console
s1:1:respawn:/sbin/rc1 >/dev/msglog 2<>/dev/msglog </dev/console
s2:23:wait:/sbin/rc2 >/dev/msglog 2<>/dev/msglog </dev/console
s3:3:wait:/sbin/rc3 >/dev/msglog 2<>/dev/msglog </dev/console
s5:5:wait:/sbin/rc5 >/dev/msglog 2<>/dev/msglog </dev/console
s6:6:wait:/sbin/rc6 >/dev/msglog 2<>/dev/msglog </dev/console
fw:0:wait:/sbin/uadmin 2 0 >/dev/msglog 2<>/dev/msglog </dev/console
of:5:wait:/sbin/uadmin 2 6 >/dev/msglog 2<>/dev/msglog </dev/console
rb:6:wait:/sbin/uadmin 2 1 >/dev/msglog 2<>/dev/msglog </dev/console
sc:234:respawn:/usr/lib/saf/sac -t 300
co:234:respawn:/usr/lib/saf/ttymon -g -h -p \
"`uname -n` console login: " \
-T sun -d /dev/console -l console \
-m ldterm,ttcompat
ift::boot:/etc/.iftraidagent
Nun werden die RC-Files entsprechend /etc/inittab
abgearbeitet.
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 21 |
Solaris 10: Alles wird durch SMF (Service Management Facility) verwaltet.
Klassisches System V Methode nur noch für Unverbesserliche im
Notfall.
Start durch svc.startd.
/etc/inittab existiert aber trotzdem
Beispiel Solaris 10:
# The /etc/inittab file controls the configuration of init(1M); for more
# information refer to init(1M) and inittab(4).
#
## svccfg
# svc:> select system/console-login
# svc:/system/console-login> setprop ttymon/terminal_type = "xterm"
# svc:/system/console-login> exit
#
ap::sysinit:/sbin/autopush -f /etc/iu.ap
sp::sysinit:/sbin/soconfig -f /etc/sock2path
smf::sysinit:/lib/svc/bin/svc.startd \
>/dev/msglog 2<>/dev/msglog </dev/console
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 \
>/dev/msglog 2<>/dev/msglog
Ein Service wird durch eine Konfigurationsdatei beschrieben (XML-Datei), die alle
Abhängigkeiten und auszuführenden Aktionen entält. Zusätzlich gibt es eventuell
eine Methoden-Datei (Shellscript), die auszuführende Kommandos enthält (analog
dem alten Verfahren). Das Ausführen von Aktionen bzw. das Starten der Methoden-Scripte
wird durch den svc.startd (Service Managment Facility master restarter) und
den svc.configd (Service Managment Facility repository daemon) gesteuert.
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 22 |
Kommandos für die SMF
svcs - report service status
svcs -a
svcs -x ssh
svcadm - manipulate service instances
svcadm enable ssh
svcadm disable ssh
svcadm restart ssh
svccfg - import, export and modify service configurations
svccfg import cswspamd.xml
svccfg delete svc:/network/radius
svccfg -s svc:/system/filesystem/volfs listprop vold/*
svcprop - retrieve values of service configuration properties
svcprop -p httpd/ssl svc:/network/http:apache2
XML-Files unter:
/var/svc/manifest/
/var/svc/manifest/network
/opt/csw/var/svc/manifest/
/opt/csw/var/svc/manifest/network
Methodenfiles unter:
/lib/svc/method
/opt/csw/lib/svc/method
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 23 |
Beispiel Apache2
Methodenfile:
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='SUNWapch2r:apache'>
<service
name='network/http'
type='service'
version='1'>
<!--
Because we may have multiple instances of network/http
provided by different implementations, we keep dependencies
and methods within the instance.
-->
<instance name='apache2' enabled='false'>
<!--
Wait for network interfaces to be initialized.
-->
<dependency name='network'
grouping='require_all'
restart_on='error'
type='service'>
<service_fmri value='svc:/milestone/network:default'/>
</dependency>
<!--
Wait for all local filesystems to be mounted.
-->
<dependency name='filesystem-local'
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 24 |
grouping='require_all' restart_on='none' type='service'> <service_fmri value='svc:/system/filesystem/local:default'/> </dependency> <!-- Wait for automounting to be available, as we may be serving data from home directories or other remote filesystems. --> <dependency name='autofs' grouping='optional_all' restart_on='error' type='service'> <service_fmri value='svc:/system/filesystem/autofs:default'/> </dependency> <exec_method type='method' name='start' exec='/lib/svc/method/http-apache2 start' timeout_seconds='60' /> <exec_method type='method' name='stop' exec='/lib/svc/method/http-apache2 stop' timeout_seconds='60' /> <exec_method type='method' |
| next | back | 4. Startup und Shutdown | WS 2013/14 - 25 |
name='refresh'
exec='/lib/svc/method/http-apache2 refresh'
timeout_seconds='60' />
<property_group name='httpd' type='application'>
<stability value='Evolving' />
<propval name='ssl' type='boolean' value='false' />
</property_group>
<property_group name='startd' type='framework'>
<!-- sub-process core dumps shouldn't restart
session -->
<propval name='ignore_error' type='astring'
value='core,signal' />
</property_group>
</instance>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>
Apache 2 HTTP server
</loctext>
</common_name>
<documentation>
<manpage title='httpd' section='8'
manpath='/usr/apache2/man' />
<doc_link name='apache.org'
uri='http://httpd.apache.org' />
</documentation>
</template>
</service>
</service_bundle>
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 26 |
Methodenfile:
#!/sbin/sh
#
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)http-apache2 1.2 04/11/11 SMI"
#
. /lib/svc/share/smf_include.sh
APACHE_HOME=/usr/apache2
CONF_FILE=/etc/apache2/httpd.conf
PIDFILE=/var/run/apache2/httpd.pid
[ ! -f ${CONF_FILE} ] && exit $SMF_EXIT_ERR_CONFIG
case "$1" in
start)
/bin/rm -f ${PIDFILE}
/bin/mkdir -p /var/run/apache2
ssl=`svcprop -p httpd/ssl svc:/network/http:apache2`
if [ "$ssl" = false ]; then
cmd="start"
else
cmd="startssl"
fi
;;
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 27 |
refresh)
cmd="graceful"
;;
stop)
cmd="stop"
;;
*)
echo "Usage: $0 {start|stop|refresh}"
exit 1
;;
esac
exec ${APACHE_HOME}/bin/apachectl $cmd 2>&1
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 28 |
OSF:
Script-Files:
/etc/rc0 - Halt
/etc/rc2 - Multiuser
/etc/rc3 - Multiuser mit Netzwerk
/sbin/rc[023].d/*
/sbin/init.d/*
Datenfiles:
/etc/inittab
/etc/rc.config
/etc/routes
Ablauf:
/sbin/init - /sbin/init [023qs]
/etc/inittab
Eintrag in inittab:
Identifier:Runlevel:Action:Command
Runlevel - 0,2,3,S,s
Action - respawn, wait, once,
boot, bootwait,
powerfail, powerwait,
off,initdefault, sysinit
Beispiel:
# OSF/1 Release 1.0
is:3:initdefault:
ss:Ss:wait:/sbin/rc0 shutdown \
< /dev/console > /dev/console 2>&1
s0:0:wait:/sbin/rc0 off </dev/console >/dev/console 2>&1
fs:23:wait:/sbin/bcheckrc </dev/console >/dev/console 2>&1
sysconfig:Ss:sysinit:/sbin/init.d/autosysconfig start ....
update:23:wait:/sbin/update > /dev/console 2>&1
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 29 |
it:23:wait:/sbin/it < /dev/console > /dev/console 2>&1
kmk:3:wait:/sbin/kmknod > /dev/console 2>&1
s2:23:wait:/sbin/rc2 < /dev/console > /dev/console 2>&1
s3:3:wait:/sbin/rc3 < /dev/console > /dev/console 2>&1
cons:1234:respawn:/usr/sbin/getty console console vt100
Nun werden die RC-Files entsprechend inittab
abgearbeitet.
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 30 |
AIX:
Script-Files:
/etc/rc.boot /etc/rc
/etc/rc.bsdnet /etc/rc/ncs
/etc/rc.net /etc/rc.nfs
/etc/rc.powerfail /etc/rc.tcpip
Datenfiles:
/etc/inittab
Ablauf:
/etc/init - /etc/init [0123456789abcQqSsMmN]
Eintrag in inittab:
Identifier:RunLevel:Action:Command
Beispiel:
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 \
# Phase 3 of system boot
powerfail::powerfail:/etc/rc.powerfail >/dev/console 2>&1
rc:2:wait:/etc/rc > /dev/console 2>&1
# Multi-User checks
fbcheck:2:wait:/usr/lib/dwm/fbcheck >/dev/console 2>&1 \
# run /etc/firstboot
srcmstr:2:respawn:/etc/srcmstr \
# System Resource Controller
rctcpip:2:wait:/etc/rc.tcpip > /dev/console 2>&1
# Start TCP/IP dämons
rcnfs:2:wait:/etc/rc.nfs > /dev/console 2>&1 \
# Start NFS Dämons
cons:0123456789:respawn:/etc/getty /dev/console
piobe:2:wait:/bin/rm -f /usr/lpd/pio/flags/* \
# Clean up printer flags files
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 31 |
cron:2:respawn:/etc/cron
qdaemon:2:wait:/bin/startsrc -sqdaemon
writesrv:2:wait:/bin/startsrc -swritesrv
uprintfd:2:respawn:/etc/uprintfd
rcncs:2:wait:sh /etc/rc.ncs
lpd:2:once:startsrc -s lpd
tty0:2:off:/etc/getty /dev/tty0
tty1:2:off:/etc/getty /dev/tty1
infod:2:once:startsrc -s infod
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 32 |
HPUX 9.5:
Script-Files:
/etc/rc
/etc/bcheckrc
/etc/brc
/etc/lvmrc
/etc/netbsdsrc
/etc/netlinkrc
/etc/netlsrc
/etc/netncsrc
/etc/netnfsrc
/etc/netnfsrc2
/etc/netnmrc
/etc/omrc
/etc/src.csh
/etc/src.sh
/etc/pre_init_rc
Datenfiles:
/etc/inittab
Ablauf:
/etc/pre_init_rc
/etc/init - /etc/init [0123456SsQq]
Beispiel für /etc/inittab:
io::sysinit:/etc/ioinit -i > /dev/console 2>&1
is:2:initdefault:
mx::sysinit:/etc/dasetup < /dev/console > /dev/console 2>&1
bl::bootwait:/etc/bcheckrc </dev/console >/dev/cons...
slib::bootwait:/etc/recoversl </dev/console >/dev/c...
bc::bootwait:/etc/brc 1>/dev/console 2>&1
sl::wait:/bin/sh -c "/bin/rm -f /dev/syscon; /bin/ln /dev/systty
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 33 |
/dev/syscon" 1>/dev/console 2>&1
rc::wait:/bin/sh /etc/rc </dev/console 1>/dev/console 2>&1
co:12:respawn:/etc/getty console console
c1:2:respawn:/etc/getty -h tty0p1 9600
#c2:2:respawn:/usr/lib/uucp/uugetty -h tty0p2 9600
c4:2:respawn:/etc/getty -h tty0p4 9600
c5:2:respawn:/etc/getty -h tty0p5 9600
c6:2:off:/etc/getty -h tty0p6 9600
c7:2:off:/etc/getty -h tty0p7 9600
pf::powerwait:/etc/powerfail >/dev/console 2>&1
xdm:2:off:/usr/bin/X11/xdm -nodaemon < /dev/null > ...
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 34 |
LINUX (SuSE)
-------------
Script-Files in:
/etc/init.d/
/etc/init.d/rc0.d, ..., /etc/init.d/rc6.d, /etc/init.d/rcS.d
Spezielle Scriptfiles:
/etc/init.d/boot, /etc/init.d/boot.local
/etc/init.d/halt, /etc/init.d/halt.local
/etc/init.d/rc
/etc/init.d/reboot, /etc/init.d/single
Konfigurationsfiles für Komponenten:
/etc/inittab
/etc/rc.config # bis SuSE 7.3
/etc/sysconfig/* # ab SuSE 11.1
apache2 fonts-config nagios suseconfig
arpwatch hardware/ network/ SuSEfirewall2
atd ide news SuSEfirewall2.d/
auditd irda nfs susehelp
autofs irqbalance ntp suse_register
backup ispell postfix svnserve
bluetooth joystick proxy sysctl
boot kernel rpcbind syslog
bootloader keyboard scpm ulimit
bootsplash language scripts/ uuidd
clock ldap security windowmanager
console lirc services words
cron lvm shutdown xendomains
cups mail sound yast2
displaymanager mdadm spamd ypbind
dmraid mouse ssh
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 35 |
Modifikation von /etc/sysconfig/*
vi /etc/sysconfig/postfix
problematisch, da nicht bekannt ist, was eventuell "yast2"
bei einem späteren Reconfigure macht!!!
besser:
yast2
System
/etc/sysconfig Editor
Applications
Desktop
Hardware
Network
Other
System
Bei dem Rest muss man raten oder es wissen!?
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 36 |
Ablauf:
/sbin/init - /sbin/init [ -t sec ] [ 0123456SsQq ]
Eintrag in inittab:
id:runlevels:action:process
runlevels: -0123456S
action:
respawn - Prozess neu starten
wait - warten bis Prozess zu Ende ist
once - einmalig bei Runlevelwechsel
boot - bei Systemstart
bootwait - bei Systemstart und warten
off - Eintrag ohne Funktion
onedemand - wenn runlevel aufgerufen wird
initdefault - Standard-Runlevel
sysinit - starten vor boot und bootwait
powerwait - Stromversorgung wechselt auf USV (Signal)
powerfail - Fehler in der Stromversorgung (sofort)
powerokwait - Stromversorgung wieder ok
powerfailnow - USV ist leer (sofort)
resume - nach Suspend
ctrlaltdel -
kbdrequest -
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 37 |
Beispiel /etc/inittab:
# Copyright (c) 1996-2002 SuSE Linux AG, Nuernberg, Germany.
# Author: Florian La Roche, 1996
# Please send feedback to http://www.suse.de/feedback
# This is the main configuration file of /sbin/init, which
# is executed by the kernel on startup. It describes what
# scripts are used for the different run-levels.
# All scripts for runlevel changes are in /etc/init.d/.
# This file may be modified by SuSEconfig unless CHECK_INITTAB
# in /etc/sysconfig/suseconfig is set to "no"
# The default runlevel is defined here
id:5:initdefault:
# First script to be executed, if not booting in emergency (-b) mode
si::bootwait:/etc/init.d/boot
# /etc/init.d/rc takes care of runlevel handling
# runlevel 0 is System halt (Do not use this for initdefault!)
# runlevel 1 is Single user mode
# runlevel 2 is Local multiuser without remote network (e.g. NFS)
# runlevel 3 is Full multiuser with network
# runlevel 4 is Not used
# runlevel 5 is Full multiuser with network and xdm
# runlevel 6 is System reboot (Do not use this for initdefault!)
l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
#l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 38 |
# what to do in single-user mode
ls:S:wait:/etc/init.d/rc S
~~:S:respawn:/sbin/sulogin
# what to do when CTRL-ALT-DEL is pressed
ca::ctrlaltdel:/sbin/shutdown -r -t 4 now
# special keyboard request (Alt-UpArrow)
# look into the kbd-0.90 docs for this
kb::kbrequest:/bin/echo
"Keyboard Request -- edit /etc/inittab to let this work."
# what to do when power fails/returns
pf::powerwait:/etc/init.d/powerfail start
pn::powerfailnow:/etc/init.d/powerfail now
#pn::powerfail:/etc/init.d/powerfail now
po::powerokwait:/etc/init.d/powerfail stop
# for ARGO UPS
sh:12345:powerfail:/sbin/shutdown -h now THE POWER IS FAILING
# getty-programs for the normal runlevels
# <id>:<runlevels>:<action>:<process>
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
1:2345:respawn:/sbin/mingetty --noclear tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
....
Dokumentation des Bootvorganges in /etc/init.d/README
Musterfile für Startscript
/etc/init.d/skeleton
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 39 |
Startscripts: aaeventd boot.lvm microcode.ctl rpasswdd acpid boot.md multipathd rpcbind alsasound boot.multipath nagios rpmconfigcheck apache2 boot.open-iscsi network rsyncd arpwatch boot.proc network-remotefs setserial atd boot.rootfsck nfs single auditd boot.sched nscd skeleton autofs boot.scpm ntp skeleton.compat autoyast boot.swap openct smartd avahi-daemon boot.sysctl open-iscsi smolt avahi-dnsconfd boot.udev openvpn smpppd bgpd boot.udev_retry ospf6d spamd bluetooth cron ospfd splash bluetooth-coldplug cups pcscd splash_early boot dbus pm-profiler sshd boot.apparmor dnsmasq postfix stopblktrace boot.blktrace earlysyslog powerd SuSEfirewall2_init boot.cleanup earlyxdm powerfail SuSEfirewall2_setup boot.clock fbset random svnserve boot.crypto gpm raw syslog boot.crypto-early haldaemon rc uuidd boot.cycle halt rc0.d vsftpd boot.d halt.local rc1.d waitfornm boot.device-mapper irda rc2.d xdm boot.dmraid irq_balancer rc3.d xend boot.fuse ivman rc4.d xendomains boot.ipconfig java.binfmt_misc rc5.d xfs boot.klog joystick rc6.d xinetd |
| next | back | 4. Startup und Shutdown | WS 2013/14 - 40 |
boot.ldconfig kbd rcS.d ypbind
boot.loadmodules kexec README zebra
boot.local libvirtd reboot
boot.localfs lirc ripd
boot.localnet mdadmd ripngd
Parallelisierung des Startvorgangs:
Programm:
startpar
Konfigurationsfiles für startpar:
/etc/init.d/.depend.boot
/etc/init.d/.depend.halt
/etc/init.d/.depend.start
/etc/init.d/.depend.stop
enthalten Abhängigkeiten für die Startscripts, so daß diese parallel
gestartet werden können - funktioniert noch nicht in allen Lebenslagen!!??!
Konfiguration über insserv.
Manuelle Abschaltung des parallelen Startens:
/etc/sysconfig/boot
RUN_PARALLEL="no"
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 41 |
Zuordnen eines Dienstes zu einem Runlevel für paralles Starten:
(erstellen von .depend.XXX)
insserv
Konfigurationsfile:
/etc/insserv.conf
Hinzufügen eines neuen RC-Scripts:
insserv /etc/init.d/abc
(/etc/init.d/.depend.XXX-Files neu erzeugen und
Links in /etc/init.d/rc3.d, ... setzen)
Konfigurieren von systemd (Überwachung des neuen Dienstes):
Konfigurationsfile
/etc/systemd/system/abc.service: (Beispiel)
[Unit]
Description=My progname abc
After=syslog.target network.target
[Service]
EnvironmentFile=/etc/sysconfig/abc
ExecStartPre=/etc/sysconfig/abc.pre
ExecStart=/etc/init.d/abc start
[Install]
WantedBy=multi-user.target
Dokumentation: systemd.service
aktivieren:
systemctl enable abc.service
systemctl start abc.service
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 42 |
Regeln für das Verändern von Start-Scripten
===========================================
Hinzufügen von neuen Scripten ist weniger gefährlich als das Modifizieren
von vorhandenen Standardscripten (Seiteneffekte)!!!
1. Prüfen ob für die gewünschte neue Funktionalität schon ein Standardscript
existiert und man nur ein Konfigurationsfile ändern muß.
2. Verändere nie Standardscripte, die für das Initialisieren des Grundsystems
notwendig sind.
3. Füge lieber ein neues Script hinzu.
4. Erzeuge ein neues Script durch Kopiern und Modifizieren eines
Standardscriptes.
Richtlinien für das Schreiben von Boot-Scripten:
- vollständige Pfadnamen benutzen
- Systemzustand berücksichtigen
- Berücksichtigen von allen möglichen und unmöglichen Seiteneffekten
- Abhängigkeiten beachten
- geben sie alle Fehler aus!!!
- schreiben sie viele Kommentare.
Ein Fehler kann in ungünstigen Fällen zum Blockieren des Systems führen
oder zum Öffnen der Systemkonsole für jedermann. Also: Testen, Testen, ...
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 43 |
Herunterfahren von UNIX-Systemen
================================
Netzstecker ziehen ?!!!???!!!
Warum nicht?
1. Eventuell nach dem Einschalten viel Arbeit für den Admin.
2. Prügel der eingeloggten Nutzer für den Admin.
Nur wenn der Rechner brennt.
Bei planmäßigen Wartungsarbeiten:
1. Nutzer mehrere Tage vorher mehrmals informieren
2. Alle eingeloggten Nutzer nochmals mindestens 10 Minuten
vorher informieren.
3. Subsysteme mit den dafür vorgesehenen Kommando herunterfahren.
(Datenbanken, News-Server, FTP-Server,...)
Bei guten Systemen sollte dies automatisch passieren.
Shutdown-Scripte (K-Scripte)
4. Alle Nutzer ausloggen.
5. Plattensynchronisation erzwingen.
6. In den Single-User-Mode wechseln.
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 44 |
Befehle zum Anhalten eines UNIX-Systems
---------------------------------------
init-Befehl: z.B. init 6
telinit 6
bewirket den sofortigen Wechsel in den neuen Systemzustand
halt-Befehl: halt
anhalten des Systems, Rechner bleibt im Bootprompt stehen
poweroff-Befehl: poweroff
anhalten des Systems und ausschalten des Rechners
reboot-Befehl: reboot -- -r
reboot -- -s
reboot
anhalten des Systems und System anschließend wieder neu
booten mit entsprechenden Boot-Optionen
shutdown-Befehl (betriebssystemabhängig):
Linux:
shutdown -h now "sofort anhalten"
shutdown -r now "reboot"
shutdown -r -f now "fast reboot"
Solaris
shutdown -g 600 -i 5 "jetzt ist Schluss"
shutdown -g 600 -i 6 "reboot"
shutdown -g 600 -i s "single-user"
|
| next | back | 4. Startup und Shutdown | WS 2013/14 - 45 |
| |
| back | 4. Startup und Shutdown | WS 2013/14 - 46 |