References


Warning /!\ This is a light 12.04 precise version of OverSSH installation Guide. It's a work in progress. It maybe not mature yet and it may break your system!

enter into the system

boot from at least ubuntu oneiric 11.10 live CD (or Lucid LTS 10.04) or boot from at least another ubuntu oneiric OS installed on same machine

or use older ubuntu distribuition but download and install at least oneiric version of debootstrap from

http://packages.ubuntu.com

otherwise debootstrap does not know how to install precise

then

ssh from a remote workstation or login on local machine to install

Preparing the Hard Disk

Partitioning

Use fdisk to partition your hard disk.

sudo fdisk /dev/sda

Remember to set the root partition bootable with fdisk "a" command!

For the rest of this instruction we assume the following partition layout. /dev/sda1 (83 Linux) - for /, /dev/sda2 (82 Linux swap) - as swap

Creating File Systems

Below is how we get our / populated with ext3.

sudo mkfs.ext4 /dev/sda1

And the same for our swap partition.

sudo mkswap /dev/sda2

The Base System

Mounting Root

sudo mkdir /mnt/ubuntu ; \
sudo mount /dev/sda1 /mnt/ubuntu

Installing the Base System with Debootstrap

first of all upgrade your working system

sudo aptitude update; sudo aptitude -y dist-upgrade 

sudo aptitude -y install debootstrap ; \
sudo debootstrap precise /mnt/ubuntu 

or

if you had an apt-cacher server on 192.168.63.22 and na.mirror.garr.it were your fastest mirror

sudo debootstrap precise /mnt/ubuntu/ http://192.168.63.22:3142/na.mirror.garr.it/ubuntu

Basic Configuration

Set hostname hosts fstab resolv.conf sources.list interfaces froma running 8.04 OS

sudo cp /etc/hostname /etc/hosts /etc/fstab /etc/resolv.conf /mnt/ubuntu/etc/ ;\
sudo cp /etc/apt/sources.list /mnt/ubuntu/etc/apt/ ;\
sudo cp /etc/network/interfaces /mnt/ubuntu/etc/network/  

if you started from oneiric or previuos ones substitute oneiric with precise in /mnt/ubuntu/etc/apt/sources.list

find your hd partitions UUID for customizing fstab

sudo blkid /dev/sda1  ;\
sudo blkid /dev/sda2  

a good trip for coping UUID in fstab (BUT MUST BE VERIFIED RESULTS in /etc/fstab) is

sudo blkid /dev/sda1 | sed 's/\/dev\/sda1\:\ //' | sed 's/TYPE\="ext4"/\ \/ ext4  errors\=remount-ro\ 0\ 1 /' | sed 's/"//g' | sudo tee -a /mnt/ubuntu/etc/fstab

add swap

sudo swapon -a /dev/sda2  

substitute sda1 with your correct real root and sda2 with your correct real swap partition

VERIFIED RESULTS in /mnt/ubuntu/etc/fstab

sudo vim /mnt/ubuntu/etc/fstab

example /mnt/ubuntu/etc/fstab

proc /proc proc defaults 0 0

UUID=74be20cd-9cb5-4b7b-9ae3-5096a7667b7a / ext4 defaults,errors=remount-ro 0 1

UUID=9e9d9afc-e35b-4b6a-b2b8-7eee38dfb473 none swap sw 0 0 ===

Enter the new environment

Before we chroot into the new environment we need to mount /proc and /dev

sudo mount -t proc /proc /mnt/ubuntu/proc ;\
sudo mount -o bind /dev /mnt/ubuntu/dev ;\
sudo chroot /mnt/ubuntu /bin/bash

Change the root password

It is just bad if you forget this, so just ....

sudo passwd

=== Create a user sysadmin ===

sudo useradd -m -G sudo -s /bin/bash sysadmin; \
sudo passwd sysadmin

verify last line than exit from visudo without other changes

and switch shadow password on ????

sudo dpkg-reconfigure --default-priority passwd

Installing Packages

first of all upgrade your NEW system

sudo apt-get update; sudo apt-get -y dist-upgrade 

Installing OpenSSH Server

sudo apt-get install linux-generic-pae grub2  

for automatic adding other operating system to boot menu :

  • - mount all other partition necessary with data or other operating system then -

sudo update-grub

Now ONLY if YOU WANT reboot using the grub in new installation

sudo grub-install /dev/sda

NB If you want use the grub in old installation reboot in old installation and run only

sudo update-grub

exit
cd /

sudo umount /mnt/ubuntu/proc ; \
sudo umount /mnt/ubuntu/dev ; \ 
sudo umount /mnt/ubuntu ; \
sudo reboot

Reboot

Finishing

After the reboot ssh as "sysadmin" in again.

Generate locales

sudo dpkg-reconfigure tzdata
sudo apt-get install ntp

sudo locale-gen en_US.UTF-8 ; \
sudo  dpkg-reconfigure locales

a not english example:

sudo  locale-gen it_IT@euro;\
sudo  locale-gen it_IT.UTF-8;\
sudo  dpkg-reconfigure locales

if locales problems persists try also :

echo 'LANG="en_US.UTF-8"' | sudo tee -a /etc/environment ; \
echo 'LANGUAGE="en_US:en"' | sudo tee -a /etc/environment ; \
sudo dpkg-reconfigure console-setup 

OPTIONAL STEPS

Istall some more packages

sudo apt-get install vim ssh mc ethtool screen ubuntu-standard ubuntu-minimal htop iftop ethtool postfix mailutils aptitude ubuntu-standard 

Istall graphical essential UI

sudo apt-get install xorg icewm xterm 

(you have to do startx for starting GUI)

Istall graphical minimal GUI

sudo apt-get install xubuntu-desktop 

Istall graphical standard gnome GUI

sudo apt-get install ubuntu-desktop ubuntu-restricted-extras

Istall graphical kde GUI

sudo apt-get install kubuntu-desktop 

Istall some medibuntu NON-FREE multimedia components

www.medibuntu.org

Installation/OverSSH-Light (last edited 2012-04-23 09:02:14 by natministero)