debian

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 glusterfs server

wget -q http://installit.googlecode.com/hg/install.glusterfs-server.sh -O - | bash -


  
  
  Error 404 (Not Found)!!1
  
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
  
  
  404. That’s an error.
  The requested URL /hg/install.glusterfs-server.sh was not found on this server.  That’s all we know.
1

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

Create Debian Squeeze DomU

wget https://raw.githubusercontent.com/panticz/xen/master/domains/debian.squeeze.sh -O - | bash -

#!/bin/bash

# configure domU
DOMAIN_NAME=squeeze
DOMAIN_MAC=00:09:01:01:aa:bb
DOMAIN_RAM=2Gb
DOMAIN_HDD=8Gb
 
# create domU on LVM (for image file use --dir=/root)
xen-create-image \
 --hostname=${DOMAIN_NAME} \
 --dist=squeeze \
 --lvm=vg0 \
 --size=${DOMAIN_HDD} \
 --fs=ext4 \
 --role=udev \
 --memory=${DOMAIN_RAM} \
 --swap=${DOMAIN_RAM} \
 --dhcp \
 --mac=${DOMAIN_MAC} \ 
 --genpass=0 \
 --password=t00r \
 --apt_proxy=http://apt-cacher:3142/ \
 --vcpus $(cat /proc/cpuinfo | grep processor | wc -l)
 
# rename vm config
mv /etc/xen/${DOMAIN_NAME}.cfg /etc/xen/${DOMAIN_NAME}
 
# OPTIONAL: add to autostart
ln -s /etc/xen/${DOMAIN_NAME} /etc/xen/auto
 
# start domU
xm create -c ${DOMAIN_NAME}

# disable pc speaker
echo 'blacklist snd-pcsp' >> /etc/modprobe.d/blacklist.conf

# check for updates
touch /etc/apt/apt.conf.d/10periodic
if [ $(cat /etc/apt/apt.conf.d/10periodic | grep -c Update-Package-Lists) -eq 0 ]; then
 echo 'APT::Periodic::Update-Package-Lists "1";' >> /etc/apt/apt.conf.d/10periodic
fi

# fix FQDN
sed -i "s|$(hostname) $(hostname)|$(hostname -A)$(hostname)|g" /etc/hosts
 
user: root
password: t00r

apt / dpkg

# run update
LANG=en_US.UTF-8 apt-get update -y && apt-get dist-upgrade -y && apt-get autoremove -y && apt-get clean -y

# view avaiable package version
apt-cache show wget
apt-cache madison wget

# install specific version
apt-get install package name=version
apt-get install wget=1.6

# install from specific repository
apt-get install -t squeeze-backports wget

# view available versions
apt-cache policy chromium-browser

# autoupdate
http://www.panticz.de/debian-ubuntu-automatic-upgrades

# download package
apt-get download

# list deb package dependency

Debian on SheevaPlug

# create boot disc, sd-card with vfat filesystem
wget ftp://ftp.debian.org/debian/dists/stable/main/installer-armel/current/images/kirkwood/netboot/marvell/sheevaplug/uImage
wget ftp://ftp.debian.org/debian/dists/stable/main/installer-armel/current/images/kirkwood/netboot/marvell/sheevaplug/uInitrd
 
mmc rescan
fatload mmc 0:1 0x00800000 /uImage
fatload mmc 0:1 0x01100000 /uInitrd
setenv bootargs console=ttyS0,115200n8 base-installer/initramfs-tools/driver-policy=most
bootm 0x00800000 0x01100000
 
 
# allow root login (change settins on sd card)
cat /etc/ssh/sshd_config | grep Root
P

Debian

#
# Debian Squeeze
#
# Squeeze main
cat <<EOF> /etc/apt/sources.list.d/squeeze.list
deb http://archive.debian.org/debian/ squeeze main contrib non-free
deb-src http://archive.debian.org/debian/ squeeze main contrib non-free
EOF

# Squeeze LTS
cat <<EOF> /etc/apt/sources.list.d/squeeze-lts.list
deb http://archive.debian.org/debian/ squeeze-lts main contrib non-free
deb-src http://archive.debian.org/debian/ squeeze-lts main contrib non-free
EOF
echo "Acquire::Check-Valid-Until false;" > /etc/apt/apt.conf.d/10squeeze-lts-no-check-valid-until

# Squeeze backports
cat <<EOF> /etc/apt/sources.list.d/squeeze-backports.list
deb http://ftp.de.debian.org/debian-backports squeeze-backports main
deb-src http://ftp.de.debian.org/debian-backports squeeze-backports main
EOF


#
# Debian Wheezy
#
# Wheezy main
cat <<EOF> /etc/apt/sources.list.d/wheezy.list
deb http://http.debian.net/debian/ wheezy main contrib non-free
deb-src http://http.debian.net/debian/ wheezy main contrib non-free
EOF

# Wheezy updates
cat <<EOF> /etc/apt/sources.list.d/wheezy-updates.list
deb http://ftp.de.debian.org/debian/ wheezy-updates main contrib non-free
deb-src http://ftp.de.debian.org/debian/ wheezy-updates main contrib non-free
EOF

# Wheezy security
cat <<EOF> /etc/apt/sources.list.d/wheezy-security.list
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free
EOF

# Wheezy backports
cat <<EOF> /etc/apt/sources.list.d/wheezy-backports.list
deb http://ftp.de.debian.org/debian wheezy-backports main
deb-src http://ftp.de.debian.org/debian wheezy-backports main
EOF


#
# Debian Jessie
#
cat <<EOF> /etc/apt/sources.list.d/jessie.list
deb http://http.debian.net/debian/ jessie main contrib non-free
deb-src http://http.debian.net/debian/ jessie main contrib non-free
EOF

# Jessie updates
cat <<EOF> /etc/apt/sources.list.d/jessie-updates.list
deb http://httpredir.debian.org/debian jessie-updates main contrib
deb-src http://httpredir.debian.org/debian jessie-updates main contrib
EOF

# Jessie security
cat <<EOF> /etc/apt/sources.list.d/jessie-security.list
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
EOF

# Jessie backports
cat <<EOF> /etc/apt/sources.list.d/jessie-backports.list
deb ftp://ftp.de.debian.org/debian/ jessie-backports main contrib non-free
deb-src ftp://ftp.de.debian.org/debian/ jessie-backports main contrib non-free
EOF

apt-get update && apt-get -y dist-upgrade

Upgrade squeeze to wheezy
sed -i 's|squeeze|wheezy|g' /etc/apt/sources.list
apt-get update
apt-get -y dist-upgrade

fix wget certificate errors
apt-get install -y ca-certificates

Debian Mirrors
http://www.debian.org/mirror/list

Netinstall CD
http://cdimage.debian.org/debian-cd/current/amd64/iso-cd/
http://ftp.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/mini.iso - squeeze netinstall cd

Net install from PXE
mkdir -p /var/lib/tftpboot/debian/squeeze/amd64
wget -q http://ftp.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux -O /var/lib/tftpboot/debian/squeeze/amd64/linux
wget -q http://ftp.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz -O /var/lib/tftpboot/debian/squeeze/amd64/initrd.gz

cat < /var/lib/tftpboot/pxelinux.cfg/debian-squeeze.conf
label linux
menu label Debian Squeeze installer 64 bit
kernel debian/squeeze/amd64/linux
APPEND initrd=debian/squeeze/amd64/initrd.gz auto url=http://installit.googlecode.com/hg/preseed/debian-preseed.seed locale=en_US console-setup/layoutcode=en netcfg/choose_interface=eth0 debconf/priority=critical DEBCONF_DEBUG=developer --
IPAPPEND 2
EOF

echo "MENU INCLUDE pxelinux.cfg/debian-installer.cfg" >> /var/lib/tftpboot/pxelinux.cfg/default

Net install Debian (boot installer from HDD)
mount /dev/sda1 /mnt/
mount --bind /mnt/boot/ /boot/

mkdir /mnt/boot
grub-install --boot-director=/mnt/boot/ /dev/sda

# get boot files
mkdir /boot/debian-installer/

# stable
wget http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz -O /boot/debian-installer/initrd.gz
wget http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux -O /boot/debian-installer/linux

# testing
wget http://ftp.debian.de/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz -O /boot/debian-installer/initrd.gz
wget http://ftp.debian.de/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux -O /boot/debian-installer/linux

# Ubunut Trusty
wget http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz -O /boot/debian-installer/initrd.gz
wget http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux -O /boot/debian-installer/linux

# edit grub config
mv /boot/grub/grub.cfg /boot/grub/grub.cfg.org
cat < /boot/grub/grub.cfg
set timeout=3
menuentry 'Debian Installer' {
linux /boot/debian-installer/linux auto url=http://preseed.panticz.de/preseed/debian-ubuntu-ssh-install.seed priority=critical locale=en_US console-setup/layoutcode=us keyboard-configuration/xkb-keymap=us netcfg/choose_interface=auto
initrd /boot/debian-installer/initrd.gz
}
EOF

# remove user created during installation
userdel -f service

wheezy
http://ftp.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
http://ftp.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux

pxe
LABEL linux
MENU LABEL Debian Installer 64 bit wheezy [Preseed]
KERNEL debian-installer/wheezy/linux
APPEND initrd=debian-installer/wheezy/initrd.gz auto url=http://installit.googlecode.com/hg/preseed/debian-preseed.seed locale=de_DE console-setup/layoutcode=de netcfg/choose_interface=auto debconf/priority=critical DEBCONF_DEBUG=developer --
IPAPPEND 2

Disable service
update-rc.d apache2 disable

apt-config
apt-config dump

Lenny repository (/etc/apt/sources.list)
deb http://ftp.de.debian.org/debian-archive/debian/ lenny main contrib

Preseed
http://d-i.alioth.debian.org/manual/en.i386/apb.html

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

Add proposed repository

#!/bin/bash
 
cat <<EOF>> /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-proposed main restricted universe
EOF

Create LiveCD with Debian live-helper

# test
 
apt-get install live-helper cdebootstrap
 
cat <<EOF>> /usr/share/cdebootstrap/suites
Suite: hardy
Config: generic-ubuntu
Keyring: ubuntu-archive-keyring.gpg
EOF
 
# sed
/usr/bin/lh_chroot_sources
${LH_DISTRIBUTION}/updates
${LH_DISTRIBUTION}-updates
 
mkdir ~/live && cd ~/live
 
lh_build
 
http://clemensfam.org/john/?p=39
Syndicate content