Hallo Leser, dies ist ein fettes Zusatzpack zu meinem Linux-Crash-Kurs, »«²³€µöäüßÖÄÜ éêèáâà¢çÇÃã ISO 8859-15 ≙Ω•♪♫♦♣♠— ®™© Ý ☺☻ ÞÐ 😉 jetzt: UTF-8‼ Tipp: http://markus-priester.spdns.de/how2installKubuntu12.04PrecisePangolin.txt http://linuxtracker.org/ scp -P 23 markus@markus-priester.spdns.de:/var/www/LinuxCrashKurs/LinuxCrashKursV2.2.txt /mnt/ZaS/JMPsInstallStuff/backUp/ # sichert diese Datei vom Laptop aus sudo zgrep LinuxCrashKursV2.2.txt /var/log/apache2/access.log # wie oft wurde denn dieser UTF-8 codierte Text auf dem neuen Server schon angeschaut Auf welchem System arbeite ich gerade? clear && echo -e `whoami`"@"`hostname`"\n"$(lsb_release -sc); cat /etc/issue.net; read -d . VERSiON < /etc/debian_version; echo -e 'von Debian: '$VERSiON '\n'; cat /etc/redhat-release /etc/lsb-release; echo && lsb_release -a 2>&1 | grep -e Description: -e Codename:;echo && uname -a;echo && dpkg --print-architecture; sleep 9; echo && Xorg -version; echo && konqueror -v; echo && kde4-config --version; echo && konsole --version && echo && gcc --version | grep gcc; echo && grub-install -v; dpkg --list | grep grub; echo && sleep 10 && lscpu && echo && lsusb && echo && lspci && echo && lspci -nnk | grep -i net -A3 && echo && lsblk && echo && sudo hdparm -i /dev/sda && sudo smartctl -H /dev/sda && sudo lshw && sudo dmidecode && sudo dmidecode -s bios-version && sudo dmidecode -s bios-release-date && dpkg -s lsscsi lmsensors hwinfo #--short inxi -Fx echo 'alias getMyIP="wget -O - -q checkip.dyndns.org | cut -c65-91"' >> ~/.bash_aliases # was ist die IP meines Routers? Unix-Befehle für Anfänger: http://nafoku.de/t/unix.htm kdialog --msgbox "KDE Messagebox: Hello\nPush OK 2 disappear." zenity --info --text "GNOME Messagebox: Hello\nPush OK" scrot # für Screenshots sudo apt-get install scrot GNU Kommando -> Debian Paket Zuordnung (z.B. dpkg-buildpackage zu dpkg-dev) easy via http://packages.debian.org Zusammenfassung UNIX/LINUX-Einführungs- und Aufbaukurs www.stockmayer.de/fh/zusammenfassung.pdf viel Informatik Lektüre (Bücher, Englisch, auch online) http://docstore.mik.ua/orelly/index.html Unix Power Tools als komplettes Buch (Auszüge) am Stück https://books.google.de/books?id=tDDb5zRoONwC&printsec=frontcover&hl=de#v=onepage&q&f=false Shell Programmierung (Englisch): www.tldp.org/LDP/Bash-Beginners-Guide/html/index.html Einfuehrung in die Shell-Programmierung (Deutsch) www.linux-services.org/shell while true; do sleep 2; pg fsck | head -n 1; done # pg is an alias 4 ps|grep while true; do date; sleep 900; done d=4; c=0; for a in {13,18,51,117,97,84,88,133,96}; do echo -n $a/$d=; bc <<< $a/$d; c=$[$c+$a/$d]; done; echo gesammt: $c i=0; while [ $i -lt 10 ]; do echo $i; (( i=i+1 )); sleep 1; done # vs i=$[$i+1]; & i=`bc <<< $i+1`; Advanced Bash-Scripting Guide Manipulating Variables http://tldp.org/LDP/abs/html/string-manipulation.html Shell-Programmierung von Jürgen Wolf http://openbook.galileo-press.de/shell_programmierung/shell_004_002.htm Advanced Bash-Scripting Guide 9.2. Manipulating Strings http://www.linuxtopia.org/online_books/advanced_bash_scripting_guide/string-manipulation.html Order Of Redirection "> file 2>&1" vs. "2>&1 >file" wiki.bash-hackers.org/howto/redirection_tutorial#order_of_redirection_ie_file_2_1_vs_2_1_file Regulärer Ausdruck Wikipedia https://de.wikipedia.org/wiki/Regulärer_Ausdruck Tutorial Reguläre Ausdrücke https://www.danielfett.de/internet-und-opensource,artikel,regulaere-ausdruecke Unix Sed Tips and Tricks http://www.thegeekstuff.com/tag/sed-tips-and-tricks/ Eine Einführung in sed https://www.tty1.net/sed-tutorium_de.html Der Stream-Editor Sed (top) https://www.ostc.de/sed.pdf Suche & Ersetze über Verzeichnisebenen: »grep -ilr 'old-string' * | xargs -i@ sed -i 's/old-string/new-string/g' @« www.marook-online.de/index.php/topic,91.html grep -ilr 'mailto' /var/www/html/ # Dateien mit eMail-Adressen auflisten grep -ir 'mailto' /var/www/html/ # eMail-Adress Auszug der betroffenen Dateien find /var/www/html/ -type f -name "*.[s]ht*" -exec sed -i -e 's!mailto:m.priester@gmx.de!mailto:M.Priester@gmx.de!g' {} \; # das funtzt rekursiv 4 *.[s]htm[l] md5sum /mnt/USBstick/Office_*/*.* | tee -a /mnt/USBstick/Office_md5sums.txt sed 's/\/mnt\/USBstick\///g' /mnt/USBstick/Office_md5sums.txt > /mnt/USBstick/Office_md5sums4diff.txt sed 's/\/data1\/Download\/JDownloader\///g' Office_md5sums.txt > Office_md5sums4diff.txt sha1sum Vergleich gegen vorhandene Prüfsummen-Datei root@FireFauch:/data1/Downloads/X-Plane/XP10# sha1sum -c sha1sums.txt Ein etwas anderer MD5# Vergleich: sed -i 's/suche/ersetze/g' Datei vs md5sum -c md5sum.txt z.B. /media/markus/Debian 8.2.0 amd64 1$ md5sum --quiet -c md5sum.txt tail -n29 md5sums.txt > X-Plane.md5 && sed -i 's/X-Plane\///g' X-Plane.md5 head -n29 FlugSim/X-Plane/X-Plane_source-2ndTry.md5 > X-Plane_Fauch.md5 scp -P 23 markus@markus-priester.spdns.de:/data1/Download/JDownloader/X-Plane_Fauch.md5 . diff X-Plane.md5 X-Plane_Fauch.md5 md5deep, hashdeep & sha1deep not 4 FreeBSD http://md5deep.sourceforge.net/ https://www.effinger.org/blog/2008/11/01/rekursiv-md5-hash-fur-dateien-erzeugen/ create md5 hash from a recursive dir with white spaces find /root/newdir -type f -exec md5 {} + # If your find doesn't support -exec ? {} +, replace the + by \; http://unix.stackexchange.com/questions/23988/create-md5-hash-from-a-recursive-file-listing-when-some-paths-have-spaces find ./dir -type f -print0 | xargs -0 md5sum > /checksums.md5 # http://info.michael-simons.eu/2008/10/25/recursively-md5sum-all-files-in-a-directory-tree/ find überVerzeichnis -type f -exec md5sum {} >> chksum.md5 \; # wohl beste Rekursive md5Hash Berechnung find . -type f -exec md5sum {} >> chksumZaS.md5 \; # generate MD5sums 4 whole ZaS sed -i 's/JMPsInstallStuff/installStuff/g' chksumZaS.md5 sed -i '/.\/installStuff\/Dad\//d' chksumZaS.md5 # now improved: sed -i '/\.\/installStuff\/backUp\//d' chksumZaS.md5 # -> del line with: backUp [mod 4 CopyShop Dad infos Treiber ZaS-cloner] dir=Entenkücken; find $dir/ -type f -exec md5sum {} >> $dir.md5 \;; grep .directory $dir.md5; sed -i '/^[[:xdigit:]]\{32\}\ \ .*\/\.directory/d' $dir.md5; #cp -a $dir/ $trgt/ # berechnet rekursiv alle md5Hashe & entfernt Zeilen mit .directory sed -i '/^[a-zA-Z0-9]\{32\}\ \ .*\/\.directory/d' Entenkücken.md5; md5sum -c Entenkücken.md5; echo 'in short'; md5sum -c --quiet Entenkücken.md5 # alternative Hex. (md5hash) Detektion sowie Vergleiche cd ~/Bilder; dir=Eltern; trgt='/mnt/EigeneDaten/EigeneDateien/Bilder/Digital Foto'; find $dir/ -type f -exec md5sum {} >> $dir.md5 \;; grep .directory $dir.md5; sed -i '/^[[:xdigit:]]\{32\}\ \ .*\/\.directory/d' $dir.md5; cp -a $dir/ "$trgt"/; cp $dir.md5 "$trgt"/; cd "$trgt"/; md5sum -c $dir.md5; echo 'in short:'; md5sum -c --quiet $dir.md5 # Ordnersicherung inkl. Pfüfung http://www.unixboard.de/threads/mit-sed-zeichen-aus-zeilen-loeschen-cygwin.29004/ sed 's/.//g' datei1 > dateineu # um . zu ersetzen = falsch -> so: entweder escapen s/\.//g oder als Zeichenklasse definieren: s/[.]//g sonst bedeted . jedes beliebige Zeichen HD md5 check: awk '{print $3}' /home/markus/chksumZaB_2-Spiele.md5 | sort > chksumZaB_2-Spiele_sorted.md5 # bad idea, use: sort -k2 ~/chksumZaB_2-Spiele.md5 > ~/chksumZaB_2-Spiele_sorted.md5 # erstmal beide Listen nach Dateinamen sortieren sort -k2 /mnt/JMPsStorageXL/2-Spiele/chksumStor_2-Spiele.md5 > ~/chksumStor_2-Spiele_sorted.md5 diff ~/chksumZaB_2-Spiele_sorted.md5 ~/chksumStor_2-Spiele_sorted.md5 > ~/chksumStor_2-Spiele_missing.md5 # Unterschiede ausarbeiten sed -i 's/^\(.\{36\}\)//g' chksumStor_2-Spiele_missing.md5 # löscht die ersten 36 Zeichen \(.\{36\}\) je Zeile sed -i 's/^<\ \(.\{32\}\)\ \ //g' chksumStor_2-Spiele_missing.md5 # perfekt um die ersten "< (+32) " Zeichen zu löschen sed -i '/^[0-9]\{1,\},\{0,1\}[0-9]*.[0-9]*/d' ~/chksumStor_2-Spiele_missing.md5 # löscht alle Zeilen die mit Ziffer Anfangen gefolgt von , & weiteren Ziffern sowie einem Buchstaben und abschließenden Ziffern http://sed.sourceforge.net/sed1line_de.html cd /mnt/JMPsStorageXL/2-Spiele/ && while read line; do ls -la "$line"; done <~/chksumStor_2-Spiele_missing.md5 # nice test 4: markus@Zauberkasten:/mnt/JMPsStorageXL/2-Spiele$ while read line; do md5sum "$line" >> chksumStor_2-Spiele.md5; done <~/chksumStor_2-Spiele_missing.md5 # 2 check those which missed the day bevore grep "\-\-\-" -B3 -A3 ~/chksumStor_2-Spiele_missing.md5 cat /proc/acpi/thermal_zone/THRM/temperature # CPU Temperatur auslesen unter Kubuntu 8 http://askubuntu.com/questions/15832/how-do-i-get-the-cpu-temperature cat /sys/class/thermal/thermal_zone0/temp # CPU Temperatur auslesen unter Kubuntu 14 sudo sh -c "fdisk -l; gdisk -l /dev/sda; parted -l; partprobe -ds; lsblk -o NAME,UUID,FSTYPE,SIZE,LABEL,MOUNTPOINT; gparted; efibootmgr -v; blkid; udisks" ssh -X -p 23 markus@markus-priester.spdns.de -t "hostname; ls -la /data1/Downloads/FileName.rar*" # nur Kommando per ssh ausführen, ohne -t kein Connection to Servername closed. (Wie auch mit: -o LogLevel=QUIET) UEFI (Unified Extensible Firmware Interface) statt BIOS http://wiki.ubuntuusers.de/EFI_Grundlagen [ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD" GPT statt MBR http://de.wikipedia.org/wiki/GUID_Partition_Table man parted # Use GNU Parted 4 GPT (GUID Partition Table, (Globally Unique Identifier)) gdisk /dev/sda # sudo apt-get install gdisk e2label /dev/sda2 Kubuntu14 # nachträglich ext4 Partition umbenennen mkfs.vfat -cv -n X-Mas20144RH /dev/sdc1 # 64GB SD Karte so formatieren, dass sie später nicht alle Daten schrottet mkfs.vfat -cv -n DataTrasport /dev/sdb1 2>&1 | tee DataTrasport.errors # -c Check the device for bad blocks before creating the filesystem mkfs.ext4 -ccv -L Kubuntu14 /dev/mmcblk0p1 # -cc intensive read-write test badblocks -b 4096 -X -s -w /dev/mmcblk0p1 6860287 # -b block-size in bytes -X Internal flag used by mke2fs -s progress of scan -w write-mode test http://www.howtogeek.com/howto/37659/the-beginners-guide-to-linux-disk-utilities/ dpkg -s gnome-disk-utility # 4 running palimpsest badblocks -v /dev/sda6 badblocks /dev/sda > /root/bad-blocks_sda # Folgekommando: »fsck -l /root/bad-blocks_sda /dev/sda« badblocks -v -w -t random -c 512 /dev/sda6 badblocks -w -t random /dev/sda6 > /root/bad-blocks_sda6_afterReformat # && »fsck -l /root/bad-blocks_sda6_afterReformat /dev/sda6« badblocks -v -w -c 2048 /dev/sdb1 # -n Use non-destructive read-write mode. besser: -w Use write-mode test badblocks -v -c 8192 -s -w /dev/sdb1 -o neXtZaS.badblocks blkid /dev/sda6 && tune2fs -l /dev/sda6 | grep UUID fsck.ext3 -vcc /dev/sda3 # inkl. badblocks -n -c 2048 /dev/sda3 sudo dumpe2fs -b /dev/sda3 && sudo tune2fs -l /dev/sda3 && fsck.ext3 -vy /dev/sda3 man ntfsprogs ntfs-3g # attr smartctl -a /dev/sdb1 # sudo apt-get install smartmontools http://radagast.ca/linux/how-to-find-the-ntfs-filename-associated-with-a-bad-block-using-linux.html http://www.linuxquestions.org/questions/linux-hardware-18/resetting-ntfs-bad-sectors-list-with-ntfstruncate-492114/ ntfsinfo -i 8 /dev/sdb1 | grep -e \$Bad -e \$BadClus -e 'Allocated size' https://katyscode.wordpress.com/2007/04/16/ntfs-bad-sectors-resolution-the-badclus-metafile/ dmesg -T | grep 'I/O error' aus /mnt/EigeneDaten/EigeneDateien/Texte/Linux/swap_file_on_NTFS_partition.txt filefrag -v /mnt/ZaS/_ISO/UTILITIES/AcronisTrueImage2015_de-DE.iso # vs /mnt/Windows7/swap4Kubuntu mount examples: MP=/mnt/ZaK; sudo sh -c "[ -d $MP ] || mkdir $MP && mount -o uid=`id -un`,gid=`id -un` /dev/sdb1 $MP" # ZaK mount für Kubuntu Live Session FAT32: mount -t vfat /dev/sdb1 /mnt/USBstick/ # aka /media/VOLKSWAGEN sudo mount -t vfat -o uid=markus,gid=markus /dev/sdb1 /mnt/ZaS vfat mit Win8 Charset einbinden, inkl. Eintrag in /etc/fstab # mount -t vfat -o uid=markus,iocharset=utf8 /dev/sda6 /mnt/EigeneDaten UUID=4DEC-AA73 /mnt/EigeneDaten vfat rw,uid=markus,gid=markus,iocharset=utf8 0 0 mount -o remount,rw /cdrom how2 Mount WubiDisk mount -o loop /mnt/C/ubuntu/disks/root.disk /linux how2 Mount exFAT: http://stackoverflow.com/questions/6537878/how-to-mount-a-exfat-partition-in-ubuntu-11-04 add-apt-repository ppa:relan/exfat && apt-get update apt-get install fuse-exfat mount -t exfat /dev/sdd1 /mnt/USBHD/ NTFS: mount -t ntfs-3g -o umask=002,uid=markus,gid=markus /dev/sdb1 /mnt/JMPsHDDRIVE2GO 4 /etc/fstab # mount -t ntfs -o rw,noexec,nosuid,nodev,default_permissions,uid=markus,gid=markus /dev/sda9 /mnt/EigeneDaten/ # sudo blkid /dev/sda9 -> LABEL="EigeneDaten" UUID="14724005723FEA5E" TYPE="ntfs" UUID=14724005723FEA5E /mnt/EigeneDaten/ ntfs rw,uid=markus,gid=markus 0 0 fsck.ntfs => ntfsfix (in package ntfsprogs) mount -t ntfs-3g -o remove_hiberfile /dev/sda5 /media/xyz # oder # ntfs-3g -o remove_hiberfile /dev/sda5 /mnt/Win/ nano /etc/fstab mount.ntfs --help # man ntfs-3g # umount /mnt/USB-HD && mount -t ntfs -o nls=utf8 /dev/sdb1 /mnt/USB-HD # cp1252 cp850 IBM850 latin1 iso8859-15 utf-8 utf8 # less /usr/share/i18n/SUPPORTED # http://www.edvler-blog.de/locales-unter-ubuntu-einrichten/ # locale -a && echo && cat /var/lib/locales/supported.d/de && echo && cat /etc/default/locale /dev/sdb1 /mnt/USB-HD ntfs-3g defaults,locale=de_DE.ISO-8859-15,umask=007,gid=46 0 1 # brint auch nix root@Zauberkasten:~# ntfs-3g -o locale=de_DE.ISO-8859-15 /dev/sdb1 /mnt/USB-HD Invalid locale, encoding to UTF-8 ntfs-3g -o locale=de_DE.utf8 /dev/sdb1 /mnt/USB-HD # tut, wie auch: locale=de_DE.utf-8 locale=de_DE.UTF-8 Netzwerkfreigaben: nfs mount.nfs remotetarget dir [-rvVwfnsih] [-o nfsoptions] z.B. mount.nfs 192.168.2.103:/data1 /mnt/server/ nfs Exportieren?: apt-get install nfs-kernel-server > nano /etc/exports > /etc/init.d/nfs-kernel-server restart https://help.ubuntu.com/12.04/serverguide/network-file-system.html nfs Importieren (mounten): apt-get install nfs-common ifconfig wlan0 down && ifconfig eth0 up && ifconfig eth0 172.16.0.1 netmask 255.255.0.0 && ifconfig && sleep 3 && mount.nfs 172.16.0.2:/mnt/JMPsHDDRIVE2GO /mnt/Zauberkasten W-Lan sowie Subnetz via crossover Patchkabel mit zweitem Pc root@Zauberkasten:~# ifconfig eth1 169.254.43.131 netmask 255.255.0.0 && ifconfig eth1 up && ifconfig && sleep 2 && ping -c 5 169.254.43.130 root@Dragon:~# ifconfig eth0 169.254.43.130 netmask 255.255.0.0 && ifconfig eth0 up && ifconfig && sleep 2 && ping -c 5 169.254.43.131 mount.nfs 169.254.43.131:/mnt/JMPsHDDRIVE2GO /mnt/Zauberkasten mount -t cifs -o username=markus,password=geheim //169.254.43.131/Musik /mnt/Zauberkasten/samba NFS: locale && echo LC_ALL=$LC_ALL && echo LANG=$LANG # See locale(1) for more info. Are you using ntfs, vfat file system under nfs server? If so set mount option to utf8. root@ubuntu:~# cat /etc/fstab && l /mnt/Musik_via_SAMBA/*.txt /mnt/Musik_at_Fauch/*.txt # NFS Umlaute besser, wenn Terminal auf UTF-8 und Umlaute mit Unicode erzeugt (nicht normal!) bzw wenn Terminal auf ISO-8859-15 und Namen mit Tab "getippt" # mount.nfs 192.168.2.103:/data1/Musik /mnt/Musik_at_Fauch # g9a:/mukke /mnt/g9a/mp3 nfs ro,auto,user,hard,intr 0 0 192.168.2.103:/data1/Musik /mnt/Musik_at_Fauch nfs ro,auto,user,hard,intr 0 0 SAMBA wichtig, dass unter Windoof auch die Umlaute korrekt dargestellt werden müssen folgende 2 Zeilen in die /etc/samba/smb.conf eingetragen werden. unix charset = ISO-8859-15 dos charset = 850 dass die Umlaute auch per ssh korrekt angezeigt werden, könnte hier ebenso gelöst sein: http://forum.ubuntuusers.de/topic/samba-und-ssh-umlaute/?highlight=x#post-1719429 anschließend: >p | grep mb && sudo /etc/init.d/samba stop && sleep 1 && p | grep mb && sudo /etc/init.d/samba start && sleep 1 && p | grep mb< ausführen. setze in /etc/samba/smb.conf unter [global] die Optionen "codepage=850" und "unix charset = iso8859-15" http://debianforum.de/forum/viewtopic.php?f=13&t=131989 samba alt: http://wiki.ubuntuusers.de/Archiv/Samba_Client_smbfs?redirect=no sudo mount -t smbfs -o username=,password= /// sudo mount -t smbfs -o username=otto,password=geheim //compaq/share /media/austausch Um sich auf eine Freigabe in einer Windowsdomäne zu verbinden, muss der Domänenname mit angegeben werden: sudo mount -t smbfs -o username=/,password= /// sudo mount -t smbfs -o username=otto/office,password=geheim //compaq/share /media/austausch neu (ab 8.04 Hardy Heron): http://wiki.ubuntuusers.de/samba_client_cifs sudo mount -t cifs -o ///Freigabe sudo mount -t cifs -o credentials=~/.smbcredentials //192.168.1.100/Tausch /media/austausch mount -t cifs -o username=markus,password=geheim -o iocharset=utf8 //192.168.2.103/Musik /mnt/Fauch/Musik l /mnt/Fauch/Musik/AntiDepressiva/D.ö.F.\ Codo.mp3 # SAMBA via iocharset=utf8 eingebunden UND Terminal auf UTF-8 # SAMBA iso8859-15 codierte Umlaute gut, wenn Terminal auf UTF-8, scheiße wenn auf ISO-8859-15 # echo "mount.cifs -o username=Helmut,password=GeHeIm //192.168.2.103/Musik /mnt/Musik_via_SAMBA" # SuSE: mount.cifs //192.168.2.103/Musik /mnt/Musik_via_SAMBA -o username=Helmut,password=geheim,iocharset=utf8 # Lapi: mount -t cifs -o user=Helmut,pass=geheimni -o iocharset=iso8859-15 //192.168.2.103/Musik /mnt/Musik_via_SAMBA # mount -t cifs -o username=Helmut,password=gheim -o iocharset=cp850 //192.168.2.103/Musik /mnt/Musik_via_SAMBA # Lappy mount -t cifs -o username=Helmut,password=geheim -o iocharset=utf8 //192.168.2.103/Musik /mnt/Musik_via_SAMBA # tut: cp866 -mit utf8 und's Terminal auch auf unicode sieht's gut aus !! tut net: cp473 //192.168.2.103/Musik /mnt/Musik_via_SAMBA cifs username=Helmut,password=gEhEiM,iocharset=utf8 0 0 konqueror smb://192.168.2.105/ & # Download anklicken und mit Name und PassWD autentizieren (erscheint sofort hinter dem Konqueror Fenster) nload - realtime console network usage monitor rechnera$ nc -l -p 12345 >/dev/null rechnerb$ pv > text/plain; charset=utf-8 Verhunzte Dateinamen von Windows lassen sich z.B. mit convmv gut "reparieren". apt-get install convmv http://linuxwiki.de/convmv www.j3e.de/linux/convmv/man/ aus http://computer.wer-weiss-was.de/linux/dateinamen_-_zeichensatz_codierung_herausfinde-4589292.html convmv -f iso-8859-15 -t utf8 /mnt/USB-HD/4-Musik/AntiDepressiva/D.?.F.\ _\ Codo.mp3 # hilft net wirklich l /mnt/USB-HD/4-Musik/AntiDepressiva/D* | iconv -f iso8859-15 # fast while [ ! -f "$incFile" ]; do ls -la "$incFile".part; sleep 600; done; echo "File "$incFile" now fully loaded" sleep 3600 && rar t Urmel.part01.rar -pFilmspass # t Test vs x 4 eXtrakt -pPASSWD ohne Lücke Dateinamen umbenennen: http://www.barmasse.org/linux/kommandozeile/rename.html l 1* && echo && rename 's/\ -\ Tim\ und\ Struppi\.pdf/.pdf/g' *.pdf && l 1* for x in *.tif; do mv $x ${x/musterA/musterB}; done; # alternativen um mehrere Dateien umzubenennen sed -i 's//' // # eine Datei umbenennen find // -type f -exec sed -i 's///g' {} \; # alternative um mehrere Dateien umzubenennen rename "s/[0-9]{2}\ /$&-\ /g" *.mp3 # "12 Song.mp3" -> "12 - Song.mp3" etc. http://askubuntu.com/questions/187477/how-to-rename-files-with-count rename "s/^[0-9]{2}\ /$&-\ /g" *.mp3 # 4 leading Numbers only http://stackoverflow.com/questions/1132948/s-0-9-2-will-not-rename-files for i in ?.mp3; do mv $i 0$i; done # 1.mp3 -> 01.mp3 etc. md5sum */*.avi 2>&1 | tee -a /data1/Download/JDownloader/Filme/XMas14-Filme_source.md5 markus@Zauberkasten:/mnt/JMPsStorage/5-Bücher/Comix$ md5sum -c /media/X-Mas20144R/Comix/ComixR.md5 */* # checkt jede Datei mit OK auf's Terminal, --quiet ohne OK for i in .devilspie/*; do diff -s $i /mnt/ZaS/JMPsInstStuff/backUp/DualHead/$i; echo; done for i in .devilspie/*; do diff -q $i /mnt/oldLinux/home/markus/$i; done markus@Zauberkasten:/mnt/JMPsStorage/5-Bücher/Comix/Alfred J. Kwak_def$ scp -P 23 'markus-priester.spdns.de:"/data1/Download/JDownloader/Comix/Alfred J. Kwak/01 - Die seltsamen Abenteuer der Ente Alfred Jodocus Kwak.cbr"' . markus@Zauberkasten:~$ scp -P 23 'markus-priester.spdns.de:"/data1/Download/JDownloader/Filme/Heinz Rühmann/Heinz Rühmann - Der Pauker 1958.avi"' ~ # lokales Terminal auf ISO 8859-15 lokale vfat USB-HD & USB-HD bzw. Ordner Heinz Rühmann wg. Umlaut (noch) nicht direkt erreichbar scp -rP 23 'markus-priester.spdns.de:"/data1/Musik/chill out/Space Night/Space Night Vol. X"*' /mnt/JMPsStorage/4-Musik/chill\ out/Space\ Night/ # kopiert mehrere Verzeichnisse, hat aber noch Probleme mit Sonderzeichen wenn über div. Dateisysteme sowie Terminal Kodierungen hinweg Auflösung von vielen Bildern / Fotos konvertieren: date; mogrify -resize 640x359 *.jpg; date # 4160x2336 ➔ 640x359 smartphones date; mogrify -resize 1335x750 *.jpg; date # 4160x2336 ➔ 1335x750 OK @ LG TV 32LS350S-ZA (native: 1360 x 768) date; mogrify -resize 1432x804 *.jpg; date # 4160x2336 ➔ 1432x804 passt gerade noch in's Laptop Browserfenster date; mogrify -resize 1653x928 *.jpg; date # 4160x2336 ➔ OK 4 Server Monitor 1680×1050 px date; mogrify -resize 1895x1064 *.jpg; date # 4160x2336 ➔ 1895x1064 passt genau im Full HD Browser * Kurzanleitung zur Einstellung der Zeit unter Linux l /data1/EigeneDateien/zuSortiern/vonGecrashterUSBDisk/Linux\ stuff/LinuxZeitEinstellen.html netcat time.nist.gov 13 && date # use packet apt-cache search ntp | grep ntp ln -sf /usr/share/zoneinfo/CET /etc/localtime; && date -s "Oct 13, 1999 14:04:05"; && hwclock -w ln -sf /usr/share/zoneinfo/CET /etc/localtime && date -s "Mar 15, 2013 17:35:45" && hwclock -w ls -la /etc/localtime /usr/share/zoneinfo/CET && ln -sf /usr/share/zoneinfo/CET /etc/localtime # + evtl. # && date -s "Mar 15, 2013 17:35:45" && hwclock -w http://wiki.ubuntuusers.de/Systemzeit?highlight=uhrzeit#Falsche-Uhrzeit-bei-Windows-Linux-Parallelinstallation sudo nano /etc/default/rcS # enter: UTC=no zusätzlich rechtsklick auf KDE-Taskleisten-Uhr > Einstellungen für "Digitale Uhr" > Kalender\Deutschland,Deutschland: Informationen evtl. auch: Zeitzonen\Berlin statt UTC Voreinstellungen für die Uhr: kann auf Ortszeit belassen werden http://wiki.ubuntuusers.de/Systemzeit date && ntpdate -u ntp.ubuntu.com && date unterschied von useradd und adduser useradd (LinuxCrashKurs S.12) => neuen Benutzer anlegen useradd -G {group-name} username http://www.cyberciti.biz/faq/howto-linux-add-user-to-group/ useradd -m GNUser -s /bin/bash # -m --create-home (Dir) -s --shell passwd GNUser smbpasswd -a GNUser # add user (& his passwd) smbpasswd -e GNUser # enable user adduser => einer bestehenden Gruppe einen existierenden Benutzer hinzufügen Add a system group http://debiananwenderhandbuch.de/benutzerverw.html adduser --group [--gid ID] group addgroup [--gid ID] group Add an existing user to an existing group adduser user group vixie-crond ein alter Standard holt verpasste Jobs nicht nach, wie z.B. fcron oder anacron das tut. Weitere Alternativen: cronie l /etc/crontab /var/spool/cron/crontabs/* /etc/cron.daily/* l /etc/cron.d/anacron /etc/anacrontab /usr/lib/pm-utils/power.d/anacron dpkg -s anacron # > cat /etc/init/anacron.conf | grep start && man anacron && less /usr/share/doc/anacron/README.gz l /etc/init.d/anacron && cat /lib/init/upstart-job echo "manual" | sudo tee /etc/init/anacron.override l /etc/pm/sleep.d /etc/pm/power.d /usr/share/doc/pm-utils/HOWTO.hooks # http://wiki.ubuntuusers.de/pm-utils#pm-utils-Hooks sudo initctl reload-configuration # anstatt Neustart, nach Änderungen an /etc/init/anacron.conf wiki.ubuntuusers.de/Upstart#Deaktivieren-von-Init-Jobs sudo update-rc.d -f anacron remove # http://forum.ubuntuusers.de/topic/anacron-abstellen-nervt Mein Tipp für root crontab -e 00 04 * * Sun-Sat [ `date +\%H\%M` -eq 0400 -a -f $TVRec ] && /usr/sbin/rtcwake -l -m disk -t $(date -d '9:30' +\%s) # 4 Uhr notshutdown & wakeUp 9:30 für verpennte IT'ler Dualview auf ViewSonic VA2012w running 1680x1050 http://wiki.ubuntuusers.de/Dualview http://wiki.ubuntuusers.de/RandR xrandr # returns resolution of all connected Monitors using libxrandr2 xrandr --auto # switch on turned off Monitor @ CRT1=VGA (LVDS = Laptop interner Monitor, DFP1=DVI (Digital Visual Interface) PC => TVs HDMI Buchse (High Definition Multimedia Interface) xrandr --output CRT1 --auto --left-of LVDS xrandr: screen cannot be larger than 1680x1680 (desired size 2880x900) cvt 1680 1050 60 xrandr --newmode "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync xrandr --addmode CRT1 "1680x1050_60.00" l /var/log/Xorg.0.log /etc/X11/xorg.conf xrandr --output CRT1 --mode "1680x1050_60.00" --left-of LVDS xrandr: screen cannot be larger than 1680x1680 (desired size 3120x1050) arandr # sudo apt-get install arandr ValueError: invalid literal for int() with base 10: '1050_60.00' lsmod | grep radeon; echo && lsmod | grep fglrx; echo && lsmod | grep vesa; echo && lsmod | grep video dpkg --purge fglrx-amdcccle fglrx-dev fglrx radeon driver doesn't support dualHead via Klikie-Buntie in KDE or GNOME at all but has nice Virtual Konsoles (Text-Terminals Strg+F1) apt-get install fglrx apt-get install fglrx-updates # fglrx-amdcccle brachte nur einen Zusammenbruch der GUI cd /usr/src/ATI-Treiber && dpkg -i fglrx_8.970-0ubuntu1_amd64.deb fglrx-amdcccle_8.970-0ubuntu1_amd64.deb fglrx-dev_8.970-0ubuntu1_amd64.deb amdcccle & sudo aticonfig --initial=dual-head --screen-layout=left amdconfig --initial=dual-head --mode2=1680x1050 --screen-layout=left --xinerama=on # nice dualview auch nach reboot Noch viele weitere Tipps zu http://de.wikipedia.org/wiki/Ubuntu hier wie man von FauchPortable:~# head -n 13 /etc/apt/sources.list # u'r mirror: ftp://ftp.uni-erlangen.de/pub/mirrors/ubuntu/ # da original http://de.archive.ubuntu.com/ubuntu/ # Tipp: »sudo do-release-upgrade« is better than »apt-get dist-upgrade« which ist better than »apt-get upgrade« afterchanging the Ubunut-Version in this file and a »apt-get update« oder einfach »update-manager -d« # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to newer versions of the distribution. # The 64-Bit GNU/Linux System itself #deb cdrom:[Kubuntu 8.10 _Intrepid Ibex_ - Release amd64 (20081029.1)]/ jaunty main restricted # now using: Ubuntu 9.04 Jaunty Jackalope # file:/ http://wiki.ubuntuusers.de/eigene_Paketquelle_anlegen#Einbindung-in-das-System http://www.debian.org/doc/manuals/apt-howto/ch-basico.de.html #deb http://de.archive.ubuntu.com/ubuntu/ jaunty main restricted deb ftp://ftp.uni-erlangen.de/pub/mirrors/ubuntu/ jaunty main restricted deb-src ftp://ftp.uni-erlangen.de/pub/mirrors/ubuntu/ jaunty main restricted von meinem nicht mehr unterstützten Ubuntu 9.04 auf eine aktuelles updaten kann .. hauptsächlich empfehlen sie eine neuinstallation und backups ;) General Upgrade Information https://help.ubuntu.com/community/UpgradeNotes#Ubuntu_9.04_.28Jaunty_Jackalope.29 EOLUpgrades https://help.ubuntu.com/community/EOLUpgrades Updating ubuntu 7.04 to 7.10 Error Need Help. https://answers.launchpad.net/ubuntu/+source/update-manager/+question/62184 EOLUpgradesJaunty https://help.ubuntu.com/community/EOLUpgrades/Jaunty Skipping intermediate Ubuntu OS upgrade to latest one,How do I upgrade from 9.04 to 10.04.2? http://askubuntu.com/questions/47807/skipping-intermediate-ubuntu-os-upgrade-to-latest-one-how-do-i-upgrade-from-9-04 Wake-on-LAN (WOL using etherwake besser powerwake) aktiviere WoL mittels: >ethtool -s eth0 wol g< http://www.cyberciti.biz/tips/linux-send-wake-on-lan-wol-magic-packets.html powerwake 00:c0:f0:81:3f:3a # sendet das Magic Packet für WoL & schaltet damit im lokalen Netzwerk Priester EDK den Fauch zuverlässig ein powerwake 1c:b7:2c:b1:ba:ed # wakeUp call 4 the new FireFauch 192.168.2.100 @ EHPnet powerwake 18:d6:c7:02:12:a4 # wakeUp call 4 the new FireFauch 192.168.2.102 with ext. LAN card @ EHPnet apt-get install etherwake # sudo aptitude install etherwake wakeonlan 00:c0:f0:81:3f:3a # vs sudo etherwake 00:c0:f0:81:3f:3a Aufwachen aus Standby für vorprogrammierte Video-Aufnahmen /sys/class/rtc/rtc0/wakealam http://www.xbmcnerds.com/index.php?page=Thread&threadID=24008 http://www.vdr-portal.de/ Linux zum Fernsehen und als Videorecorder mit MythTV oder VDR und ACPI Wakeup http://www.spurtikus.de/computer/linux_tv_vcr.html sehr ausführliches ACPI-WakeUp ebenfalls mittels /sys/class/rtc/rtc0/wakealarm http://www.mythtv.org/wiki/ACPI_Wakeup cat /etc/init/hwclock-save.conf /proc/acpi/alarm cat /proc/driver/rtc /proc/acpi/wakeup /proc/acpi/battery/BAT0/alarm /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/PNP0C0A:00/power_supply/BAT0/alarm l /usr/lib/pm-utils/sleep.d/90clock /usr/lib/pm-utils/power.d/ /sys/class/rtc/rtc0 /sys/devices/pnp0/00\:02/rtc/rtc0/ http://www.vdr-portal.de/board18-vdr-hardware/board9-nvram-acpi-wakeup/100206-acpi-wakeup-unter-ubuntu-10-04-wie-geht%C2%B4s-richtig/ http://forum.ubuntuusers.de/topic/acpi-wakeup-in-ubuntu-12-0-4-einrichten/#post-5288007 http://wiki.xbmc.org/index.php?title=HOW-TO:Suspend_and_wake_in_Ubuntu dpkg -s policykit-1 upower acpi-support | grep -e Package: -e Status: http://wiki.ubuntuusers.de/rtcwake date && rtcwake -l -m disk -t `date '+%s' -d '+ 5 minutes'` && cat /proc/driver/rtc | head -n 4 # sleep 5 min 2 HD, then wakeUp rtcwake -l -m no -t `date '+%s' -d '+ 5 minutes'` && pm-hibernate # tut nicht, geht zwar aus, aber nicht an rtcwake -l -m disk -t `date '+%s' -d '+ 5 minutes'` # works if additional ShutDown via Alt + Drucken + R E I S U O, startet auch das Image rtcwake -l -m off -t $(date -d '20130830 17:58' +%s) # works fine, but does a new boot date && rtcwake -l -m off -t $(date -d '20:09' +%s) # shutdown now & wakeUp today @ 20:09 rtcwake -l -m off -t $(date -d '+ 1 day 20:09' +%s) # shutdown now & wakeUp tomorrow @ 20:09 23 20 * * Sun-Sat /usr/sbin/rtcwake -l -m off -t $(date -d '+ 1 day 20:09' +\%s) # shutdown now & wakeUp tomorrow @ 20:09 (4 crontab) ifconfig wlan1 && modprobe -r ath9k && ifconfig wlan1; sleep 3 && rtcwake -l -m disk -t $(date -d 15:07 +%s) && cat /proc/driver/rtc | head -n 4 && modprobe ath9k && sleep 2 && ifconfig wlan1 && sleep 10 && ifconfig wlan1 && sleep 3 && ping -c 4 jmp.co.at # works 4 ASUS X56K Notebook (but just one time after a (or 2) proper shutdown, then the grub counter doesn't count down) ifconfig wlan1 && sleep 1 && ifconfig wlan1 down && sleep 2 && ifconfig wlan1; sleep 2 && rtcwake -l -m disk -t $(date -d 15:23 +%s) && cat /proc/driver/rtc | head -n 4 && ifconfig wlan1 up && sleep 10 && ifconfig wlan1 && sleep 5 && ping -c 4 jmp.co.at # new test mit 2 vorangegangenen reboots und 1x shutdown sowie vlc korrekt beendet OK diesmal hat's funktioniert, korrekt abgeschaltet, eingeschaltet mit countdown und Linux-image start, dann aber fehler bei ifconfig wlan1 up SIOCSIFFLAGS: Eingabe-/Ausgabefehler was allerdings mit einem manuellen modprobe -r ath9k sowie folgendem modprobe ath9k repariert werden konnte, auf zum folgenden zweiten Test (vorher vlc korrekt beendet) er hat sich zwar wieder korrekt in den hibernate versetzt ist aber nicht aufgewacht ifconfig wlan1 && ip -4 addr del dev wlan1 && ifconfig wlan1 down && rmmod ath9k && ifconfig wlan1; sleep 3 && rtcwake -l -m disk -t $(date -d 14:49 +%s) && cat /proc/driver/rtc | head -n 4 && modprobe ath9k && dhclient wlan1 && sleep 2 && ifconfig wlan1 && sleep 10 && ifconfig wlan1 && sleep 3 && ping -c 4 jmp.co.at # sieht zwar besser aus, aber beim 1. Test hat er sich garnicht erst ausgeschaltet (ssh zu Fauch war noch offen) dann dank Alt + Druck + R E I S U O doch, sogar mit 10s timer, neu gestartet und ging beim 2. Test odrentlich aus, aber nicht an und beim manuellen PowerOn lief der in der /etc/default/grub neu eingeführte 20s timer GRUB_RECORDFAIL_TIMEOUT=20 TiP: ip -4 addr add 192.168.2.105 dev wlan1 ifconfig wlan1 && modprobe -r ath9k && ifconfig wlan1; sleep 3 && rtcwake -l -m disk -t $(date -d 15:29 +%s) && cat /proc/driver/rtc | head -n 4 && modprobe ath9k && sleep 2 && ifconfig wlan1 && sleep 12 && ifconfig wlan1 && sleep 5 && ping -c 4 jmp.co.at # works 4 ASUS X56K Notebook dank Eintrag GRUB_RECORDFAIL_TIMEOUT=20 in /etc/default/grub auch beim zweiten aufeinanderfolgenden Test Grub lässt beim Start den count-down-timer nicht laufen, wenn der Pc nicht 100% ordnunggemäß runtergefahren wird. Ein korrekter "Shutdown-Vorgang" ist also nötig um beim nächsten Start das Booten von Linux zu gewährleisten. Folgendes hilft: 1) nano /etc/default/grub GRUB_TIMEOUT=10 GRUB_RECORDFAIL_TIMEOUT=20 2) cat /etc/default/grub | grep TIMEOUT 2) cat /boot/grub/grub.cfg | grep -e default -e timeout 3) update-grub 4) cat /boot/grub/grub.cfg | grep -e default -e timeout natürlich auch ein shutdown -h now vor dem nächsten rtcwake ;) pm-suspend äquivalent: dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend pmi action suspend # apt-get install powermanagement-interface less /var/log/pm-suspend.log Test your system if it supports the pm-suspend command with the following simple script: for m in --suspend --hibernate --suspend-hybrid do echo -n "$m: " if pm-is-supported $m; then echo "supported"; else echo "not supported"; fi done Helligkeit einstellen https://wiki.ubuntu.com/Kernel/Debugging/Backlight https://bbs.archlinux.org/viewtopic.php?id=128174 echo "0" > /sys/class/backlight/acpi_video0/brightness echo "15" > /sys/class/backlight/acpi_video0/brightness Desktop PC: xgamma -gamma 1 # von 0.1 - 10 http://wilmor24.wordpress.com/2010/05/11/change-screen-brightness-from-terminal-ubuntu-10-04/ Laptops: setpci -s 01:00.0 F4.B=00 # lspci | grep VGA # für Nr. setpci -s 01:00.0 F4.B=ff # http://askubuntu.com/questions/56155/how-can-i-change-brightness-through-terminal xbacklight -dec # apt-get install xbacklight xbacklight -set 40 xdotool key XF86MonBrightnessUp # apt-get install xdotool xdotool key XF86MonBrightnessDown xset dpms force off http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/how-do-i-change-screen-brightness-from-a-terminal-882023/ http://forum.ubuntuusers.de/topic/bildschirmhelligkeit-einstellen-1/ xrandr -q | grep " connected" xrandr --output LVDS --brightness 1.0 vbetool vbefp setbrightness 00 vbetool vbefp getbrightness vbetool dpms off && sleep 5 && vbetool dpms on https://wiki.archlinux.org/index.php/Backlight xcalib -co 40 -a nvclock -S 50 redshift -o -l 0:0 -b 0.8 -t 6500:6500 pacman -S intel-gpu-tools intel_reg_read 0xC8254 und für den Linux interessierten wie man Grafik / Drucker / Sound / Scannerprobleme löst: hwinfo --pci xrandr lspci 03:00.0 VGA compatible controller: ATI Technologies Inc Radeon R350 [Radeon 9800 Pro] 03:00.1 Display controller: ATI Technologies Inc Radeon R350 [Radeon 9800 Pro] (Secondary) /etc/X11/xorg.conf fehlt find / -name xorg.conf /usr/share/doc/xserver-xorg-video-nouveau/examples/xorg.conf cvt cvt 1680 1050 gtf gtf 1680 1050 60 ergibt: xrandr --newmode "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync xrandr --addmode VGA-0 1680x1050_60.00 für ein dauerhaftes Umstrellen derAuflösung in /etc/X11/xorg.conf eintragen !! dpkg-reconfigure xserver-xorg ls -la /etc/X11/xorg.conf ?? Konfigurations-Datei wird nicht mehr gebraucht ?? ist jetzt unter: /usr/share/X11/xorg.conf.d Handbuch: http://www.x.org/releases/current/doc/man/man5/xorg.conf.5.xhtml Dennoch erstellen: sudo Xorg -configure glxinfo | grep rendering less /var/log/Xorg.0.log sudo displayconfig-gtk http://forum.ubuntuusers.de/topic/kubuntu-vergisst-aufloesung/#post-3199687 ls -la ~/.kde/share/config/krandrrc less ~/.kde/share/config/krandrrc ln -s ~/.kde/share/config/krandrrc ~/.kde/share/config/krandrc ALT + DRUCK + K ls -la ~/.kde/share/config/displayconfigrc less ~/.kde/share/config/systemsettingsrc ls ~/.config/monitors.xml http://wiki.ubuntuusers.de/Bildschirmaufl%C3%B6sung http://wiki.ubuntuusers.de/Baustelle/Bildschirmaufl%C3%B6sung http://forum.ubuntuusers.de/topic/aufloesung-wird-nicht-gespeichert-kde/#post-2873255 nano /etc/X11/xorg.conf Section "Screen" Identifier "Default Screen" SubSection "Display" Modes "1680x1050" EndSubSection EndSection Scanner: GIMP Deutsch: apt-get install gimp echo $LANG apt-get install language-pack-gnome-de apt-get install language-support-de less /etc/sane.d/dll.conf http://www.pelzetter.de/joomla/index.php/computer/73-canoscan-fb630u-funktioniert-nicht-in-ubuntu-1010 Kurzanleitung: 1. sudo aptitude install scanbuttond 2. list usb devices : lsusb 3. run scanbuttond : scanbuttond -r 1000000 4. list available imaging devices : scanimage -L 5. Test basic scanner operation : scanimage -T -d 6. Test gui scanner operation : xsane http://www.linuxforen.de/forums/showthread.php?t=148836 Programm zum Scannen: xsane mount -t vfat /dev/sdb1 /media/My\ Book/ 2 Soundkarten eingesteckt: (lspci -k) 00:05.0 Multimedia audio controller: nVidia Corporation nForce Audio Processing Unit (rev a2) Subsystem: ASUSTeK Computer Inc. Device 0c11 00:06.0 Multimedia audio controller: nVidia Corporation nForce2 AC97 Audio Controler (MCP) (rev a1) Subsystem: ASUSTeK Computer Inc. nForce2 AC97 Audio Controler (MCP) Kernel driver in use: Intel ICH Kernel modules: snd-intel8x0 01:08.0 Multimedia audio controller: VIA Technologies Inc. VT1720/24 [Envy24PT/HT] PCI Multi-Channel Audio Controller (rev 01) Subsystem: TERRATEC Electronic GmbH PHASE 22 Kernel driver in use: ICE1724 Kernel modules: snd-ice1724 geladene Treiber. (lsmod | grep snd) snd_intel8x0 33213 2 snd_ice1724 106559 1 Help there: http://www.linuxquestions.org/questions/linux-hardware-18/loading-driver-for-via-vt1720-24-audio-card-853583/ lspci -k lsmod | grep snd modprobe -a snd_ice1724 lsmod | grep snd_ice1724 aplay --list-devices aplay --list-pcms aplay /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay /media/My\ Book/Musik/AntiDepressiva/Toy\ Dolls\ -\ Nellie\ The\ Elephant.mp3 aplay --device=default /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=pulse /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=front /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=plughw /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=hw:CARD=T22 /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=front:CARD=T22 /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=front:CARD=nForce2 /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=front:CARD=T22 - S32_LE /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=front:CARD=T22 --format=S32_LE /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --format=S32_LE /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=front:CARD=nForce2 -f cd /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=front:CARD=nForce2 -f cdr /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=front:CARD=nForce2 -f S16_LE /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=front:CARD=nForce2 --format S16_LE /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=front:CARD=nForce2 --format=S16_LE /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=front:CARD=T22 --format S32_LE /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav aplay --device=front:CARD=nForce2 --format=S32_LE /media/My\ Book/Musik/Unbekannter\ Interpret/Unbekanntes\ Album/01\ Dayvan\ Cowboy.wav wine /ProgrammeWinXP/Audio/Winamp/winamp.exe http://www.mepis.org/docs/en/index.php?title=Sound_Driver_Database#Via Via 0000:00:06.0 Multimedia audio controller: VIA Technologies Inc. VT1720/24 [Envy24PT/HT] PCI Multi-Channel Audio Controller (rev 01) Driver: snd_ice1724 less /var/lib/alsa/asound.state alsactl restore http://www.mepis.org/docs/en/index.php?title=VIA_Envy24PT/HT cp /var/lib/alsa/asound.state.bup /var/lib/alsa/asound.state; alsactl restore von: http://www.ubuntu-forum.de/artikel/57009/kein-sound-durch-pci-karte.html cat /proc/asound/cards sudo alsa reload sudo alsactl store Lösung: alsamixer dort: F6, 2 für Terratec PHASE 22, Lautstärkeeinstellen: DAC & DAC1 okular /media/BlaicknersBook/UnixCrashKurs.pdf &^C wine /ProgrammeWinXP/Audio/Steinberg\ Cubase\ SE/Cubasese.exe ^C find /windows/ -name wmvcore.dll * markus@Fauch:~$ l /home/markus/lircProblem.txt Suche in how2installKubuntu12.04PrecisePangolin.txt nach: "wie mach ich ein .deb Paket daraus?" dpkg -s build-essential fakeroot dh-make debhelper debconf dkms dpkg-dev m4 bison | grep -B1 Status: # nicht nötig: quilt execstack dh-modaliases lintian Zuordnung von GNU Kommando -> Debian Paket (z.B. dpkg-buildpackage zu dpkg-dev) easy via http://packages.debian.org http://wiki.ubuntuusers.de/Grundlagen_der_Paketerstellung?redirect=no#Erstellung-des-Quellpaketes dh_make # -f ../fileNameOfOriginalSource-2.7.tar.gz dpkg-buildpackage -us -uc **************************************** Sektion: Kernel kompilieren ****************************************** apt-cache policy linux-image-* # sucht nach verfügbaren Kernel Versionen apt-get install linux-image-xyz && apt-get install linux-headers-xyz # installiert neuen Kernel oder sudo /etc/kernel/postrm.d/zz-update-grub 3.5.0-23-generic /boot/vmlinuz-3.5.0-23-generic * oder einen eigenen Kernel bauen: http://wiki.ubuntuusers.de/Kernel/Kompilierung markus@Fauch:~$ l /data1/LaptopBackup/LinusStuff/Kernel__Kompilieren/Kernel-kompilieren.txt Hier ist die Arbeitsabfolge für Ubuntu bis zur erfolgreichen Installation eines selbstgebackenen Kernels beschrieben :) unbedingt lesen http://wiki.ubuntuusers.de/Kernel :( http://wiki.ubuntu-forum.de/index.php/Kernel_bauen Vorbereiten ----------- Systemupdate / Systemupgrade Statt den Kernel für ein veraltetes Ubuntu Release zu bauen, besser vorher auf eins mit LongTimeSupport z.B. Hardy Heron (Ubuntu 8.04.3 LTS) upgraden Tipp: sudo do-release-upgrade is better than apt-get dist-upgrade which ist better than apt-get upgrade (after changing the Ubunut-Version in /etc/apt/sources.list and do a apt-get update) b4 that Source-Package von linux-image-2.6.24-22-generic verwenden, nicht die Kernel-Sourcen aus linux-source-2.6.24 apt-cache search linux-image-2.6.24-24-generic linux-source-2.6.24 linux-image-2.6.24-24-generic - Linux kernel image for version 2.6.24 on x86/x86_64 linux-source-2.6.24 - Linux kernel source for version 2.6.24 with Ubuntu patches ? linux-headers-2.6.24 apt-get source linux-image-2.6.24-24-generic apt-get build-dep linux-image-2.6.24-24-generic apt-get install kernel-package # ?für make-kpkg dpkg-source -x linux_2.6.24-25.63.dsc (in >apt-get source linux-image-2.6.24-24-generic< beinhaltet) ersetzt tar -xvf linux_2.6.24.orig.tar.gz ?zcat linux_2.6.24-25.63.diff.gz | patch -p1 oder: cd /usr/src aptitude install linux-source-2.6.24 libncurses5-dev tar jxf linux-source-2.6.24.tar.bz2 cd linux-source-2.6.24 oder: ketchup -r 2.6.32-rc8 make clean && make mrproper # ! löscht auch .config make-kpkg clean # Unterschied ?? cp /boot/config-2.6.24.6 /usr/src/linux-source-2.6.24/.config sudo cp /boot/config-`uname -r` /usr/src/linux/.config If you re-used the existing configuration, note that Ubuntu kernels build with debugging information on, which makes the resulting kernel modules (*.ko files) much larger than they would otherwise be. To turn this off, go into "Kernel hacking"; then, under "Kernel debugging", turn OFF "Compile the kernel with debug info". make oldconfig # aktualisiert .config auf zu-kompilierende Kernelversion (nimmt Neuigkeiten inkl. Einstellung auf) oder make defconfig für eine (fast) minimale Standardkonfiguration make oldconfig_nonint oldconfig will read the defaults from an existing .config and rewrite necessary links and files. Use this option if you've made minor changes to source files or need to script the rebuild process. http://forum.ubuntuusers.de/topic/eigenen-ubuntu-kernel-kompilieren/#post-1348831 Bei der Verwendung von "Kernel .config support" (d.h., es gibt die Pseudo-Datei /proc/config.gz) kann eine Konfiguration auch wie folgt geklont werden: cd /usr/src/linux-2.6.x make cloneconfig && make modules_prepare bzw. make O=/pfad/zum/build/directory cloneconfig && make O=/pfad/zum/build/directory modules_prepare die Konfiguration des aktuell laufenden Kernels direkt aus dem proc-Filesystem auslesen (LinusStuff/Kernel__Kompilieren/kernel26.html) zcat /proc/config.gz > .config # zcat /proc/config.gz > /pfad/zum/build/directory/.config make oldconfig # make O=/pfad/zum/build/directory oldconfig make modules_prepare # make O=/pfad/zum/build/directory modules_prepare make config bzw. make menuconfig oder make xconfig bzw. make gconfig Kernel hacking > Compile the kernel with debug info (DEBUG_INFO) off Processor type and features > Pentium-III/Celeron(Coppermine)/Pentium-III Xeon (MPENTIUMIII) Timer frequency > 100 HZ (HZ_100) Sound > Advanced Linux Sound Architecture > PCI devices > Emu10k1 (SB Live!, Audigy, E-mu APS) (SND_EMU10K1) Open Sound System (DEPRECATED) (SOUND_PRIME) > OSS sound modules (SOUND_OSS) > MPU-401 support (NOT for SB16) (SOUND_MPU401) (less Documentation/sound/oss/README.OSS) File systems > Second extended fs support (EXT2_FS) > y General setup > Local version - append to kernel release (LOCALVERSION) "-jmp05" only Nvidia card etc. /usr/src/linux-2.6.24/debian/rules updateconfigs # To regenerate all architectures in debian/Config/ debian/scripts/misc/oldconfig ARCH # If you just want to update one architecture Kernel kompileren (Warum nicht einfach linux-image-2.6.24-24-server installieren ? > Weil der weder Sound noch W-Lan unterstützt!) ----------------- make dep # create the necessary include files and generate dependency information. This step is only required for the 2.4.x kernel tree. make all make dep && make clean && make bzImage make && make modules 2>&1 | tee kompiliervorgang.make make dep && make clean && make bzImage && make modules && make modules_install 2>&1 | tee kompiliervorgang.make # top Damit werden alle Abhängigkeiten erfüllt, div. object files aufgeräumt, der Kernel kompiliert, die Module kompiliert und dann die Module installiert. Kernel kopieren: cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.4.7-1 System.map kopieren: cp /usr/src/linux/System.map /boot/System.map-2.4.7 oder make-kpkg clean export CONCURRENCY_LEVEL=2 # nur für CPUs mit 2 Kernen fakeroot make-kpkg kernel_image --revision=Konfigurationsname.Version fakeroot make-kpkg --initrd --append-to-version=-BEZEICHNUNG kernel-image kernel-headers Kernel kompileren - The UBUNTU way Use this command to build all targets for the architecture you are building on: (https://help.ubuntu.com/community/Kernel/Compile) fakeroot debian/rules clean AUTOBUILD=1 fakeroot debian/rules binary-debs To build a specific target, use this command: fakeroot debian/rules clean AUTOBUILD=1 NOEXTRAS=1 fakeroot debian/rules binary-FLAVOUR # bzw. custom-binary-FLAVOUR (z.B. FLAVOUR = generic) Kernel kompileren - The Old-Fashioned Debian Way make-kpkg kernel_image --revision=JMP.0 make-kpkg kernel-image --initrd && make modules-image make-kpkg kernel_image 2>&1 | tee -a kompiliervorgang.make sudo make-kpkg --initrd --revision Kernelversion binary ERROR: dpkg-deb: Control-Verzeichnis hat falsche Zugriffsrechte 2755 (muss >=0755 und <=0775 sein) > entweder als fakeroot starten oder >cd /usr/src; chown -R markus linux-2.6.24; chmod -R a-s linux-2.6.24< funzt irgendwie >chmod -R 0755< nicht. fakeroot bringt's nicht ! Erzeugt nur neue LANGUAGE-setting fehler für fakeroot LANGUAGE=de_DE:de:en_US:en; LC_ALL=de_DE@euro; export LANGUAGE LC_ALL (bringt nix) apt-get install localeconf :( set-language-env :(; dpkg-reconfigure localeconf; sudo set-language-env -E beide nicht in repository dpkg-reconfigure locales tut immerhin mal was apt-get install locales language-env; dpkg-reconfigure locales; als user: set-language-env evtl. apt-get install euro-support-x wieder nix apt-get install locales language-env http://linuxwiki.de/Debian/locales http://www.debianforum.de/wiki/?page=Die+Sprache+auf+Deutsch+umstellen !linkt tot! dpkg -s belocs-locales-bin -> Status: install ok installed Wenn das Paket belocs-locales-bin installiert ist, hat die nicht existierende Datei /etc/locale.gen keine Wirkung. Eher /etc/locale.alias Man muss vielmehr als root die Datei /var/lib/locales/supported.d/de editieren und dort seine Locales-Einstellungen vornehmen. Ein 'man locales-gen' hat mir da auf die Sprünge geholfen. Danach noch >locales-gen< oder >dpkg-reconfigure< locales aufrufen. folgende Packete nachinstallierte: language-pack-de language-pack-de-base Anschließend: sudo locale-gen de_DE.UTF-8 export LC_ALL=de_DE.UTF-8; export LANGUAGE=de_DE.UTF-8; sudo dpkg-reconfigure locales # nur de_DE.UTF-8 ausgewählen locale -a export LC_ALL="de_DE.UTF8" oder export LC_ALL="de_DE@euro" export LC_ALL="de_DE.UTF8" nicht export LC_ALL="de_DE.UTF-8" export LC_ALL="de_DE.UTF8"; sudo dpkg-reconfigure locales # ? export LANGUAGE="de_DE.UTF8" v export LC_ALL="de_DE.utf8" head -n 1 ./debian/changelog make-kpkg clean # revision=VERSION.PATCHLEVEL.SUBLEVEL-EXTRAVERSION.??-??? fakeroot make-kpkg kernel_image --revision=Konfigurationsname.Version binary fakeroot make-kpkg kernel_image --revision=?2.6.24-25.63-jmp01? --initrd && make modules-image 2>&1 | tee -a kompiliervorgang.make fakeroot make-kpkg kernel_image --initrd 2>&1 | tee -a kompiliervorgang.make fakeroot make-kpkg kernel_image --initrd && make modules-image 2>&1 | tee kompiliervorgang.make fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image && make modules-image 2>&1 | tee -a kompiliervorgang.make fakeroot make-kpkg --initrd --append-to-version=-jmp02 kernel_image kernel_headers && make modules-image 2>&1 | tee kompiliervorgang.make --append-to-version=-jmp02 entspricht dem Eintrag der .config z.B. mittels make xconfig eingetragen, wäre also doppelt gemoppelt fakeroot make-kpkg --initrd --revision=2.6.24-24-jmp02 kernel_image kernel_headers && make modules-image 2>&1 | tee kompiliervorgang.make fakeroot make-kpkg --initrd kernel_image kernel_headers modules_image 2>&1 | tee kompiliervorgang.make fakeroot make-kpkg --initrd --revision 2.6.24-24-jmp02 kernel_image kernel_headers modules_image 2>&1 | tee kompiliervorgang.make fakeroot make-kpkg --initrd --revision 2.6.24.6-jmp03-10.00.Custom kernel-image kernel-headers modules-image 2>&1 | tee kompiliervorgang.make ? Alex: $ fakeroot make-kpkg --initrd kernel_image modules baue den kernel mit initrd support, baue auch extra packages, die in /usr/src/modules liegen. -> linux-image...deb & nvidia-...deb fakeroot make-kpkg --initrd kernel_image kernel_headers modules 2>&1 | tee kompilierVorgang2.6er-jmp04.make rm ./debian/changelog # Feine englische ? Mach das auf ger keinen Fall wieder!! 1. Kompiliert er trotzdem gute 7h und 2. kann er das .deb file nicht erzeugen, ist also alles umsonst. fakeroot make-kpkg --initrd kernel_image kernel_headers 2>&1 | tee -a kompilierVorgang2.6er-jmp05.make fakeroot make-kpkg --initrd kernel_image kernel_headers modules 2>&1 | tee kompilierVorgang2.6er-jmp06.make Module kompilieren ------------------ make modules alias l='ls -la'; l /lib/modules/ make modules_install ? Also includes the corresponding System.map file, the modules built by the packager, and scripts that try to ensure that the system is not left in an unbootable state after an update. aus https://www.privacy-cd.org/de/anleitungen/demo-content-mainmenu-56/29?start=3 make-kpkg modules_image --revision=JMP.0 oben schon integriert make-kpkg kernel_headers initrm bauen ------------ mkinitramfs -o /boot/initrd.img-2.6.24.6 2.6.24.6 Paket: initrd-tools ( dpkg -s initrd-tools; apt-cache search initrd-tools ) yaird - Yet Another mkInitRD initramfs-tools - tools for generating an initramfs update-initramfs -k 2.6.22.9-hyperion -d mkinitramfs-kpkg mkinitrd /boot/initrd-2.6.0.img 2.6.0 mkinitrd -k vmlinux-VERSION -i initrd-VERSION # 4 SuSE mkinitrd sudo update-initramfs -c -k 2.6.32-rc8 # -c fuer create, -u fuer update wenns schon eins gibt Installation ------------ Achtung. Einen Kernel sollte man immer über die Metapakete wie >linux-generic< installieren cd /usr/src; dpkg -i linux-image-2.6.24.6_2.6.24.6-10.00.Custom_i386.deb -> Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/dkms ? /etc/init.d/dkms_autoinstaller: line 82: /var/lib/dkms/lirc/0.8.3~pre1/source/dkms.conf: No such file or directory nano /boot/grub/menu.lst Bemerkungen: ------------ KDE startet nicht: Kein Zugriff auf .ICEauthority blabla -> chown markus /home/markus/.ICEauthority kommt dann Es ist ein Problem bei der Einrichtung der Kommunikation zwischen den KDE-Prozessen aufgetreten. could not read network connection list /home/user/.DCOPserver_linux_0 Bitte stellen Sie sicher, dass das Programm dcopserver läuft". Hilft dcopserver # starten Kommt es dabei zu einem Time-Out bei dem Versuch die ~/.ICEauthority zu locken hilft folgender Befehl: /usr/bin/iceauth -b -f ~/.ICEauthority # dann >quit< dcopserver > Außerdem hab ich einfach erwartet, dass wenn die laufende KernelInstanz es > unterstützt dies auch in seiner .config vermerkt sein muss. Wie erklärt sich > denn das dem nicht so ist ?? guck mal unter "General setup" --> "Kernel .config support" --> "Help" $ gunzip < /boot/initrd.img-2.6.32-rc8 | cpio -i entweder: modprobe snd_emu10k1 oder: insmod /pfad/snd_emu10k1.ko Soundprobleme: ALSA: /dev/snd/* OSS: /dev/dsp, /dev/mixer verträgt sich auch gleichzeitig (irgendwie) -------------- wenn alsamixer und amixer laufen, solltest du mal >modprobe snd-mixer-oss< probieren, dann sollten auch alte oss-mixer laufen. modprobe snd-mixer-oss sudo insmod /lib/modules/2.6.24-24-generic/ubuntu/sound/alsa-driver/acore/oss/snd-mixer-oss.ko dpkg -s alsa-oss # die aoss /usr/bin/aumix # Lösung /etc/esound/esd.conf /etc/libao.conf # >> default_driver=alsa oder Oh, since you have OSS through ALSA enabled, add this to the instructions to get sound in Firefox: Edit /etc/mozilla-firefox/mozilla-firefoxrc change FIREFOX_DSP to "AOSS" I've also noticed that if you're using RealPlayer, there's crackling in sounds unless you set buffer_size to 8192. Richte linux-image-2.6.24.6-jmp03 ein (2.6.24.6-jmp03-10.00.Custom) ... Running depmod. Finding valid ramdisk creators. Using mkinitramfs-kpkg to build the ramdisk. Other valid candidates: mkinitramfs-kpkg mkinitrd.yaird ZyXEL ZyAIR G-220 v2 wlan Probleme ? ------------------------------------ Win 7 (Pro SP1) 64 Bit (Vista) Treiber für USB-Wlan-Stick ZyXEL G-220 www.zyxeltech.de/zyairg220v2.htm -> /mnt/EigeneDaten/Download/ZyXEL_G-220v2_Vista_2.0.2.12_WHQL_PASS.zip GNU/Linux: lsmod | grep zd1211rw ifconfig eth1 up SIOCSIFFLAGS: No such file or directory ln -s /lib/firmware/2.6.24-24-generic /lib/firmware/2.6.24.6-jmp03 # hilft 2 Möglichkeiten den knetworkmanager zum Verbinden mit Wlan zu motivieren (1. nur für aktuelle Sitzung, die 2. dauerhaft auch nach reboot :) 1.) knetworkmanager > rechtsklick > Drahtlose Netzwerke > WLAN-B76467 > WEP 40/104-Bit-Hex & Gemeinsam genutzter Schlüssel (dann geht's auch, evtl vorher killall knetworkmanager & re up) 2.) knetworkmanager > Manuelle Einrichtung ... > eth1 > Schnittstelle einrichten... > Erweiterte Einstellungen > Manuell: IP 192.168.2.105, NetMask 255.255.255.0, Beim Systst akt., ESSID WLAN-B76467, WEP-Schlüssel: GEHEIM, Hexadezimal > Erweitert BCast 192.168.2.255, Gateway 192.168.2.1 OK > Routing (Tab) nochmal Gateway 192.168.2.1 > Netzerkprofile, Neu erstellen: WlanDad, Auswahl speichern, kontrollieren http://speedport.ip (PassWD geheim) Konfiguration::Sicherheit > MAC Filterung > PCs übernehmen & Freigabe (Wlan Fauch-IP: 192.168.2.105 MAC: 00:13:49:91:11:d7) vs eth0 (MAC 00:c0:f0:81:3f:3a) IP 192.168.2.103 dran denken die Weiterleitung von 192.168.2.103 auf 192.168.2.105 umzustellen ! KONFIGURATION::Netzwerk >> NAT & Portregeln >> Port-Weiterleitung >> Regel: Web-Server Fauch > Gültig für PC: Fauch (Eintrag durch doppel IP 2 mal vorhanden, oberer Fauch = 192.168.2.103 unterer Fauch = 192.168.2.105 ) Test 4 Web: http://markus-priester.spdns.de kurz und knapp http://michael-prokop.at/blog/2005/11/21/zyxel-zyair-g-220-und-linux/ Kabelfehler http://forum.ubuntuusers.de/topic/zyxel-zyair-g-220-macht-probleme/#post-2248279 Suse TreiberQ. http://de.opensuse.org/Installation_von_Zyxel_ZyAir_G-220 Debi http://debianforum.de/forum/viewtopic.php?f=30&t=108366 W-LAN Allgemeines: iwconfig iwconfig -h iwspy(8), iwlist(8), iwevent(8), iwpriv(8), wireless(7) iperf -s & iwscanner http://www.pcwelt.de/ratgeber/Linuxwelt-Spezial-Tipps-fuers-WLAN-6469344.html cat /proc/net/wireless iw wlan1 scan iwlist wlan1 scanning cat /etc/network/interfaces /etc/init.d/networking stop /etc/init.d/networking start wavemon apt-get install kismet http://de.wikihow.com/Eine-preiswerte-Wifi-Antenne-bauen http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.htm http://www.wireless-nrw.de/?link=downloads Windows: http://www.pcwelt.de/ratgeber/Die_fuenf_besten_WLAN-Diagnose-Tools-WLAN-Tuning-7931116.html Windows: http://www.netstumbler.com/downloads/ http://www.remote-exploit.org/index.php/Auditor_main Bilder von Digi-Cam Canon Power Shot A580 auslesen, use: lsusb gphoto2 + gtkam gvfs-mount -l gphotofs /fusermount gthumb nautilus mount gets: gvfs-fuse-daemon on /home/markus/.gvfs googel 4 ubuntu mount digicam /data1/EigeneDateien/Texte/Linux/grub_MBR-reparatur.txt ---------------------------- GNU/Linux Kubuntu Grub2 wieder in den MBR schreiben ---------------------------- An alle Linuxianer, oder die die es werden wollen: Quick how 2 GNU/Linux Kubuntu Grub2 wieder in den MBR schreiben: Kurzversion: (ist natürlich an Euer System anzupassen! sudo fdisk -l /dev/sda kann helfen!) 1.) alle unnötigen USB Festplatten, Sticks etc. wegen Plattenreihenfolge ausstöpseln 2.) mittels Live-CD mit gleicher Systemarchitektur (32/64 bit) wie installiertes System booten sudo su mount -t ext3 /dev/sda6 /mnt # Ebenso eine evtl. separate boot-Partition: mount -t ext2 /dev/sda1 /mnt/boot # des Weiteren sollte man aus dem aktuellen System wichtige Systeminformationen einbinden: mount -o bind /dev /mnt/dev mount -o bind /sys /mnt/sys mount -t proc /proc /mnt/proc sudo chroot /mnt /bin/bash grub-install /dev/sda bei file not found vorher: cp /proc/mounts /etc/mtab Bei'm Ersten mal ging's bei mir wohl schief weil die Knoppix Rettungs CD noch ein 32 Bit Linux hatte. Bei'm zweiten mal, trotz 64 Bit Kubuntu 10.10: weil ich die USB 1GB HD eingesteckt hatte und die Namen der Festplatten /dev/sda und /dev/sdb vertauscht waren. Beim 4. mal hatte es dann funktioniert, nachdem ich cp /mnt/proc/mounts /mnt/etc/mtab vor dem grub-install /dev/sda ausgeführt hab ... So ist es mir aber letztendlich noch gelungen den MBR neu zu schreiben und Linux wieder zu booten, selbst Windoof 8 startete mit dem alten Vista Menüpunkt wieder auf ... ------- Linux Kubuntu Grub2 wieder in den MBR schreiben ausführlich z.B. mit UUID auslesen etc --------------- Um's Linux wieder an's booten zu bekommen musste eigentlich nur ein Live-Systems gestartet werden, und damit die Partition des bereits installierten Ubuntu-System eingebunden werden: sudo mount /dev/sda6 /mnt # Ebenso die separate boot-Partition: sudo mount /dev/sda1 /mnt/boot # des Weiteren sollte man aus dem aktuellen System wichtige Systeminformationen einbinden: sudo mount -o bind /dev /mnt/dev sudo mount -o bind /sys /mnt/sys sudo mount -t proc /proc /mnt/proc sudo cp /mnt/proc/mounts /mnt/etc/mtab # Evtl. auch die Internetverbindung z.B. DNS-Server: sudo cp /etc/resolv.conf /mnt/etc/resolv.conf # Dann kann in das bereits installierten Ubuntu-System gewechselt werden sudo chroot /mnt /bin/bash Anschließend kann der grub2 neu in den MBR geschrieben werden grub-install /dev/sda # installiert die GRUB-Dateien erneut in das Verzeichnis /boot/grub und schreibt GRUB in den MBR update-grub # erstellt auf Grundlage der neu installierten Dateien die Datei /boot/grub/grub.cfg erneut ??: grub-mkconfig menuentry "Windows XP (hda1)" { set root=(hd0,5) chainloader +1 } http://forum.ubuntuusers.de/topic/grub2-windows-7-installation-hinzufuegen/ Das war der einfache Teil, denn bei'm Laptop meiner Schwester war noch das Problem, dass die /boot/initrd.img-2.6.* -warum auch immer- defekt gewesen ist, was sich u.a. beim booten in folgendem Fehler äußerte: Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) Deswegen musste der Kernel neu installiert werden: apt-get --reinstall install linux-image-2.6.* Nun lagen auch gültige Boot-Dateien vor und das System konnte wieder anstandslos booten ... Übrigens kann man in der /etc/default/grub abschalten, dass statt dem Device (z.B. /dev/sda6) die UUID der Festplatte verwendet werden soll, indem man folgende Zeile einkommentiert: #GRUB_DISABLE_LINUX_UUID=true Die UUID lässt sich aber auch schnell mit tune2fs -l /dev/sda6 | grep UUID besser noch mit blkid ermitteln. Folgende Web-Seiten beinhalten detaierte Lösungsvorschläge bei dem Problem Windows nach Linux installiert zu haben, bezüglich des Boot-Problems: Grub 1: http://wiki.ubuntuusers.de/GRUB Grub 2: https://help.ubuntu.com/community/Grub2 http://wiki.ubuntuusers.de/grub_2/konfiguration http://wiki.ubuntuusers.de/GRUB_2/reparatur Root-Directory-Methode chroot-Methode Unterschiede: http://manual.sidux.com/de/sys-admin-grub2-de.htm auch Reparatur: MBR von Windows überschrieben - MBR korrumpiert - Wiederherstellung von Grub2 ... /usr/sbin/grub-install --recheck --no-floppy --root-directory=/media/xdxx /dev/sda chroot-Umgebung zur Wiederherstellung eines überschriebenen Grub in MBR ... mount -t proc proc /mnt/sidux-chroot/proc mount -t devpts devpts /mnt/sidux-chroot/dev/pts mount -o bind /dev /mnt/sidux-chroot/dev -> chroot /mnt/sidux-chroot /bin/bash http://en.gentoo-wiki.com/wiki/Grub2 http://www.unixboard.de/vb3/showthread.php?t=44586 -> http://members.iinet.net/~herman546/p20.html -> http://wiki.ubuntuusers.de/GRUB_2 > http://wiki.archlinux.org/index.php/Grub2 > https://wiki.archlinux.de/title/Grub2 Also eigentlich nur mit Deiner Live-CD booten, dann mittels >mnt<, >chroot< in das defekte, installierte System wechseln Grub-Änderungen mit update-grub am MBR vornehmen, exit, reboot Oder mit dem windows bootmenu linux beibringen, nur durch änderung der boot.ini. Aus: http://forum.golem.de/read.php?33037,1796112,1800217 oder noch Besser: Linux manuell in den Windows bootloader eintragen (mit easy bcd ) oder über die Komandozeile. EasyBCD (grafische Oberfläche für BCD.) : http://neosmart.net/dl.php?id=1 es gibt auch noch andere Möglichkeiten, vorher den MBR sichern und dann rückspielen z.B. usw, alles im Netz ... Viel Erfolg ! ********************************************************************************************************** * markus@FauchPortable:~$ l /home/markus/goOnline.sh #!/bin/bash echo echo "You might want now 2 enter (as root) in another terminal:" echo "sudo wvdial blue" echo "oder" echo "sudo wvdial swiss" echo "oder" echo "sudo wvdial bfree" rfcomm connect 0 00:18:0F:DD:EB:EC 1 echo echo "in case it was't successful, try:" echo "hcitool dev && hcitool scan" echo "sdptool browse" echo "sdptool search DUN" echo "ans in case u get a: Failed to connect to SDP server on 00:10:60:29:19:4A: Permission denied" echo "delete code in file /var/lib/bluetooth/BTD-Adr/linkkeys (encrypted pin)" echo "z.B. vi /var/lib/bluetooth/00\:10\:60\:A4\:4C\:D6/linkkeys" echo "another important file is: /etc/bluetooth/pin (plain pin)" echo ", and enter when next popUp appears: 1111" ************************************************************************************************************* * markus@FauchPortable:~$ l /home/markus/wlanUp.sh #!/bin/bash #echo "Sie übergaben als Parameter1: $1 und als Parameter2: $2" if [ "$1" == "-a" ]; then echo "Sie übergaben als Parameter1: $1. please implement: Switch to auto mode" fi function manualMode { # Manual read ANSWER if [ "$ANSWER" == "n" ] ; # [ "$ANSWER" = "n" ] then echo -e "\nYour Answer was: no, So I guess I could'nt kill the knetworkmanager. Try with kill -9" `pidof knetworkmanager` "now"; kill -9 `pidof knetworkmanager` echo -e "\nIs it done now? ps -AH | grep knetworkmanager:" ps -AH | grep knetworkmanager else if [ $ANSWER == y ] ; then echo -e "\nYour Answer was: yes, So I'll continue repairing your W-LAN..."; else echo "What? Please enter y or n followed by [Enter]"; #read ANSWER # and use this routine ygain fi fi } function automaticMode { # Automatic SYS=`ps -AH | grep knetworkmanager`; if [ "$SYS" != "" ]; then autoANSWER="n" echo " BTW the automaic says: No, because it sees the process: "$SYS; # kill -9 `pidof knetworkmanager` # echo "PROBLEM FOUND!!" else autoANSWER="y" echo " BTW the automaic says: Yes, because it sees noting in processtable: "$SYS; fi SYS=`lsmod | grep ath9k`; if [ "$SYS" != "" ]; then autoANSWER="n" echo " BTW the automaic says: No, because it sees the modules: "$SYS; # sudo modprobe -rf ath9k # echo "PROBLEM FOUND!!" else echo " BTW the automaic says: Yes, because it sees no loaded modules: "$SYS; #if [ "$autoANSWER" != "n" ]; autoANSWER="y" fi i=$(expr $i + 1) # echo $i if [ "$i" -gt 3 ]; #if [ "$i" -eq 2 ]; then echo -e "I tried autorepair, but got unsolveable PROBLEMS FOUND!! Look 4 yourself, please!" lsmod | grep ath9k ps -AH | grep knetworkmanager exit; #break; fi } echo -e "\nFirst, I'll Kill you knetworkmanager. ps -AH | grep knetworkmanager:" ps -AH | grep knetworkmanager kill `pidof knetworkmanager` echo -e "\nthen unload your W-LAN kernelmodul: ath9k! lsmod | grep ath9k:" lsmod | grep ath9k sudo modprobe -r ath9k echo -e "\nSo nothing should show up now anymore. ps -AH | grep knetworkmanager; lsmod | grep ath9k:" lsmod | grep ath9k ps -AH | grep knetworkmanager i=0 echo -e "\n-> Type y 2 confirm with yes, n 4 no and [Enter]"; while [ "$ANSWER" != y ] #or $ANSWER != "y" ] #while [ "$autoANSWER != "y" ] do automaticMode manualMode done #sleep 10 #echo -e "\nOK? can we continue"; read -n 1 ANSWER echo -e "\nNow I'll repair dat 4 ya!" sudo modprobe ath9k /usr/bin/knetworkmanager sleep 8; echo -e "\nand the results are\n" lsmod | grep ath9k ps -AH | grep knetworkmanager ************************************************************************************************************* Zauberkasten:/mnt/EigeneDaten/EigeneDateien/Texte/DynDNS.org-Alternativen.txt Zauberkasten:/home/markus/how2installKubuntu12.04PrecisePangolin.txt Und noch viele .sh Skripe, welche den Server Fauch steuern : at.controlledShutdown.sh at.Mukke+LichtAus.sh CPUtemperatur.sh lircXmmsStartup.sh at.LichtAus.sh at.shutdown.sh irexec2Reset.sh VideoLogicOn.sh at.LichtDimmen.sh at.StereoanlageAus.sh irexecAutostart.sh xmmsSHstart.sh at.Mukke+LichtAusPlaySound.sh boot.autoControlling.sh jd.sh xmmsStatus.sh * markus@FauchPortable:~$ l /data1/EigeneDateien/Texte/Linux/unix-befehle.txt als vorläufer von * markus@FauchPortable:~$ l /data1/EigeneDateien/Texte/Studium/Studienarbeit/Studienarbeit.werd.zu.original/Studienarbeit.Linux.v41.sxw danach eher * l /data1/EigeneDateien/Texte/Linux/Linux\ Tips.txt markus@Fauch:~$ l /home/markus/c++/umlaute.txt Die Tastenkombi um die KDE GUI abzuschießen: statt (wie früher: Strg+Alt+Backspace) Jetzt: alt+sysreq+k Also: Alt (ohne GR) dann S-Abf (auch bekannt als Druck-Taste) und anschließend k drücken ! Allerdings friert der Pc bei mir dann völlig ein :( Mehr zum (verwandten) Thema Magic SysRq key unter: http://en.wikipedia.org/wiki/Magic_SysRq_key bzw. http://de.wikipedia.org/wiki/Magische_S-Abf-Taste hängendes Linux neustarten / reboot: Alt + Druck + R E I S U B (kurze Pause zum Ausführen zwischen Tastendruck) Um im SCREEN scrollen zu können drückt man Strg + a dann Esc oder Alt Gr + 8 Nun mittels den Pfeil- und Bildtasten scrollen. Beenden mit q https://wiki.archlinux.de/title/Screen http://wiki.ubuntuusers.de/screen Bei screen mit Putty gibt es ja das Problem mit dem Scrollen: Einfach bei Putty -> Features -> Disable switching to alternate terminal screen anhaken dann scrollt das Fenster auch in screen normal... Alternativ kann man auch termcapinfo xterm ti@:te@ in das .screenrc File schreiben -> http://mike.stoppelman.com/2007/03/scrollback-with-putty-and-screen.html How to reload screenrc without restarting screen -> http://serverfault.com/questions/194597/how-to-reload-screenrc-without-restarting-screen Hier ein paar nette Einstellungen für .screenrc -> http://emanuelduss.ch/2013/02/meine-konfigurationsdatei-fur-screen-screenrc/ nicht zu vergessen die Kommandos vom Paketverwaltungssystem apt apt apt-ftparchive apt-key apt-cache apt-cdrom apt-mark apt-get aptitude apt-sortpkgs apt-config aptitude-create-state-bundle apturl apt-extracttemplates aptitude-run-state-bundle dpkg-query -l qmmp apt-get install --reinstall plasma-desktop kdm etc. dpkg-reconfigure kdm # upstart xserver-org add-apt-repository ppa:jd-team/jdownloader # && apt-get update && apt-get install jdownloader bzw. die Softwareverwaltung aptitude oder synaptic (grafisch) bzw. anderes ?Name? Install and Remove Applications (zu finden unter: KDE-Menu/Programme/System/Package-Manager) sowie die neuen PPA-Kommandos (Personal Package Archive) zum einbinden fremder Paketquellen: sudo add-apt-repository ppa:user/ppa-name z.B. sudo add-apt-repository ppa:mscore-ubuntu/mscore-stable && sudo apt-get update (für MuseScore einen Noteneditor) Brennen mit Linux / howto burn : k3b will net wie's soll (brenn geschwindigkeit etc) BashBurn is an easy to use command-line frontend for cdrecord and other burnig-related tools, or just type: cdrecord -scanbus # to identify the device first cdrecord -v -dao speed=1 dev=4,0,0 /data1/DE_WinXP_Pro_with_SP3_VL/DE_WinXP_Pro_with_SP3_VL.iso :( beim CD brennen: Average write speed 9.3x -> try speed=4 & maybe -eject -overburn howto proofread ? driveropts=burnproof 4 buffer underrun, but how 2 proof the media ? http://www.cpqlinux.com/cdrw.html russisch 4 mkisofs first ... gracetime=10 gibt einem 10s Zeit dan vorgang nochmal abzubrechen cdrecord -v -dao speed=2 driveropts=burnproof dev=4,0,0 gracetime=7 -overburn -eject /path/2.iso Speed set to 4155 KB/s Starting to write CD/DVD at speed 3.0 in real SAO mode for single session. Average write speed 3.0x. xpenguins -id 0x1e001c6 -g # take id from xwininfo (klick on empty desktop background 4 id) http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html last -x shutdown; vmstat 3; w; pgrep SCREEN; iostat; sar -n DEV | more; mpstat -P ALL; pmap -d `pidof knetworkmanager`; tcpdump -i eth0 tcp port 80; http://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html Nachinstallieren: dnstop -l 5 eth0; vnstat -i eth0; iftop -i eth0; ethtool eth0; iwconfig wlan1 use puppet, cfengine or chef to prevent Command Line mistakes http://www.cyberciti.biz/tips/my-10-unix-command-line-mistakes.html http://www.linuxtal.de/infos/Ubuntu_Tipps_und_Tricks_A4.pdf Kommandos man udevadm --help man wait --help man stop --help man script --help gut n8 J. Markus, Dipl. Inf. (FH) .--. |o_o | /------------------------------------------\ ||_/ | | Johannes Markus P.: M.Priester@gmx.de | // \ \ | Markus-Priester.spdns.de [up 8-18h] | (| | ) | ICQ: 360605355 Skype: johmarkus | /'\_ _/`\ \------------------------------------------/ \___)=(___/ Trouble with Windows? Reboot. Trouble with GNU/Linux? Get root! »«²³€µöäüßÖÄÜ éêèáâà¢çÇÃã ISO 8859-15 I love IT! ≙Ω•♪♫♦♣♠— ®™© Ý ☺☻ ÞÐ😉 jetzt: UTF-8 ‼