Chimera

From wiki

Jump to: navigation, search

Chimera is a new box of mine.. here is how to build it from scratch...


Contents

Reinstall

Login here choose 64bit rescue from the item 'Rescuesystem' You will be given a password that the machine will next boot into, reboot the machine by going to the 'Resetaufträge' tab and then choose 'STRG+ALT+ENTF an den Server senden'

Your machine will not be rebooted with the given password. Just repeat the procedure if you're unsure.

Rescue image

Xen in bridged mode make issues with Hetzner, the following works for me to boot into rescue image on demand:

  • continious ping your dom0
  • Rescuesystem activate 32 bit
  • reboot domain0
  • when pings stop:
  • Resetaufträge -> Automatischen Hardware-Reset auslösen
  • it will boot back into your normal os (make sure xen does not start on bootup)
  • Rescuesystem -> 32bit should still be enabled
  • reboot box again from OS (make sure init.d/xen* dont start of course)
  • Rescue mode will work now.


Might have issues with hardware hang - didnt have that yet though to test!

Installimage

Once rebooted you can login, run installimage:

rescue:~# installimage

At the time of writing, choose "Ubuntu" and "Ubuntu-704-feisty-64-minimal"

The defaults in the config file presented next is fine, just to make sure, they are:

DRIVE1 /dev/sda
DRIVE2 /dev/sdb
FORMAT_DRIVE2 0
PART 1 swap swap 2048
PART 2 / ext3 all
SWRAID 0
LVM 0
IMAGEPATH download.hetzner.de:/usr/www/users/download/bootimages/
PATHTYPE nfs
IMAGEFILE Ubuntu-704-feisty-64-minimal.tar.gz
IMAGETYPE tgz
BOOTLOADER lilo

This install will not format /dev/sdb so you're ok to proceed

The output will be something like:

#~ deleting exisiting partitions..                      [ OK ]
#~ creating new partitions and fstab..                  [ OK ]
#~ formatting partitions..                              [ OK ]
#~ mounting mountpoints according to the new fstab..    [ OK ]
#~ extracting imagefile..                               [ OK ]
#~ setting up network-config..                          [ OK ]
#~ installing new /etc/fstab..                          [ OK ]
#~ executing some postinstall commands..
  ~ trying ntp-update..                 [ done ]
  ~ creating new ssh-keys..             [ done ]
  ~ deleting logfiles..                 [ done ]
  ~ setting up rootpassword..           [ done ]
#~ setting up bootloader..                              [ OK ]
#~ cleaning up..                                        [ OK ]


#~~~ INSTALLATION COMPLETE ~~~#
you may now reboot into your new system
you can login to your new system with the same password as you logged in into the rescue system

It's now safe to reboot the machine.

First boot

First things first, change your password!

root@Ubuntu-704-feisty-64-minimal:~# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@Ubuntu-704-feisty-64-minimal:~# mkdir /backup
root@Ubuntu-704-feisty-64-minimal:~# echo chimera > /etc/hostname

Edit /etc/hosts and remove the 'Ubuntu-704-feisty-64-minimal' with 'chimera'

Edit /etc/resolv.conf and add: 'search lagged.za.net'


Edit /etc/fstab and add:

/dev/sdb1 none swap sw 0 0
/dev/sdb2 /backup ext3 defaults 0 0

Might be good idea to add the swap to be before the /dev/sdb1 one thereby reducing IO on swapping.

Do the following - order is important, xen needs a working Grub before it will install properly.

root@Ubuntu-704-feisty-64-minimal:~# apt-get install ncftp vim-full
root@Ubuntu-704-feisty-64-minimal:~# apt-get remove lilo
root@Ubuntu-704-feisty-64-minimal:~# dpkg --purge lilo
root@Ubuntu-704-feisty-64-minimal:~# apt-get install grub
root@Ubuntu-704-feisty-64-minimal:~# grub-install /dev/sda
root@Ubuntu-704-feisty-64-minimal:~# apt-get install ubuntu-xen-desktop-amd64
root@Ubuntu-704-feisty-64-minimal:~# xen-image-xen0-2.6.16-11.2-generic

When asked 'Could not find /boot/grub/menu.lst file. Would you like /boot/grub/menu.lst generated for you? (y/N)' say "Y".


root@chimera:~# mkdir /usr/local/xen
root@chimera:~# mkdir /usr/local/xen/images

Put firewall script in /etc/init.d/firewall, link up rc2.d to it


Some extra stuff to install:

root@chimera:/usr/local/scripts# apt-get install mailx
Personal tools