Installing Debian testing On GPT HDDs (> 2TB) 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
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys

Chroot to /mnt:

chroot /mnt /bin/bash

Set a root password:

passwd

Install vim-nox:

apt-get install vim-nox 

Create /etc/network/interfaces with the network settings you gathered in chapter 1:

vi /etc/network/interfaces    
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
     address <ip_address>
     netmask <netmask>
     broadcast <broadcast>
     gateway <gateway>
iface eth0 inet6 static
  address <ipv6_address>
  netmask 64
  up ip -6 route add <ipv6_gateway> dev eth0
  down ip -6 route del <ipv6_gateway> dev eth0
  up ip -6 route add default via <ipv6_gateway> dev eth0
  down ip -6 route del default via <ipv6_gateway> dev eth0

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. 8.8.8.8 and 8.8.4.4, in /etc/resolv.conf).

Put the following repositories in /etc/apt/sources.list:

vi /etc/apt/sources.list
deb http://ftp.de.debian.org/debian testing main contrib non-free
deb-src http://ftp.de.debian.org/debian testing main contrib non-free

Next update the system...

apt-get update
apt-get upgrade

... and install a few required packages:

apt-get install mdadm openssh-server lvm2 locales ntp

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
df: Warning: cannot read table of mounted file systems: No such file or directory
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168f-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168f-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8105e-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168e-3.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168e-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168e-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-1.fw for module r8169
root@grml:/#

... 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
grub-install --no-floppy /dev/sdb
update-grub /dev/md0
update-initramfs -u

Now you can leave the chroot...

exit

... 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 or change your BIOS settings):

reboot 

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
/etc/init.d/hostname.sh start

 

Share this page:

0 Comment(s)