linux

preseed

#d-i mirror/suite string unstable

http://dl.dropbox.com/u/4170695/preseed/preseed.upnp.seed - install UPnP server

DataLogic QuickScan QS6500 with Ubuntu as USB Keyboard

download configuration codes
https://easeofaccess.scanning.datalogic.com/public/marketlit/Send.aspx?file=R44-2816A

reset to factory default (Page 3)
scan: Return handheld to factory defaults

configure as USB Keyboard
Interface Selection (Page 30 / 33)
scan: START
scan: USB Keyboard
scan: END

OPTIONAL, configure Keyboard Layout (Page 53 / 54)
scan: START
scan: Germany
scan: END

OPTIONAL, enable Interleaved 2 of 5 - continued (for DHL package barcodes)
Interface Selection (Page 169)

Kernel options

from Documentation/kernel-parameters.txt

vga=xxx
set your framebuffer resolution to VESA mode xxx. (http://en.wikipedia.org/wiki/VESA_BIOS_Extensions#Linux_video_mode_numbers)

acpi=off OR noacpi
This parameter disables the whole ACPI system. This may prove very useful, for example, if your computer does not support ACPI or if you think the ACPI implementation might cause some problems (for instance random reboots or system lockups)

acpi=force

SheevaPlug HDD susped with hdparm (Hard drive sleep mode)

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

TechnoTrend Connect S2-3600 (USB DVB-S2 sat reciver) with Ubuntu 9.10

### DRIVER BROKEN??? (MY) RECIVER DONT GET ANY SIGNAL...

Linux ramdisk

dd if=/dev/zero of=/dev/ram bs=1M count=768
 
mkfs -t ext2 -m 0 /dev/ram
 
mkdir /tmp/ramdisk
mount /dev/ram /tmp/ramdisk -o loop
 
umount /tmp/ramdisk
 
 
# Linsk
http://wiki.ubuntuusers.de/RAM-Disk_erstellen - HowTo create Ramdisk
http://www.aleph1.co.uk/oldsite/armlinux/book/mkramdisk.html

MySql Tunel

apt-get install mysql-admin
 
# create tunel
ssh root@192.168.1.88 -L 3306:localhost:3306
 
# connect
mysql-admin -u magento -p magento -h 127.0.0.1
 
# Links
http://gss-konstanz.de/8-kerne-und-nen-typ/2007/10/26/windows-als-gastsystem-in-debian-xen/

Configure Dnsmasq (Routing between two networks)

# install
apt-get install dnsmasq
 
# configure
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o ! lo -j MASQUERADE
 
# restart
/etc/init.d/dnsmasq start

Create c't Debian Server installation USB pen (ctsrv4stick)

sudo su
 
DEVICE=/dev/sdb
VOLUME=ctsrv4stick
 
# mount usb
umount ${DEVICE}1
 
# create filesystem on usb pen
mkfs.vfat -n ${VOLUME} ${DEVICE}1
 
# mount usb
mount ${DEVICE}1 /mnt/
 
# install syslinux and make stick bootable
install-mbr ${DEVICE}
syslinux -f ${DEVICE}1
 
# unzip support files from ct dvd
unzip /media/ctsw0905/support/stickins.zip -d /mnt/
 
# create exclude list
cat <<EOF> /tmp/exclude.lst
/media/ctsw0905/bilder
/media/ctsw0905/html
/media/ctsw0905/scrshots
/media/ctsw0905/software
/media/ctsw0905/tools
/media/ctsw0905/video2brain
EOF
 
# create iso fro

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

MultiBoot USB with Grub2 (boot directly from iso files)

DEVICE=/dev/sdb
VOLUME=MultiBootUSB
 
 
# create filesystem on usb pen
sudo mkfs.vfat -n ${VOLUME} ${DEVICE}1
 
 
# mount usb
mount ${DEVICE}1 /mnt/
 
 
# install grub2 on usb pen
grub-install --no-floppy --root-directory=/mnt ${DEVICE}
 
 
# create grub config
cat <<EOF> /mnt/boot/grub/grub.cfg
menuentry "Ubuntu Live 9.10 32bit" {
 loopback loop /boot/iso/ubuntu-9.10-desktop-i386.iso
 linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/ubuntu-9.10-desktop-i386.iso noeject noprompt --
 initrd (loop)/casper/initrd.lz
}
 
menuentry "Ubuntu Live 9.10 64bit" {
 loo

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/

rebootAllPhones.sh

#!/bin/bash
 
for IP in {210..217}; do
	echo Rebooting ${IP}
	wget -q -O /dev/null -o /dev/null http://192.168.1.${IP}/confirm.htm?REBOOT=yes &
done

Fax client (YajHFC)

# Homepage
http://yajhfc.berlios.de
 
#URL=http://download.berlios.de/yajhfc/yajhfc-0_4_0.jar
URL=http://download.berlios.de/yajhfc/yajhfc-0_4_2a.jar
 
# download
wget ${URL} -P /tmp
 
# fix me
sudo su
 
# install
mkdir /usr/share/yajhfc
cp /tmp/yajhfc-*.jar /usr/share/yajhfc/yajhfc.jar
 
# extract icon
cd /tmp
unzip /tmp/yajhfc-*.jar
cp /tmp/yajhfc/icon.png /usr/share/yajhfc
 
# create menu entry
cat <<EOF> "/usr/share/applications/YajHFC.desktop"
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=YajHFC Fax
Type=Application
Terminal=false
Exec=java -jar /usr/share/yajhfc/

getUniqueFirstLetter.sh

#!/bin/bash
 
FILE=/tmp.$$.out
 
for i in $(ls); do
	echo ${i:0:1} >> ${FILE} 
done
 
cat ${FILE} | sort | uniq
rm ${FILE}

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

Do you like this page? Then support it. Please click the AD below and visit the sponsor. Thank you!

Syndicate content