Installing Debian Wheezy (testing) With debootstrap From A Grml Live Linux - Page 2
3 Installing The New System
Now we can install Debian testing to /mnt as follows:
debootstrap --arch amd64 testing /mnt ftp://ftp.de.debian.org/debian/
(For other Debian versions and Ubuntu, you have to modify this command a bit.)
Mount some needed directories:
mount -t proc none /mnt/proc
Chroot to /mnt:
chroot /mnt /bin/bash
Set a root password:
Create /etc/network/interfaces with the network settings you gathered in chapter 1:
If you like, you can also modify the files /etc/hostname, /etc/hosts, and /etc/resolv.conf to your likings (for example, set your desired hostname in /etc/hostname and specify valid nameservers, e.g. 188.8.131.52 and 184.108.40.206, in /etc/resolv.conf).
Next update the system...
... and install a few required packages:
apt-get install mdadm openssh-server lvm2 locales ntp vim-nox
Configure your locale settings and your time zone:
dpkg-reconfigure locales tzdata
Install a kernel:
apt-get install linux-image-amd64
If you get the following warnings...
update-initramfs: Generating /boot/initrd.img-3.2.0-4-amd64
... add the contrib and non-free repositories to /etc/apt/sources.list...
... and install the firmware-realtek package:
apt-get install firmware-realtek
Next install GRUB2:
apt-get install grub2
When you are asked GRUB install devices:, select /dev/sda and /dev/sdb.
Install the bootloader on both hard drives and update the initramfs:
grub-install --no-floppy /dev/sda
Now you can leave the chroot...
... and finally reboot the system (before you do this, make sure you disable the rescue system in your server provider's control panel so that the server can boot into the Debian system you've just installed):
If all goes well, you should be able to log into your new Debian system after a few moments.
If you missed to set the correct hostname during installation, you can make up leeway as follows:
echo server1.example.com > /etc/hostname