Archiv der Kategorie: Tech & Games

Setting up Clonezilla-Server

In short:

#/etc/apt/sources.list editing
echo -e "\n# Clonezilla" >> /etc/apt/sources.list

echo "deb drbl stable" >> /etc/apt/sources.list

# Add GPG-Key
apt-key add GPG-KEY-DRBL

#Update Packagelist
apt-get update

#drbl installation
apt-get install -y drbl

#Set up Clonezilla und drbl
drblsrv -i
drblpush -i

Inside of your DHCP you have to reconfigure:

For the neccessary scope.

Option 66 with IP Adress of cloning server

Option 67 with  pxelinux.0

Long(er) Explanation here:

OS Installation

Install an Ubuntu or Debian Server first. Then start with Clonezilla SE Installation. Commands have to be executed by root

sudo -i

Add this Line in your /etc/apt/sources.list

deb drbl stable

then import the GPG-Key

apt-key add GPG-KEY-DRBL

To renew sources do:

 apt-get update

and install dbrl

apt-get install drbl

This should also install every dependencies

Set up Clonezilla

First start with configuring dbrl

drblsrv -i
  1. Install Network Boot-Images: If you want to boot from Images, not for installing so i chose „N“
  2. Serial Output: I chose „N“
  3. Operating System update: I chose „N“
  4. Kernel for Client: I chose 1

Next step is:

drblpush -i
  1. DNS-Domain: choose your local domain
  2. NIS/YP Domain-Name: not neccessary
  3. Präfix for Clienthostname: as you wish eg. clonezilla
  4. NIC for Internetaccess: mostly eth0
  5. Collecting MAC-Adresses: You can choose N
  6. Ip-Adress to MAC: Clients do always get the same IPs (like reservations)
  7. Start of IP-Adress-Range: eg. 1, First IP is then 192.169.0. 1
  8. Max Clients: eg. 20, last IP would be 192.169.0. 20
  9. Diskless Services: Not needed
  10. Type of usage: For our scope 1 is enough
  11. Where to put the images?
  12. You can choose a password for accessing Clonezilla
  13. Bootprompt for Clients: N




MySQL Backup to a share

  • Create a share on a server
  • Install cifs-utils: apt-get install cifs-utils
  • Create a folder under /mnt for mounting:
    mkdir /mnt/backup
  • Inside of /etc/fstab define the mountpoint:
//backupserver/Linux_Backups   /mnt/backup   cifs    credentials=/etc/cifspw    0       0
  • Create /etc/cifspw with credentials für a „mounting-user“

> Ubuntu 12


< Ubuntu 13

  • Try via mount -a if mounting works and verify output of df or simply go to /mnt/backup (cd /mnt/backup)
  • Create a file called inside of /usr/sbin and add this content:
for db in 'mysqlshow -u $user -p$password | sed -n -e "s/^| \([^ ]*\)[ ]*|$/\1/p"'  
do mysqldump --opt -u $user -p$password $db > /mnt/backup/ /mysql/$db.sqldone

After creation do chmod a+x so that the script can be executed

  • To automate the job create a cronjob under /etc/cron.d called mysql_backup (or do it via crontab –e)
00 02 * * *     root    /usr/sbin/ >/dev/null 2>&1

Delete Recycle.bin on TS

You need to open a command prompt window as an administrator, and then the directory you need to remove varies depending on the OS you’re working with:

  • For Windows 7 or Server 2008 run this command from the command prompt:
    • rd /s D:\$Recycle.Bin
  • For Windows XP or Server 2003 run this command from the command prompt:
    • rd /s D:\recycler

Note: These commands reference the “D:\” drive. Each drive keeps its own Recycle Bin so you’ll need to run this for each drive letter that you want to empty.

After running the command you may notice that the Recycle Bin icon may not refresh immediately to reflect that it is empty. This is because you’re using a non-standard procedure to empty the Recycle Bin, but if you open it up the icon will refresh and you should see that there are no files in there.


CISCO Configurations

Just a few commandos to remind:

Command Description
sh run Show running Config
sh switch Shows availability of cluster nodes
sh conf Shows config (which is loaded when booting)
sh mac address-table inter gi 1/0/20 Find out Mac Adress
sh interfaces status Shows ports stats
sh arp Address Routing Table (MAC/IP/VLAN/Age)
wr writes running config
Reset port to default
conf t Konfigurationsmodus
default interface gi/1/0/42 Port zurück auf Default
default switchport access vlan -> vlan auf default setzen
Activate port (shut/noshut)
conf t Config-Mode
interface gi/1/0/42 Choose port
no shutdown Activate port
exit Exit conf mode
sh interface status gi/1/0/42 Shows Port info
Config a port basic
conf t Config-Mode
interface gi/1/0/42 Choose Interface
description *****SEPPL***** Set Description
exit Exit conf mode
sh run int gi/1/0/42 Shows Port info
Config a port
conf t Config-Mode
interface GigabitEthernet1/0/28 Choose Interface
description AT-KL-PROD-AP07 Set Description
switchport trunk native vlan 200 For trunk set native VLAN
switchport trunk allowed vlan 60,90,200 For trunk set additional VLANs
switchport mode trunk Set TRUNK active
switchport nonegotiate For a faster (UP)Link
switchport voice vlan 70 Set vlan 70
logging event trunk-status Logging for TRUNK
spanning-tree portfast SPANNING TREE Protocoll portfast
Copy running-config startup-config Copy running config to startup config (wr?)



VLAN 20 + 70 interface GigabitEthernet1/0/1
description ***20 VLAN***
switchport access vlan 20
switchport mode access
switchport nonegotiate
switchport voice vlan 70
mls qos trust dscp
spanning-tree portfast
Trunked interface GigabitEthernet1/0/28
description TRUNKY TRUNKY
switchport trunk native vlan 200
switchport trunk allowed vlan 60,90,200
switchport mode trunk
switchport nonegotiate
switchport voice vlan 70
logging event trunk-status
spanning-tree portfast
ESX – Server interface GigabitEthernet2/0/23
description ESX-Server
switchport trunk encapsulation dot1q
switchport trunk native vlan 1999
switchport trunk allowed vlan 1,10,12,200
switchport mode trunk
switchport nonegotiate
logging event trunk-status
mls qos trust dscp
spanning-tree portfast trunk

Extend ext4 Filesystem

Bildergebnis für ext4

– Expand the virtual disk in Virtualization Software
– Reboot Server for recognizing the new disk size
– delete the partition via fdisk and recreate it with new size
– resize2fs resize filesystem

for example resize sdb disk:
[root@kot ~]# fdisk /dev/sdb
(you can type m for help)

type "p" for showing the partition table, after evaluating the number of the partition type
d (for delete) and enter the partition number
After deleting the old partition type n for creating a new one
p for primary
For first cylinder i chose default setting (1)
For last cylinder I also used default setting
w for write

After that reboot, and after the reboot type resize2fs /dev/sdb(1) so the partition can extend. Check via df, the partition should now have the new size.

Unfortunately a Linux in german:

[root@kot ~]# fdisk /dev/sdb
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Befehl (m für Hilfe): m
Befehl Bedeutung
a (De)Aktivieren des bootfähig-Flags
b \u201ebsd disklabel\u201c bearbeiten
c (De)Aktivieren des DOS Kompatibilitätsflags
d Eine Partition löschen
l Die bekannten Dateisystemtypen anzeigen
m Dieses Menü anzeigen
n Eine neue Partition anlegen
o Eine neue leere DOS Partitionstabelle anlegen
p Die Partitionstabelle anzeigen
q Ende ohne Speichern der Änderungen
s Einen neuen leeren \u201eSun disklabel\u201c anlegen
t Den Dateisystemtyp einer Partition ändern
u Die Einheit für die Anzeige/Eingabe ändern
v Die Partitionstabelle überprüfen
w Die Tabelle auf die Festplatte schreiben und das Programm beenden
x Zusätzliche Funktionen (nur für Experten)
Befehl (m für Hilfe): d
Partition 1 ausgewählt
Befehl (m für Hilfe): n
Befehl Aktion
e Erweiterte
p Primäre Partition (1-4)
Partitionsnummer (1-4): 1
Erster Zylinder (1-104433, Vorgabe: 1):
Benutze den Standardwert 1
Last Zylinder, +Zylinder or +size{K,M,G} (1-104433, Vorgabe: 104433):
Benutze den Standardwert 104433
Befehl (m für Hilfe): p
Platte /dev/sdb: 859.0 GByte, 858993459200 Byte
255 Köpfe, 63 Sektoren/Spur, 104433 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x604f021e
Gerät boot. Anfang Ende Blöcke Id System
/dev/sdb1 1 104433 838858041 83 Linux
Befehl (m für Hilfe): w
Die Partitionstabelle wurde verändert!
Rufe ioctl() um Partitionstabelle neu einzulesen.
WARNING: Re-reading the partition table failed with error 16: Das Gerät oder die Ressource ist belegt.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Synchronisiere Platten.


[root@kot ~]# resize2fs /dev/sdb1
resize2fs 1.41.12 (17-May-2010)
Das Dateisystem auf /dev/sdb1 ist auf /usr2 eingehängt; Online-Grössenveränderung nötig
old desc_blocks = 26, new_desc_blocks = 50
Führe eine Online-Grössenänderung von /dev/sdb1 auf 209714510 (4k) Blöcke durch.
Das Dateisystem auf /dev/sdb1 ist nun 209714510 Blöcke groß.
[root@kot ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 50G 3,2G 44G 7% /
tmpfs 16G 156K 16G 1% /dev/shm
/dev/sda1 1,5G 33M 1,4G 3% /boot
/dev/sda3 32G 672M 30G 3% /var
/dev/sdb1 788G 30G 718G 4% /usr

Youtube Partner Program

Today we are announcing changes to the YouTube Partner Program (YPP). While our goal remains to keep the YPP open to as many channels as possible, we recognize we need more safeguards in place to protect creator revenue across the YouTube ecosystem.
What’s Changing
Under the new eligibility requirements announced today, your YouTube channel, untony, is no longer eligible for monetization because it doesn’t meet the new threshold of 4,000 hours of watchtime within the past 12 months and 1,000 subscribers. As a result, your channel will lose access to all monetization tools and features associated with the YouTube Partner Program on February 20, 2018 unless you surpass this threshold in the next 30 days. Accordingly, this email serves as 30 days notice that your YouTube Partner Program terms are terminated.
One of YouTube’s core values is to provide anyone the opportunity to earn money from a thriving channel. Creators who haven’t yet reached this new threshold can continue to benefit from our Creator Academy, our Help Center, and all the resources on the Creator Site to grow their channels. Once your channel reaches the new threshold, it will be reviewed to make sure it adheres to our policies and guidelines, and if so, monetization will be re-enabled.
The YouTube Team


The threshold of 4000 hours wouldnt be a problem, but I dont have 1000 subscribers. So the time is over for me earning money via youtube.