Donnerstag, 14. Oktober 2010

sendmail mailq leeren

Sendmail - mail queue abarbeiten

sendmail -q -v

AIX Infos

Unter AIX findet man mot folgendem Befehl herraus welche MTU die Karte hat

# lsattr -E -l en0

MAC-Addressen anzeigen lassen

# netstat -ia

Anzeigen welche Packete unter hier im beispiel: TL 5 von AIX 6.1 liegen

# oslevel -r -l 6100-05


Bootfähiges Image einer AIX / VIO erstellen

das file name.vol1 in name.iso umbenennen

mkcd -V rootvg -L -S

-L DVD Images erstellen
-S DVD-Images nicht löschen
-V welche volumegroup


Hardwareinfos

# lscfg -vl fcsX

z.B:

# lscfg -vl fcs1

Microcode

# lsmcode -d cdX

z.B.

# lsmcode -d cd0




bootinfo -y Hardware

bootinfo -K Kernel

Netzwerkarten nach Clone nicht mehr eth0 - was tun ?

Wenn man einen Clone z.B. mit CloneZilla von einer Linux-Maschine macht.
Kommt es vor, dass die Netzwerkarte(n) nicht mehr eth0 (/ eth1) sind sondern eth2 (/ eth3)

Dies lässt sich beheben in dem man in folgender Datei:

/etc/udev/rules.d/??-persistent-net.rules

Die Einträge anpasst, dann hat man wieder z.B. eine eth0 in dem geclonten System.

Automatisches Backup auf eine Netzwerkfreigabe mit CloneZilla

0. Laden des Tools von http://www.pendrivelinux.com/boot-multiple-iso-from-usb-multiboot-usb/

1. Herunterladen der CloneZilla ISO unter: http://clonezilla.org/ (Alternative Version)

2. Herunterladen der Memtest ISO von http://www.memtest.org/

3. USB-Stick einstecken, Tool (MultiBootISOs-X.X.X.X.exe) unter Windows starten
Formatieren des Sticks auswählen und die Memtest Datei.
Und das Programm laufen lassen.

4. ggf. die CloneZilla ISO Datei entpacken mit z.B: 7zip (http://www.7-zip.org/)
in das Verzeichnis clonezilla auf dem USB-Stick

5. anpassen der Datei: menu.lst auf folgenden Inhalt


default 0

timeout 5

color NORMAL HIGHLIGHT HELPTEXT HEADING

splashimage=/splash.xpm.gz

foreground=FFFFFF

background=000000





title Boot Clonezilla (AUTOBACKUP /dev/sda)

find --set-root /clonezilla/live/initrd1.img

kernel /clonezilla/live/vmlinuz1 boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run="/live/image/clonezilla/custom-ocs" ocs_live_extra_param="" ocs_live_keymap="/usr/share/keymaps/i386/qwertz/de-latin1-nodeadkeys.kmap.gz" ocs_live_batch="yes" ocs_lang="en_US.UTF-8" vga=791 nolocales live-media-path=/clonezilla/live

initrd /clonezilla/live/initrd1.img





title Boot Clonezilla (AUTOBACKUP /dev/hda)

find --set-root /clonezilla/live/initrd1.img

kernel /clonezilla/live/vmlinuz1 boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run="/live/image/clonezilla/custom-ocs-hda" ocs_live_extra_param="" ocs_live_keymap="/usr/share/keymaps/i386/qwertz/de-latin1-nodeadkeys.kmap.gz" ocs_live_batch="yes" ocs_lang="en_US.UTF-8" vga=791 nolocales live-media-path=/clonezilla/live

initrd /clonezilla/live/initrd1.img





title Boot Clonezilla

find --set-root /clonezilla/live/initrd1.img

kernel /clonezilla/live/vmlinuz1 boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run='ocs-live-general' ocs_live_extra_param='' ocs_live_keymap='de' ocs_live_batch='no' ocs_lang='en' vga=788 ip=frommedia nosplash live-media-path=/clonezilla/live toram=filesystem.squashfs

initrd /clonezilla/live/initrd1.img





# Suggested by Erhan Sohail

title Boot First Hard Drive (HDD)

map (hd0) (hd1)

map (hd1) (hd0)

map --hook

chainloader (hd0)+1

rootnoverify (hd0)



title Restart

reboot



title Shutdown

halt



6. erstellen der 2 Dateien: custom-ocs und custom-ocs-hda im Verzeichnis clonezilla auf dem USB-Stick

mit folgendem Inhalt:

#!/bin/bash

# Author: Steven Shiau

# License: GPL

# When this script is ready, you can run

# /opt/drbl/sbin/ocs-iso -g en -k NONE -s -m ./custom-ocs

# to create the iso file for CD/DVD. or

# /opt/drbl/sbin/ocs-live-dev -g en -k NONE -s -c -m ./custom-ocs

# to create the zip file for USB flash drive.

# Begin of the scripts:

# Load DRBL setting and functions

if [ ! -f "/opt/drbl/sbin/drbl-conf-functions" ]; then

echo "Unable to find /opt/drbl/sbin/drbl-conf-functions! Program terminated!"

exit 1

fi

. /opt/drbl/sbin/drbl-conf-functions

. /opt/drbl/sbin/ocs-functions

# load the setting for clonezilla live.

[ -e /etc/ocs/ocs-live.conf ] && . /etc/ocs/ocs-live.conf

# Load language files. For English, use "en_US.UTF-8". For Traditional Chinese, use "zh_TW.UTF-8"

ask_and_load_lang_set en_US.UTF-8

# The above is almost necessary, it is recommended to include them in your own custom-ocs.

# From here, you can write your own scripts.

echo "#########################################################################################"

echo "# 1. Configure network"

dhclient

echo "#########################################################################################"

echo "# 2. Mount the clonezilla image home"

mkdir /home/partimag

mount -t cifs -o username=USERNAME,password=PASSWORD //SERVERNAME/SHARE /home/partimag

echo "#######################################after mounting, now showing mounts###########"

mount

echo "#########################################################################################"

echo "# 3. backing up sda"

/opt/drbl/sbin/ocs-sr -b -q -j2 -z1 -i 0 -p reboot savedisk "CLIENTNAME_`date +%H%M%S_%d%m%Y`" "sda"

echo "#########################################################################################"



bzw. die Zeile

/opt/drbl/sbin/ocs-sr -b -q -j2 -z1 -i 0 -p reboot savedisk "CLIENTNAME_`date +%H%M%S_%d%m%Y`" "hda"

in der Datei: custom-ocs-hda anpassen


ACHTUNG: es müssen folgende Zeilen angepasst werden:

mount -t cifs -o username=USERNAME,password=PASSWORD //SERVERNAME/SHARE /home/partimag

ersetzen in z.B.

mount -t cifs -o username=backup,password=backup4client //10.1.1.250/backup /home/partimag


/opt/drbl/sbin/ocs-sr -b -q -j2 -z1 -i 0 -p reboot savedisk "CLIENTNAME_`date +%H%M%S_%d%m%Y`" "sda"

ersetzen in z.B.

/opt/drbl/sbin/ocs-sr -b -q -j2 -z1 -i 0 -p reboot savedisk "CLI01_`date +%H%M%S_%d%m%Y`" "sda"


Das wars....