Fixing an unbootable computer after a failed grub installation can be a bit tricky.
Here’s what I ended up doing.

First of all, boot the machine up and get access to the root partition:

Step 1. Get a Debian installation CD for the same architecture
The distro version doesn’t matter too much: a lenny CD will boot squeeze just fine.

Step 2.Boot the install CD and select Rescue mode under Advanced options.

Step 3. Answer the language, keyboard and network questions any way you want and provide the decryption passphrases for any of the encrypted partitions you need to mount.

Step 4.When prompted, request a shell on the root partition:
If you need to upgrade the version of the grub package

a) Make sure that the network interface is up (ifup eth0).
b) Make sure that /etc/resolv.conf has at least one nameserver line, otherwise add one.
c) Install the latest version using apt-get or dpkg.

Step 5.Now that you have the right grub version, run the following
:

grub-mkdevicemap

grub-install /dev/hda

update-grub

Step 6.Finally, reboot.

Enjoy

OpenVZ is container-based virtualization for Linux. OpenVZ creates multiple secure, isolated containers (otherwise known as VE or VPS) on a single physical server enabling better server utilization and ensuring that applications do not conflict. Each container performs and executes exactly like a stand-alone server; a container can be rebooted independently and have root access, users, IP addresses, memory, processes, files, applications, system libraries and configuration files.

Step 1. Installation:
An OpenVZ kernel and the vzctl and vzquota packages are available in the Debian Squeeze repositories, so we can install them as follows:

apt-get install linux-image-openvz-686  vzctl  vzquota

Step 2. Create a symlink from /var/lib/vz to /vz to provide backward compatibility:

ln -s /var/lib/vz /vz

Step 3. Open with your favorite editor (eg: nano, vim) /etc/sysctl.conf and edit as following :

net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.default.forwarding=1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.ip_forward=1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.eth0.proxy_arp=1

After you’ve edited /etc/sysctl.conf file run:

sysctl -p

Continue Reading…

The Debian project is pleased to announce the first update of its stable distribution Debian 6.0 (codename squeeze).
This update mainly adds corrections for security problems to the stable release, along with a few adjustment to serious problems.

Please note that this update does not constitute a new version of Debian 6.0 but only updates some of the packages included. There is no need to throw away 6.0 CDs or DVDs but only to update via an up-to-date Debian mirror after an installation, to cause any out of date packages to be updated.

Those who frequently install updates from security.debian.org won’t have to update many packages and most updates from security.debian.org are
included in this update.

New CD and DVD images containing updated packages and the regular installation media accompanied with the package archive respectively will be available soon at the regular locations.

Upgrading to this revision online is usually done by pointing the aptitude (or apt) package tool (see the sources.list(5) manual page) to one of Debian’s many FTP or HTTP mirrors. A comprehensive list of mirrors is available at:

Continue Reading…

Virtual hosts are used to run more than one web site on a single machine.
Virtual hosts can be “IP-based”, meaning that you have a different IP address for every web site, or “name-based”, meaning that you have multiple names running on each IP address.

I want to show you one of mine scripts for easy create virtual hosts in Debian Squeeze or ubuntu.

#!/bin/bash
VHOST_CONF=/etc/apache2/sites-enabled/
ROOT_UID=0
NOTROOT=87
WWW_ROOT=/var/www/

# Check if is root
if [ "$UID" -ne "$ROOT_UID" ]
then
echo “You must be root to run this script.”
exit $NOTROOT
fi

if [ -n "$1" ]
then
DOMAIN=$1
else
echo “You must provide a full domain name for this site, i.e. ‘example.com’ ”
echo -n “Run this script like ./script example.com .”
exit
fi

#Create document root site folder
mkdir -p $WWW_ROOT/$DOMAIN

Continue Reading…

Setting up Samba “can” be complicated at times.  Well, this post is nothing like that.

Here I just show you quick and easy way to install Samba, configure it, and set up the drive letter on your XP/Vista.

NOTE: This set up is very “open” and should not be used on servers which are facing the world. This is for private network where you trust all the computers and its users.

Step 1. Installing Samba:

apt-get install samba

Step 2. Configuring Samba:

Continue Reading…

Page 28 of 44« First...10...24252627282930313233...40...Last »