Quickly setup a new Root Server at Hetzner’s

Preparations in hetzner robot:

  • Activate rescue-system
  • Order automatic hardware reset
  • Login into rescue system and change password

Now, automatic setup can be done via installimage -c {configfile} where {configfile} contains the following:

DRIVE1 /dev/sda
DRIVE2 /dev/sdb
SWRAID 1
SWRAIDLEVEL 1
BOOTLOADER grub
HOSTNAME d0
PART swap   swap      8GB 
PART /boot  ext3       256M 
PART /      ext3      4GB 
PART /var   ext3      2GB 
PART lvm    vg0       all 
LV   vg0    kvm   /kvm    xfs   20G
IMAGE /root/.oldroot/nfs/install/../images/Ubuntu-1010-maverick-64-minimal.tar.gz

Output:

                Hetzner Online AG - installimage

  Your server will be installed now, this will take some minutes
             You can abort at any time with CTRL+C ...

         :  Reading configuration                           done 
   1/14  :  Deleting partitions                             done 
   2/14  :  Creating partitions and /etc/fstab              done 
   3/14  :  Creating software RAID level 1                  done 
   4/14  :  Creating LVM volumes                            done 
   5/14  :  Formatting partitions
         :    formatting /dev/md0 with swap                 done 
         :    formatting /dev/md1 with ext3                 done 
         :    formatting /dev/md2 with ext3                 done 
         :    formatting /dev/md3 with ext3                 done 
         :    formatting /dev/vg0/kvm with xfs              done 
   6/14  :  Mounting partitions                             done 
   7/14  :  Extracting image (local)                        done 
   8/14  :  Setting up network for eth0                     done 
   9/14  :  Executing additional commands
         :    Generating new SSH keys                       done 
         :    Generating mdadm config                       done 
         :    Generating ramdisk                            done 
         :    Generating ntp config                         done 
         :    Setting hostname                              done 
  10/14  :  Setting up miscellaneous files                  done 
  11/14  :  Setting root password                           done 
  12/14  :  Installing bootloader grub                      done 
  13/14  :  Running some ubuntu specific functions          done 
  14/14  :  Clearing log files                              done 

                  INSTALLATION COMPLETE
   You can now reboot and log in to your new system with
  the same password as you logged in to the rescue system.

Now you can reboot into your new system.

Leave a Comment