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.

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

Default Debian DomU

# configure domU
[ -z $DOMAIN_NAME ] && DOMAIN_NAME=lenny
[ -z $DOMAIN_MAC ] && DOMAIN_MAC=00:00:00:00:aa:bb
[ -z $DOMAIN_RAM ] && DOMAIN_RAM=512Mb
[ -z $DOMAIN_HDD ] && DOMAIN_HDD=4Gb
 
# create domU
xen-create-image --hostname=${DOMAIN_NAME} --dhcp --mac=${DOMAIN_MAC} \
--lvm=vg01 --dist=lenny --role=udev --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/
sed -i 's|tty1|hvc0|g' /mnt/etc/inittab
chroot /mnt/ sh -c "echo root:terc

Ubuntu DVD-RAM

apt-get install dvd+rw-tools udftools
 
cat <<EOF>> /etc/fstab
/dev/pktcdvd/0     /media/dvdram   udf     defaults,noauto,user    0       0
EOF
 
cat <<EOF> /etc/default/udftools
DEVICES="/dev/sr0"
UDEV=true
NEWINT=true
EOF
 
/etc/init.d/udftools restart
 
/etc/init.d/udftools stop
#mkudffs --udfrev=0x0150 --media-type=dvdram /dev/sr0
sudo mkudffs --udfrev=0x0150 --media-type=dvdram --vid=mr_300dpi_1 --lvid=vid=mr_back_300_1 /dev/sr0
/etc/init.d/udftools start
eject
 
mount /dev/sr0 /mnt/
 
chmod 777 /mnt/
 
# format dvd-ram (optional)
dvd+rw-format -force=full -ssa=default /
Syndicate content