linux

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

Install VLC player

wget https://raw.githubusercontent.com/panticz/installit/master/install.vlc.sh -O - | bash -

#!/bin/bash

if [ "$1" == "-n" ]; then
  sudo add-apt-repository -y ppa:videolan/stable-daily
  sudo apt-get update
fi

sudo apt-get install -y vlc
sudo apt-get install -y vlc-plugin-pulse
sudo apt-get install -y browser-plugin-vlc

# set vnc as default media player
sudo sed -i 's|totem.desktop|vlc.desktop|g' /etc/gnome/defaults.list

Zenity

delete files with auto close message
rm /media/CAMCARD/DCIM/100NIKON/*.JPG; sync; sleep 1 | zenity --title CleanCAMCARD --progress --auto-close

view message
zenity --info --text "blah"

GeeXbox USB boot (GeeXbox Live CD boot from USB)

#!/bin/bash
 
apt-get install syslinux mbr
 
# optionaly
# mkfs.vfat -n RALLY2 /dev/sdb1
 
install-mbr /dev/sdb
syslinux -f /dev/sdb1
 
sudo mount geexbox-devel-20080507-en.i386.iso /mnt/ -o loop
cp -a /mnt/GEEXBOX/ /media/RALLY2/
sudo umount /mnt
 
cat <<EOF>> /media/RALLY2/syslinux.cfg
LABEL geexbox_hdtv
MENU LABEL Start GeeXboX for HDTV ...
KERNEL /GEEXBOX/boot/vmlinuz
APPEND initrd=/GEEXBOX/boot/initrd.gz root=/dev/ram0 rw rdinit=linuxrc boot=sdb1 lang=en remote=atiusb receiver=atiusb keymap=qwerty splash=silent vga=789 video=vesafb:ywrap,mtrr hdtv
 
LABEL geexbox_hdtv_de

Create printer on command line

List all installed printer
lpstat -p -d

Kyocera FS-C5016N
lpadmin -p LaserColor -v ipp://192.168.1.11:631/ipp -E -P /usr/share/ppd/openprinting/Kyocera/en/Kyocera_Mita_FS-C5016N_en.ppd.gz

PDF Printer
sudo sudo apt-get install -y cups-pdf
#sudo lpadmin -p PDF -v cups-pdf:/ -E -P /usr/share/ppd/cups-included/postscript.ppd
#/usr/share/ppd/cups-pdf/PostscriptColor.ppd

Define default prnter
lpadmin -d printer1

LVM

vgs - Display information about volume groups (free space etc.)
lvs - Display information about logical volumes
lvdisplay - display attributes of a logical volume
lvremove - remove a logical volume

install
apt-get intall -y lvm2

create volume group
pvcreate /dev/md1
vgcreate vg2 /dev/md1
pvdisplay

create lvm volume
lvcreate --name VOLUME_NAME --size 4G vg2
# lvcreate -n NAME -l 100%FREE vg0
mkfs.ext3 /dev/vg2/VOLUME_NAME

renamee lvm
lvrename /dev/vg01/mx-swap /dev/vg01/mx-swap.org

Create XEN Hylafax domain

# redirect your ISDN card on dom0
http://www.panticz.de/xen_pci_delegation
 
# set domU parameter
[ -z $DOMAIN_NAME ] && DOMAIN_NAME=fax
[ -z $DOMAIN_MAC ] && DOMAIN_MAC=00:00:00:00:fa:fa
[ -z $DOMAIN_RAM ] && DOMAIN_RAM=256Mb
[ -z $DOMAIN_HDD ] && DOMAIN_HDD=2Gb
[ -z $DOMAIN_PCI ] && DOMAIN_PCI=04:05.0
 
# create domU
http://www.panticz.de/DomU-Debian-Squeeze
 
# redirect avm usb card
echo "pci=['${DOMAIN_PCI}']" >> /etc/xen/${DOMAIN_NAME}
echo "extra = 'iommu=soft'" >> /etc/xen/${DOMAIN_NAME}
 
# start domU
xm create -c ${DOMAIN_NAME}
 
# install AVM FRITZ!Card PCI kernel moud

AVM FRITZ!Card USB v2.x

# install apps
apt-get install -y linux-restricted-modules linux-ubuntu-modules-$(uname -r) avm-fritz-firmware
modprobe capidrv
modprobe capi

# avm firmware
wget http://mirrors.kernel.org/ubuntu/pool/restricted/l/linux-meta/avm-fritz-firmware_2.6.24.24.26_amd64.deb -P /tmp

Ubuntu Gutsy fcusb2 kernel modules
fcusb2.tar.bz2

Links
http://wiki.ubuntuusers.de/Archiv/ISDN-Karten/AVM_FRITZ!Card_USB

Ubuntu LiveCD PXE boot (Ubuntu Live CD boot from network)

DEFAULT_URL=http://releases.ubuntu.com/releases/12.04/ubuntu-12.04-desktop-i386.iso
NFS_SERVER=192.168.1.9
 
if [ ! -z $1 ]; then
        FILE=$1
 
        if [ !

PCI Delegation in Xen (Xen Pci Passthrough)

#
# Debian 7
#
# add xen-pciback to initrd
echo "xen-pciback" >> /etc/modules
update-initramfs -u
 
# hide device (module and pciid have to be adapted)
cat <<EOF> /etc/modprobe.d/xen-pciback.conf 
install e100 modprobe xen-pciback; modprobe --first-time --ignore-install e100
options xen-pciback hide=(00:0c.0)
EOF
 
# test
xm pci-list-assignable-devices
 
# Links
http://wiki.xen.org/wiki/Assign_Hardware_to_DomU_with_PCIBack_as_module
http://debianforum.de/forum/viewtopic.php?f=32&t=139776
http://nixnote.blogspot.de/2012/03/xen-part-9-pci-passthrough.html
http://wiki.xen.org/wik

Compile Ubuntu kernel

apt-get install fakeroot build-essential makedumpfile ncurses-dev
 
cd /usr/src
?? apt-get build-dep linux-image-$(uname -r)
apt-get source linux-image-$(uname -r)
 
?? apt-get build-dep linux-ubuntu-modules-$(uname -r)
??
Syndicate content