Replace disk on failed linux software raid

With command:

cat /proc/mdstat

chech which disk is failed
poweroff machine, replace disk
copy partittion data from old to new disk

sfdisk -d /dev/sdb | sfdisk /dev/sda

add disk partition do raid
mdadm --manage /dev/md0 --add /dev/sda1
mdadm --manage /dev/md1 --add /dev/sda5

check resync progres

cat /proc/mdstat

Posted in Debian, HW issue, Linux tips, Mint, Ubuntu | Tagged , , , | Leave a comment

Restart freeNAS gui from CLI

login to freeNAS via ssh and enter commands:

/usr/local/etc/rc.d/nginx restart
/usr/local/etc/rc.d/django restart

 

 

Posted in freeNAS, FreePBX | Leave a comment

Install ATI drivers to Linux Mint Debian Edition LMDE

apt clean

apt update

apt reinstall build-essential module-assistant fglrx-driver fglrx-modules-dkms libgl1-fglrx-glx glx-alternative-fglrx fglrx-control fglrx-glx

sudo aticonfig –initial -f

Posted in Debian, Mint | Leave a comment

Using rsysc over SSH with custom ssh port

Using rsync over SSH connection with custom ssh port

# rsync -avz -e "ssh -p portNumber" user@server:/path_to/files/ /local_path/

 

Posted in Debian, Linux tips, Mint, Ubuntu | Tagged , , | Leave a comment

Change debian keyboard layot

How to change debian keyboard configuration, just use following command:

dpkg-reconfigure keyboard-configuration
Posted in Debian, ISPConfig 3, Linux tips, Mint, Ubuntu | Tagged , , | Leave a comment

DebianMint netboot install

1) in the “APPEND” line of the “/tftpboot/pxelinux.cfg/default” file the statement “boot=casper” must be replaced with “boot=live”.

2) make soft link: ln -s casper live  must be created:

cd /tftpboot/images/linuxmint
ln -s caspar live

 

Posted in Debian, Mint | Tagged , , , | Leave a comment

Add firmware to PXE netboot debian



mkdir pxe 
cd pxe/ 
wget ftp://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/netboot.tar.gz 
tar -xzvf netboot.tar.gz cd debian-installer/amd64/ cp initrd.gz initrd.gz.orig mkdir temp wget http://http.us.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.16_all.deb 
dpkg -x firmware-bnx2_0.16_all.deb bnx2 
cd temp zcat ../initrd.gz | cpio -iv 
cp -a ../bnx2/lib ./ rm -rf lib/modules/2.6.26-2-amd64/kernel/drivers/usb/storage 
find . -print0 | cpio -0 -H newc -ov | gzip -c > ../initrd.gz
Posted in Uncategorized | Leave a comment

How to enable Skype Icon on Unity Notification Panel on Ubuntu 12.04 LTS

just run:

gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Wine', 'Update-notifier', 'Skype']"

and then restart skype or restart ubuntu…

Posted in Linux tips, Ubuntu | Tagged , | Leave a comment

Ubuntu 12.04 – java run as in menu

The Java Runtime Environment (JRE) provides the libraries, the Java Virtual Machine, and other components to run applets and applications written in the Java programming language. In addition, two key deployment technologies are part of the JRE: Java Plug-in, which enables applets to run in popular browsers; and Java Web Start, which deploys standalone applications over a network.

If you are running the latest version of Ubuntu 12.04 LTS:

sudo apt-get purge openjdk-7-jre icedtea-7-plugin
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-jdk7-installer
Posted in Linux tips | Tagged , , | Leave a comment

Squid stats

How to check squid statistics on debian linux?

install application squidclient

apt-get install squidclient

and then execute aplilaction:

squidclient -p 3128 mgr:counters

for all options execute:

squidclient -p 3128 mgr:

Posted in Linux tips | Leave a comment