ubuntu

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.

AX88772A Fast Ethernet USB Adapter

Set fixed ethernet device
cat <> /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ATTR{address}=="00:11:22:33:44:55",KERNEL=="eth*", NAME="eth1"
EOF

Configure IP
cat <> /etc/network/interfaces
auto eth1
iface eth1 inet dhcp
EOF

lsusb
...
Bus 002 Device 003: ID 0b95:772a ASIX Electronics Corp. AX88772A Fast Ethernet
...

lsmod | grep asix
asix 27650 0
usbnet 31879 1 asix

Perfomance

XEN: Install Hypervisor (Dom0) under Debian

wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/installit/master/install.xen.sh -O - | bash -

#!/bin/bash

if [ "$(lsb_release -is)" == "Ubuntu" ]; then
 # install Ubuntu xen kernel
 apt-get install -y xen-system-amd64 xen-tools
 
  # create network bridge
 sed -i 's|auto eth0|#auto eth0|g' /etc/network/interfaces
 sed -i 's|iface eth0 inet dhcp|#iface eth0 inet dhcp|g' /etc/network/interfaces

 cat <<EOF>> /etc/network/interfaces
auto xenbr0
iface xenbr0 inet dhcp
  bridge_ports eth0
EOF
else 
 # install Debian xen kernel
 apt-get install -y xen-linux-system xen-tools debootstrap
 
 # OPTINAL: install qemu for HVM guests
 . /etc/os-release
 if [ ${VERSION_ID} -lt 7 ]; then
    apt-get install -y xen-qemu-dm-4.0
 fi
 
 # Workaround for wheezy "powernow-k8: transition frequency failed" 
 if [[ "$(uname -r)" == *3.2.0* ]]; then
  echo "blacklist powernow_k8" >> /etc/modprobe.d/blacklist.conf
 fi
fi

# configure grub to start xen kernel
dpkg-divert --divert /etc/grub.d/09_linux_xen --rename /etc/grub.d/20_linux_xen
if [ $(grep -c GRUB_DISABLE_OS_PROBER /etc/default/grub) -eq 0 ]; then
    echo "GRUB_DISABLE_OS_PROBER=true" >> /etc/default/grub
fi
update-grub

# OPTIONAL: configure memory for dom0
if [ $(grep -c GRUB_CMDLINE_XEN /etc/default/grub) -eq 0 ]; then
    echo GRUB_CMDLINE_XEN=\"\" >> /etc/default/grub
fi
sed -i 's|GRUB_CMDLINE_XEN="|GRUB_CMDLINE_XEN="dom0_mem=512M |g' /etc/default/grub
sed -i 's|(enable-dom0-ballooning yes)|(enable-dom0-ballooning no)|g' /etc/xen/xend-config.sxp
update-grub
 
# configure network bridge
sed -i 's|# (network-script network-bridge)|(network-script network-bridge)|g' /etc/xen/xend-config.sxp
 
# dont save domU, just shutdown
sed -i 's|XENDOMAINS_SAVE=/var/lib/xen/save|XENDOMAINS_SAVE="" |g' /etc/default/xendomains
sed -i 's|XENDOMAINS_RESTORE=true|XENDOMAINS_RESTORE=false |g' /etc/default/xendomains
 
# create dir for domU autostart
[ -d /etc/xen/auto ] || mkdir /etc/xen/auto
 
# set more cpu time for dom0
sed -i '$ i\xm sched-credit -d Domain-0 -w 512' /etc/rc.local

# FIX for first generatio Athlon / Opteron AMD CPUs
if [[ $(cat /proc/cpuinfo | grep 'model name' | cut -d':' -f2) =~ AMD.*(Athlon.*64.*Processor|Opteron.*185) ]]; then
   sed -i 's|GRUB_CMDLINE_XEN="|GRUB_CMDLINE_XEN="allow_unsafe |g' /etc/default/grub
   update-grub
fi

# clean up blanks
sed -i 's| "|"|g' /etc/default/grub

Enable XL toolstacks
sed -i 's|TOOLSTACK=|TOOLSTACK=xl|g' /etc/default/xen

configure perfomance
http://wiki.xen.org/wiki/Credit_Scheduler
xm sched-credit
xm sched-credit -d www -w 512

# OPTIONAL: sync time
apt-get install -y ntpdate
ntpdate ntp.ubuntu.com
hwclock --systohc
rm /etc/cron.daily/ntpdate

# updae bootstrap
http://www.panticz.de/update_debootstrap

# manually update xen-create-image
wget http://ftp.de.debian.org/debian/pool/main/x/xen-tools/xen-tools_4.3.1-1_all.deb -O /tmp/xen-tools_4.3.1-1_all.deb
dpkg -x /tmp/xen-tools_4.3.1-1_all.deb /tmp/
mv /usr/bin/xen-create-image /usr/bin/xen-create-image.org
cp /tmp/usr/bin/xen-create-image /usr/bin/xen-create-image

# OPTIONAL: enable ip forward in dom0
cp /etc/sysctl.conf /etc/sysctl.conf.org
sed -i 's|#net.ipv4.ip_forward=1|net.ipv4.ip_forward=1|g' /etc/sysctl.conf

# OPTIONAL: PCI delegation
http://www.panticz.de/xen_pci_delegation

# reboot
reboot

# Ubuntu Xen Dom0
apt-get install -y xen-hypervisor-4.2-amd64 xen-tools

# LINKS
http://wiki.debian.org/Xen
http://wiki.xensource.com/xenwiki/XenBestPractices
http://www.panticz.de/configure_network_bridge
http://www.panticz.de/update_debootstrap
http://www.chrisk.de/blog/2008/12/how-to-run-xen-in-ubuntu-intrepid-without-compiling-a-kernel-by-yourself/
http://wiki.debian.org/Xen
https://help.ubuntu.com/community/Xen

Update Ubuntu PXE files

Update pxe configuration
wget http://installit.googlecode.com/hg/preseed/preseed.squeeze.amd64.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.squeeze.amd64.conf
wget http://installit.googlecode.com/hg/preseed/preseed.wheezy.amd64.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.wheezy.amd64.conf
wget http://installit.googlecode.com/hg/preseed/preseed.precise.i386.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.precise.i386.conf
wget http://installit.googlecode.com/hg/preseed/preseed.precise.amd64.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.precise.amd64.conf

Install Scribus under Ubuntu

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

#!/bin/bash
cat < /etc/apt/sources.list.d/scribus.list
deb http://debian.scribus.net/debian/ raring main
deb http://debian.tagancha.org/debian/ raring main
EOF

sudo gpg --keyserver wwwkeys.pgp.net --recv-keys EEF818CF
sudo gpg --armor --export EEF818CF | sudo apt-key add -

sudo apt-get update
sudo apt-get install -y --force-yes scribus

sudo apt-get remove qt-at-spi

Links
http://wiki.scribus.net/canvas/Debian

Install SQuirreL SQL

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

#!/bin/bash

# download link
URL=http://switch.dl.sourceforge.net/project/squirrel-sql/1-stable/3.5.0-plainzip/squirrel-sql-3.5.0-standard.tar.gz

# install Java JRE
wget http://installit.googlecode.com/hg/install.java-jre.sh -O - | bash -

# download
wget ${URL} -O /tmp/squirrel-sql-3.5.0-standard.tar.gz

# extract
sudo tar xzf /tmp/squirrel-sql-3.5.0-standard.tar.gz -C /usr/lib/
sudo chown root:root -R /usr/lib/squirrel-sql
sudo chmod +r -R /usr/lib/squirrel-sql
sudo ln -s /usr/lib/squirrel-sql-3.5.0-standard /usr/lib/squirrel-sql

# create starter
cat <<EOF> /tmp/squirrel-sql.desktop
[Desktop Entry]
Name=SQuirreL SQL
Comment=SQuirreL SQL Client
Exec=/usr/lib/squirrel-sql-3.5.0-standard/squirrel-sql.sh
Icon=/usr/lib/squirrel-sql-3.5.0-standard/icons/acorn.xpm
Terminal=false
Type=Application
Categories=GTK;Database;Development;Application
EOF

sudo mv /tmp/squirrel-sql.desktop /usr/share/applications/squirrel-sql.desktop
sudo chmod +r /usr/share/applications/squirrel-sql.desktop

# cleanup
rm /tmp/squirrel-sql-3.5.0-standard.tar.gz

LTSP Nvidia thin client

# build client (copy of default amd64 image)
# backup amd64-nvidia
tar czf /opt/ltsp/amd64-nvidia.bkp.$(date -I).tar.gz /opt/ltsp/amd64-nvidia
cp /opt/ltsp/images/amd64-nvidia.img /opt/ltsp/images/amd64-nvidia.img.bkp.$(date -I)

# copy amd64 to amd64-nvidia
rm -r /opt/ltsp/amd64-nvidia/
cp -a /opt/ltsp/amd64/ /opt/ltsp/amd64-nvidia

# install nvidia driver
export LTSP_HANDLE_DAEMONS=false
ltsp-chroot -p -a amd64-nvidia
LANG=en_US.UTF-8
# apt-get update -y
# apt-get install -y linux-headers-generic
# apt-get install -y nvidia-173
# apt-get install -y nvidia-304

smartmontools (smartctl)

wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/installit/master/install.smartmontools.sh -O - | bash -

#!/bin/bash

# ensure that this script is run by root
if [ $(id -u) -ne 0 ]; then
sudo $0
  exit
fi

apt-get install -y smartmontools --no-install-recommends

Enable SMART on device
sudo smartctl -s on /dev/sdb

Show device SMART Health status
sudo smartctl -H /dev/sda

Show device selftest log
smartctl -l selftest /dev/sdb

Get info from usb data
sudo smartctl -d sat -a /dev/sdb

Test
smartctl -t short /dev/sdb
smartctl -t offline /dev/sdb

Calculate total writen GB from a SSD
echo "Total GB written: $(echo "scale=3; $(sudo /usr/sbin/smartctl -A /dev/sda | grep "Total_LBAs_Written" | awk '{print $10}') * 512 / $((1024*1024*1024))" | bc)"

Links
http://sourceforge.net/apps/trac/smartmontools/wiki/Supported_USB-Devices

HowTo: Compile Nautilus

Install compiled 64bit version
wget http://dl.panticz.de/nautilus/nautilus_3.2.1-0ubuntu3.1_amd64.deb
sudo dpkg -i /tmp/nautilus_3.2.1-0ubuntu3.1_amd64.deb
nautilus -q

Automatic installation script
wget http://dl.panticz.de/scripts/rebuild.nautilus.sh -O - | bash -

#!/bin/bash

cd /usr/src/
sudo apt-get install -y dpkg-dev
sudo apt-get source nautilus
sudo apt-get -y build-dep nautilus
sudo sed -i 's|gtk_toolbar_insert (GTK_TOOLBAR (self->priv->toolbar), item, 0);|gtk_toolbar_insert (GTK_TOOLBAR (self->priv->toolbar), item, 2);|g' nautilus-*/src/nautilus-toolbar.c
cd ./nautilus-*/
sudo dpkg-buildpackage -us -uc -b
sudo dpkg -i /usr/share/nautilus_*-0ubuntu*.deb
nautilus -q

Links
http://www.omgubuntu.co.uk/2011/12/how-to-move-nautilus-navigation-buttons-back-to-the-left
http://ubuntuforums.org/showthread.php?p=11501676#post11501676

Toshiba Tegra AC100

# https://github.com/nthchild/ubuntu-ac100

HowTo
https://wiki.ubuntu.com/ARM/TEGRA/AC100

install nvflash (broken, download and install manually)
http://developer.download.nvidia.com/assets/mobile/files/tegra-linux-12.alpha.1.0.tar.gz
wget https://phablet-paz00.googlecode.com/files/nvflash_20110628-2_all.deb -O /tmp/nvflash_20110628-2_all.deb
sudo dpkg -i /tmp/nvflash_20110628-2_all.deb

get bootrom
# wget http://cdimage.ubuntu.com/lubuntu/releases/quantal/release/lubuntu-12.10-preinstalled-desktop-armhf+ac100.bootimg -O /tmp/ac100.bootimg
# wget http://cdimage.ubuntu.com/releases/12.04/release/ubuntu-12.04-preinstalled-desktop-armhf+ac100.bootimg -O /tmp/ac100.bootimg
wget http://cdimage.ubuntu.com/lubuntu/daily-preinstalled/pending/trusty-preinstalled-desktop-armhf+ac100.bootimg -O /tmp/ac100.bootimg

flash bootrom
# Connect the USB cable between your AC100 and the host PC
# Press CTRL and ESC keys and power on your AC100
sudo nvflash --bl /usr/lib/nvflash/fastboot.bin --download 6 /tmp/ac100.bootimg
# poweroff
# poweron

download image
sudo mount /dev/sdb1 /mnt

# wget http://cdimage.ubuntu.com/lubuntu/releases/quantal/release/lubuntu-12.10-preinstalled-desktop-armhf+ac100.tar.gz -P /mnt/
# wget http://cdimage.ubuntu.com/releases/12.04/release/ubuntu-12.04-preinstalled-desktop-armhf+ac100.tar.gz -P /mnt/
wget http://cdimage.ubuntu.com/lubuntu/daily-preinstalled/pending/trusty-preinstalled-desktop-armhf+ac100.tar.gz -O /tmp/trusty-preinstalled-desktop-armhf+ac100.tar.gz

sudo umount /mnt

# OPTIONAL configuration
wget https://raw.githubusercontent.com/panticz/installit/master/hardware/ac100.postinstall.sh -O - | sudo bash -

#!/bin/bash

# update packages
sudo apt-get update
sudo apt-get -y dist-upgrade

# configure german keyboard
sudo sed -i 's|XKBLAYOUT="us"|XKBLAYOUT="de"|g' /etc/default/keyboard



# disable unnececery services 
sudo update-rc.d -f avahi-daemon remove
sudo update-rc.d -f bluetooth remove

sudo mkdir /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/orca-autostart.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/vino-server.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/bluetooth-applet.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/bluetooth-applet-unity.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/jockey-gtk.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/deja-dup-monitor.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/onboard-autostart.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/user-dirs-update-gtk.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/ubuntuone-launch.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/update-notifier.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/gnome-user-share.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/telepathy-indicator.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/gwibber.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/gdu-notification-daemon.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/zeitgeist-datahub.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/pulseaudio-kde.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/print-applet.desktop /etc/xdg/autostart/disabled
sudo mv /etc/xdg/autostart/nautilus-autostart.desktop /etc/xdg/autostart/disabled


# remove unnecessary apps
sudo apt-get remove -y gnome-screensaver
sudo apt-get remove -y gnome-orca onboard
sudo apt-get remove -y brasero
sudo apt-get remove -y zeitgeist
sudo apt-get remove -y rhythmbox
sudo apt-get remove -y unity
sudo apt-get remove -y totem

# install extra apps
sudo apt-get install -y language-pack-de language-pack-gnome-de
sudo apt-get install -y thunderbird-locale-de thunderbird-locale-en hunspell-de-de hunspell-en-us
sudo apt-get install -y openvpn network-manager-openvpn
sudo apt-get install -y language-pack-de-base
sudo apt-get install -y sshfs vlc 




#
# ubuntu 12.04 (gnome)
#
# configure repository
cat < /etc/apt/sources.list
deb http://ports.ubuntu.com/ubuntu-ports/ precise main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ precise-security main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ precise-updates main restricted universe multiverse
#deb http://ports.ubuntu.com/ubuntu-ports/ precise-proposed main restricted universe multiverse
EOF

# install gnome classic
wget http://installit.googlecode.com/hg/install.gnome-fallback.sh -O - | bash -

gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults/ -t boolean -s /apps/gnome-screensaver/idle_activation_enabled false
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults/ -t boolean -s /apps/gnome-power-manager/lock_on_blank_screen false
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults/ -t -s /apps/gnome-power-manager/lock_use_screensaver_settings false
#gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'
#gsettings set org.gnome.power-manager lock-use-screensaver 'false'

# configure nautilus (broken ?)
sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults/ -t string -s /apps/nautilus/preferences/default_folder_viewer 'list_view'
sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults/ -t string -s /apps/nautilus/list_view/default_zoom_level smallest
sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults/ -t string -s /apps/nautilus/preferences/show_directory_item_counts never


#
# ubuntu 12.10 (lxdm)
#
# install nvidia driver
if [ $(lsb_release -rs | tr -d ".") -ge 1210 ]; then
    wget http://flie.no-ip.org:7080/ac100/deb/nvidia-tegra-ventana-codecs_16.0.0-0ubuntu1_armhf.deb
    wget https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-tegra/16.2.0-0ubuntu3/+build/3907865/+files/nvidia-tegra_16.2.0-0ubuntu3_armhf.deb
    sudo dpkg -i nvidia-tegra_16.2.0-0ubuntu3_armhf.deb nvidia-tegra-ventana-codecs_16.0.0-0ubuntu1_armhf.deb
fi

# clean up
sudo apt-get -y autoremove
sudo apt-get clean

echo "*** ac100 postinstall done, reboot in 30 sec ***"
sleep 30

sudo reboot


# todo
# autologin
# remove screen lock
# nvidia tegra graphic
#dpkg -i Downloads/nvidia-tegra_12~beta1-0ubuntu1_armel.deb
1

Ubuntu images for AC100
http://cdimage.ubuntu.com/releases/11.10/release/
http://cdimage.ubuntu.com/releases/12.04/beta-2/
http://cdimage.ubuntu.com/daily-preinstalled/current/

Links
http://cdimage.ubuntu.com/lubuntu/daily-preinstalled/current/
http://ac100.grandou.net/hw_accelerated_video_playback - Ubuntu 12.10 / 12.04 Nvidia graphic driver for Toshiba AC100
http://wiki.informatik.hu-berlin.de/nomads/index.php/Erfahrungsbericht_Toshiba_AC100#Nvidia_Grafiktreiber_f.C3.BCr_Tegra_2
http://ac100.grandou.net/
http://ac100.grandou.net/nvflash#debian_ubuntu_package - NvFlash
http://ac100.grandou.net/ubuntu_deubuntuization
http://developer.nvidia.com/content/linux-tegra-release-12-alpha-1-released
http://ac100.grandou.net/apps

Accelated Video
wget http://launchpadlibrarian.net/118260107/linux-image-3.1.10-6-ac100_3.1.10-6.9_armhf.deb
wget http://flie.no-ip.org:7080/ac100/deb/nvidia-tegra_16.1.0-0ubuntu3~fly2_armhf.deb
sudo dpkg -i linux-image-3.1.10-6-ac100_3.1.10-6.9_armhf.deb nvidia-tegra_16.1.0-0ubuntu3~fly2_armhf.deb

http://ac100.grandou.net/hw_accelerated_video_playback
nvgstplayer -i "file://$1" --svs="nvxvimagesink" --sas="nv_omx_audiosink"

Java Linux ARM v6/v7 VFP
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

# axis
http://ports.ubuntu.com/pool/multiverse/a/axe/axe_6.1.2-16.2_armhf.deb
http://ports.ubuntu.com/ubuntu-ports/pool/universe/t/tk8.6/tk8.6-lib_8.6.0-1ubuntu1_armhf.deb

# kali
http://cdimage.kali.org/kali-latest/armhf/

# old
sudo echo "deb http://people.debian.org/~jak/ac100/ unreleased main non-free" > /etc/apt/sources.list.d/people.debian.org.jak.ac100.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AC2A5FFE00823EC2
sudo apt-get update
sudo apt-get -y --force-yes install xserver-xorg-video-tegra

wget https://launchpad.net/~canonical-arm-dev/+archive/ppa/+build/2610299/+files/nvidia-tegra_12-0ubuntu1~alpha1monson6_armel.deb -O /tmp/nvidia-tegra_12-0ubuntu1~alpha1monson6_armel.deb
sudo dpkg -i /tmp/nvidia-tegra_12-0ubuntu1~alpha1monson6_armel.deb

Install Handbrake

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

#!/bin/bash

sudo apt-add-repository -y ppa:stebbins/handbrake-snapshots
sudo apt-get update -qq
sudo apt-get install -y handbrake-cli handbrake-gtk

Syndicate content