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.

Ubuntu repository list

## Main
deb http://archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse

## Updates
deb http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse

## Backports
deb http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse

## Proposed

upstart

cat <<EOF> /etc/init/cdromrun.conf
start on started tty1
#start on runlevel 2
stop on runlevel [!2]
 
console output
 
script
   [ -f /cdrom/run ] && exec /cdrom/run
end script
EOF
 
# Links
http://upstart.ubuntu.com/cookbook/
http://upstart.ubuntu.com/getting-started.html
http://wiki.frugalware.org/index.php/Upstart_Job_HOWTO

SheevaPlug HDD susped with hdparm (Hard drive sleep mode)

sudo apt-get install -y hdparm
 
cat <<EOF>> /etc/hdparm.conf
/dev/sda {
   spindown_time = 240
}
EOF

Ubuntu Trusty DomU

# configure domU
[ -z $DOMAIN_NAME ] && DOMAIN_NAME=trusty
[ -z $DOMAIN_MAC ] && DOMAIN_MAC=00:00:00:00:aa:bb
[ -z $DOMAIN_RAM ] && DOMAIN_RAM=1Gb
[ -z $DOMAIN_HDD ] && DOMAIN_HDD=8Gb
 
# create domU on LVM (for image file use --dir=/root,)
xen-create-image \
--hostname=${DOMAIN_NAME} \
--dist=trusty \
--lvm=vg1 \
--fs=ext4 \
--dhcp \
--mac=${DOMAIN_MAC} \
--mirror=http://archive.ubuntu.com/ubuntu \
--size=${DOMAIN_HDD} \
--memory=${DOMAIN_RAM} \
--swap=${DOMAIN_RAM}
--genpass=0 \
--password=t00r \
--apt_proxy=http://apt-cacher:3142/ \
--vcpus $(cat /proc/cpuinfo | grep pro

Ubuntu emergency LiveCD from harddisk (boot from iso file)

sudo su
 
mkdir /boot/iso
wget http://cdimage.ubuntu.com/daily-live/current/karmic-desktop-i386.iso -P /boot/iso
 
cat <<EOF>> /boot/grub/grub.cfg
menuentry "Ubuntu LiveCD" {
 loopback loop /boot/iso/karmic-desktop-i386.iso
 linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/karmic-desktop-i386.iso noprompt --
 initrd (loop)/casper/initrd.lz
}
EOF

Automatically move photos from memory card to hard drive with udev

# create udev rule
cat <<EOF> /etc/udev/rules.d/70-persistent-dcim.rules
KERNEL=="sd*1",SUBSYSTEM=="block",ATTR{partition}=="1",ACTION=="add",RUN+="/usr/sbin/mvdcim.sh \$KERNEL"
EOF
 
# create mvdcim.sh script
cat <<EOF> /usr/sbin/mvdcim.sh  
#!/bin/bash
 
DEVICE=/dev/\${1}
SOURCE=/mnt/DCIM/100NIKON
TARGET=/home/hafr/dcim
 
mount \${DEVICE} /mnt
if [ -d \${SOURCE} ]; then
        mv \${SOURCE}/*.jpg \${TARGET}         
        chmod 666 \${TARGET}/*.jpg
        eject \${DEVICE}
else
        umount /mnt
fi
EOF
chmod +x /usr/sbin/mvdcim.sh
 
 
# monitor changes (optional)
ud

HTTrack - Open Source webspider

apt-get install webhttrack
 
# Links
http://debian.httrack.com/

Ubuntu One Beta

#!/bin/bash
 
# add reopsitory
cat <<EOF> /etc/apt/sources.list.d/ubuntuone-beta-sources.list
deb http://ppa.launchpad.net/ubuntuone/beta/ubuntu jaunty main
deb-src http://ppa.launchpad.net/ubuntuone/beta/ubuntu jaunty main
EOF
 
# update
apt-get update
 
# install
#?# apt-get install -y ubuntuone-ppa-beta
apt-get install -y ubuntuone-client
 
 
# Links
https://ubuntuone.com/support/installation/

Ubuntu Jaunty domU under Debian Lenny Dom0

# configure domU
[ -z $DOMAIN_NAME ] && DOMAIN_NAME=jaunty
[ -z $DOMAIN_MAC ] && DOMAIN_MAC=00:00:00:00:aa:bb
[ -z $DOMAIN_RAM ] && DOMAIN_RAM=512Mb
[ -z $DOMAIN_HDD ] && DOMAIN_HDD=4Gb
 
# create vm
xen-create-image --hostname=${DOMAIN_NAME} --dhcp --mac=${DOMAIN_MAC} \
--lvm=vg01 --dist=jaunty --mirror=http://archive.ubuntu.com/ubuntu --size=${DOMAIN_HDD} --memory=${DOMAIN_RAM} --swap=${DOMAIN_RAM}
 
# rename vm config
mv /etc/xen/${DOMAIN_NAME}.cfg /etc/xen/${DOMAIN_NAME}
 
# post config domU
mount /dev/vg01/${DOMAIN_NAME}-disk /mnt/
# configure hvc0
sed -i 's|tty1|hvc0|g' /mnt
Syndicate content