Sunday, April 12, 2015

Tabbed Terminal in Ubuntu

If you want to do it from the command then install xdotools.

sudo apt-get install xdotool

then type in the terminal as

xdotool key ctrl+shift+t

That will open the new tab in the terminal.

Note: type xdotool command as it is.

As additional information: To open a new tab in the current opened terminal you can press SHIFT+CTRL+T.

Changing Interface name using Udev for vmxnet3 driver type( Ubuntu)

I wanted to change the name of interface whose driver is vmxnet3 by appending X and ending with

Interface count

Use udevadm to list properties and attributes

 

root@cisco-pkt-vm:~# udevadm info -a -p /sys/class/net/eth2

looking at device '/devices/pci0000:00/0000:00:15.0/0000:03:00.0/net/Xeth2':

KERNEL=="eth2"

SUBSYSTEM=="net"

DRIVER==""

ATTR{mtu}=="1500"

ATTR{type}=="1"

ATTR{netdev_group}=="0"

ATTR{flags}=="0x1003"

ATTR{speed}=="10000"

ATTR{dormant}=="0"

ATTR{addr_assign_type}=="3"

ATTR{dev_id}=="0x0"

ATTR{duplex}=="full"

ATTR{iflink}=="2"

ATTR{addr_len}=="6"

ATTR{address}=="00:0c:29:ce:b0:11"

ATTR{operstate}=="up"

ATTR{broadcast}=="ff:ff:ff:ff:ff:ff"

ATTR{tx_queue_len}=="1000"

ATTR{ifalias}==""

ATTR{ifindex}=="2"

ATTR{link_mode}=="0"

looking at parent device '/devices/pci0000:00/0000:00:15.0/0000:03:00.0':

KERNELS=="0000:03:00.0"

SUBSYSTEMS=="pci"

DRIVERS=="vmxnet3"

ATTRS{irq}=="18"

 

 

Once we know the properties adding rules in udev.

Edit file /etc/udev/rules.d/70-persistent-net.rules

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="vmxnet3", KERNEL=="eth*", NAME="Xeth$attr{ifindex}"

 

After reboot you wil see it being eth2 being renamed to Xeth2

 

root@cisco-pkt-vm:~# ifconfig

 

Xeth2 Link encap:Ethernet HWaddr 00:0c:29:ce:b0:11

inet6 addr: fe80::20c:29ff:fece:b011/64 Scope:Link

Xeth3 Link encap:Ethernet HWaddr 00:0c:29:ce:b0:1b

collisions:0 txqueuelen:1000

RX bytes:120 (120.0 B) TX bytes:3745 (3.7 KB)

 

Xeth4 Link encap:Ethernet HWaddr 00:0c:29:ce:b0:25

inet6 addr: fe80::20c:29ff:fece:b025/64 Scope:Link

RX bytes:120 (120.0 B) TX bytes:3745 (3.7 KB)

Xeth5 Link encap:Ethernet HWaddr 00:0c:29:ce:b0:2f

inet6 addr: fe80::20c:29ff:fece:b02f/64 Scope:Link

RX bytes:120 (120.0 B) TX bytes:3745 (3.7 KB)

Installing Intel X520 CNA Card on ESX

 

1.download driver
https://my.vmware.com/group/vmware/details?downloadGroup=DT-ESXI55-INTEL-IXGBE-3214&productId=353

2.put in ESX 5.5 machine using SCP

3.run offline installiner

4.esxcli software vib install -d /[absolute_path]/ixgbe-3.21.4-offline_bundle-1710123.zip

Recovery and Restore Partition ( Freeware Alternative to Norton Ghost)

Save and Restore using partimage

partimage -b -z1 -o -d save /dev/sdb2 /recovery/trixorg.gz

partimage -b restore /dev/sda2 /recovery/trixorg.gz

1. Destination partition should be larger or same of original file even though

Space occupied is less.

2. While saving image destination partition should be mounted where you are about to store image otherwise temp error.

 

Save and Restore using fsarchiver

To save to image:

Fsarchiver –j2 –v savefs fs_trixbox /dev/hda2

To restore from image

fsarchiver –j2 –v restfs fs_trixbox.fsa id=0,dest=/dev/sda1

Featured Post

XDP - Getting Started with XDP (Linux)