特殊:Badtitle/NS100:Installation/OverSSH:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第13行: | 第13行: | ||
Use <code><nowiki>fdisk</nowiki></code> to partition your hard disk. | Use <code><nowiki>fdisk</nowiki></code> to partition your hard disk. | ||
<pre><nowiki> | <pre><nowiki> | ||
# fdisk /dev/hda | |||
</nowiki></pre> | </nowiki></pre> | ||
第26行: | 第27行: | ||
Below is how we get our / populated with ext3. | Below is how we get our / populated with ext3. | ||
<pre><nowiki> | <pre><nowiki> | ||
# mke2fs -j /dev/hda1 | |||
</nowiki></pre> | </nowiki></pre> | ||
And the same for our swap partition. | And the same for our swap partition. | ||
<pre><nowiki> | <pre><nowiki> | ||
# mkswap /dev/hda2 | |||
# sync; sync; sync | |||
# swapon /dev/hda2 | |||
</nowiki></pre> | </nowiki></pre> | ||
第38行: | 第43行: | ||
==== Mounting Root ==== | ==== Mounting Root ==== | ||
<pre><nowiki> | <pre><nowiki> | ||
# mkdir /mnt/ubuntu | |||
# mount -t ext3 /dev/hda1 /mnt/ubuntu | |||
</nowiki></pre> | </nowiki></pre> | ||
第47行: | 第54行: | ||
On an apt based system we can use <code><nowiki>dpkg</nowiki></code> to install it. | On an apt based system we can use <code><nowiki>dpkg</nowiki></code> to install it. | ||
<pre><nowiki> | <pre><nowiki> | ||
# wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_0.3.3.0ubuntu2_all.deb | |||
# dpkg -i debootstrap_0.3.3.0ubuntu2_all.deb | |||
</nowiki></pre> | </nowiki></pre> | ||
第53行: | 第62行: | ||
If your system is neither, this might work. | If your system is neither, this might work. | ||
<pre><nowiki> | <pre><nowiki> | ||
# mkdir /work; cd /work | |||
# wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_0.3.3.0ubuntu2_all.deb | |||
# ar -xf debootstrap-udeb_0.3.3.0ubuntu7_i386.udeb | |||
# cd / | |||
# tar zxvf work/data.tar.gz | |||
</nowiki></pre> | </nowiki></pre> | ||
第60行: | 第74行: | ||
==== Installing the Base System ==== | ==== Installing the Base System ==== | ||
<pre><nowiki> | <pre><nowiki> | ||
# /usr/sbin/debootstrap --arch i386 dapper /mnt/ubuntu http://archive.ubuntu.com/ubuntu | |||
</nowiki></pre> | </nowiki></pre> | ||
第68行: | 第83行: | ||
Change HOSTNAME to whatever suits your environment. | Change HOSTNAME to whatever suits your environment. | ||
<pre><nowiki> | <pre><nowiki> | ||
# echo HOSTNAME > /mnt/ubuntu/etc/hostname | |||
</nowiki></pre> | </nowiki></pre> | ||
==== fstab ==== | ==== fstab ==== | ||
<pre><nowiki> | <pre><nowiki> | ||
# vim /mnt/ubuntu/etc/fstab | |||
</nowiki></pre> | </nowiki></pre> | ||
Put the following in fstab: | Put the following in fstab: | ||
<pre><nowiki> | <pre><nowiki> | ||
# /etc/fstab: static file system information. | |||
# | |||
# <file system> <mount point> <type> <options> <dump> <pass> | |||
proc /proc proc defaults 0 0 | proc /proc proc defaults 0 0 | ||
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1 | /dev/hda1 / ext3 defaults,errors=remount-ro 0 1 | ||
第85行: | 第105行: | ||
<pre><nowiki> | <pre><nowiki> | ||
#Network Config: | |||
# The loopback network interface | |||
auto lo | auto lo | ||
iface lo inet loopback | iface lo inet loopback | ||
# The primary network interface | |||
auto eth0 | auto eth0 | ||
iface eth0 inet static | iface eth0 inet static | ||
address 10.0.0.10 | |||
network 10.0.0.0 | |||
braodcast 10.0.0.255 | |||
gateway 10.0.0.1 | |||
netmask 255.255.255.0 | |||
</nowiki></pre> | </nowiki></pre> | ||
第121行: | 第144行: | ||
It is just bad if you forget this, so just .... | It is just bad if you forget this, so just .... | ||
<pre><nowiki> | <pre><nowiki> | ||
# passwd | |||
</nowiki></pre> | </nowiki></pre> | ||
==== Create a user and switch shadow password on ==== | ==== Create a user and switch shadow password on ==== | ||
<pre><nowiki> | <pre><nowiki> | ||
# dpkg-reconfigure --default-priority passwd | |||
</nowiki></pre> | </nowiki></pre> | ||
第130行: | 第155行: | ||
<pre><nowiki> | <pre><nowiki> | ||
# apt-get update | |||
</nowiki></pre> | </nowiki></pre> | ||
==== Installing OpenSSH Server ==== | ==== Installing OpenSSH Server ==== | ||
<pre><nowiki> | <pre><nowiki> | ||
# apt-get install openssh-server | |||
</nowiki></pre> | </nowiki></pre> | ||
第139行: | 第166行: | ||
Choose the right kernel for your architecture. I go with: | Choose the right kernel for your architecture. I go with: | ||
<pre><nowiki> | <pre><nowiki> | ||
# apt-get install linux-image-686 | |||
</nowiki></pre> | </nowiki></pre> | ||
第153行: | 第181行: | ||
<pre><nowiki> | <pre><nowiki> | ||
# /boot/grub/grub.conf | |||
default 0 | default 0 | ||
timeout 3 | timeout 3 | ||
title=Ubuntu | title=Ubuntu | ||
root (hd0,0) | |||
kernel /vmlinuz root=/dev/hda1 | |||
initrd /initrd.img | |||
</nowiki></pre> | </nowiki></pre> | ||
第168行: | 第197行: | ||
<pre><nowiki> | <pre><nowiki> | ||
# grub | |||
</nowiki></pre> | </nowiki></pre> | ||
第181行: | 第211行: | ||
<pre><nowiki> | <pre><nowiki> | ||
# exit | |||
# cd / | |||
</nowiki></pre> | </nowiki></pre> | ||
<pre><nowiki> | <pre><nowiki> | ||
# umount /mnt/ubuntu/proc | |||
# umount /mnt/ubuntu/dev | |||
# umount /mnt/ubuntu | |||
# reboot | |||
</nowiki></pre> | </nowiki></pre> | ||
第192行: | 第228行: | ||
==== Generate locales ==== | ==== Generate locales ==== | ||
<pre><nowiki> | <pre><nowiki> | ||
# locale-gen en_US.UTF-8 | |||
# echo 'LANG="en_US.UTF-8"' >> /etc/environment | |||
# echo 'LANGUAGE="en_US:en"' >> /etc/environment | |||
</nowiki></pre> | </nowiki></pre> | ||
第205行: | 第244行: | ||
* [http://doc.ubuntu.com/ubuntu/install/i386/apds03.html An other instruction] from the [http://doc.ubuntu.com/ubuntu/install/i386/index.html Ubuntu Installation Guide] is somewhat outdated and has shortcomings related to the bootloader installation. | * [http://doc.ubuntu.com/ubuntu/install/i386/apds03.html An other instruction] from the [http://doc.ubuntu.com/ubuntu/install/i386/index.html Ubuntu Installation Guide] is somewhat outdated and has shortcomings related to the bootloader installation. | ||
* [http://www.underhanded.org/papers/debian-conversion/remotedeb.html HOWTO - Install Debian Onto a Remote Linux System] - A Debian specific HOWTO. | * [http://www.underhanded.org/papers/debian-conversion/remotedeb.html HOWTO - Install Debian Onto a Remote Linux System] - A Debian specific HOWTO. | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年5月24日 (四) 10:42的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/Installation/OverSSH }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/af | • {{#if: UbuntuHelp:Installation/OverSSH|Afrikaans| [[::Installation/OverSSH/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/ar | • {{#if: UbuntuHelp:Installation/OverSSH|العربية| [[::Installation/OverSSH/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/az | • {{#if: UbuntuHelp:Installation/OverSSH|azərbaycanca| [[::Installation/OverSSH/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/bcc | • {{#if: UbuntuHelp:Installation/OverSSH|جهلسری بلوچی| [[::Installation/OverSSH/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/bg | • {{#if: UbuntuHelp:Installation/OverSSH|български| [[::Installation/OverSSH/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/br | • {{#if: UbuntuHelp:Installation/OverSSH|brezhoneg| [[::Installation/OverSSH/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/ca | • {{#if: UbuntuHelp:Installation/OverSSH|català| [[::Installation/OverSSH/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/cs | • {{#if: UbuntuHelp:Installation/OverSSH|čeština| [[::Installation/OverSSH/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/de | • {{#if: UbuntuHelp:Installation/OverSSH|Deutsch| [[::Installation/OverSSH/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/el | • {{#if: UbuntuHelp:Installation/OverSSH|Ελληνικά| [[::Installation/OverSSH/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/es | • {{#if: UbuntuHelp:Installation/OverSSH|español| [[::Installation/OverSSH/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/fa | • {{#if: UbuntuHelp:Installation/OverSSH|فارسی| [[::Installation/OverSSH/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/fi | • {{#if: UbuntuHelp:Installation/OverSSH|suomi| [[::Installation/OverSSH/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/fr | • {{#if: UbuntuHelp:Installation/OverSSH|français| [[::Installation/OverSSH/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/gu | • {{#if: UbuntuHelp:Installation/OverSSH|ગુજરાતી| [[::Installation/OverSSH/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/he | • {{#if: UbuntuHelp:Installation/OverSSH|עברית| [[::Installation/OverSSH/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/hu | • {{#if: UbuntuHelp:Installation/OverSSH|magyar| [[::Installation/OverSSH/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/id | • {{#if: UbuntuHelp:Installation/OverSSH|Bahasa Indonesia| [[::Installation/OverSSH/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/it | • {{#if: UbuntuHelp:Installation/OverSSH|italiano| [[::Installation/OverSSH/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/ja | • {{#if: UbuntuHelp:Installation/OverSSH|日本語| [[::Installation/OverSSH/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/ko | • {{#if: UbuntuHelp:Installation/OverSSH|한국어| [[::Installation/OverSSH/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/ksh | • {{#if: UbuntuHelp:Installation/OverSSH|Ripoarisch| [[::Installation/OverSSH/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/mr | • {{#if: UbuntuHelp:Installation/OverSSH|मराठी| [[::Installation/OverSSH/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/ms | • {{#if: UbuntuHelp:Installation/OverSSH|Bahasa Melayu| [[::Installation/OverSSH/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/nl | • {{#if: UbuntuHelp:Installation/OverSSH|Nederlands| [[::Installation/OverSSH/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/no | • {{#if: UbuntuHelp:Installation/OverSSH|norsk| [[::Installation/OverSSH/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/oc | • {{#if: UbuntuHelp:Installation/OverSSH|occitan| [[::Installation/OverSSH/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/pl | • {{#if: UbuntuHelp:Installation/OverSSH|polski| [[::Installation/OverSSH/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/pt | • {{#if: UbuntuHelp:Installation/OverSSH|português| [[::Installation/OverSSH/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/ro | • {{#if: UbuntuHelp:Installation/OverSSH|română| [[::Installation/OverSSH/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/ru | • {{#if: UbuntuHelp:Installation/OverSSH|русский| [[::Installation/OverSSH/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/si | • {{#if: UbuntuHelp:Installation/OverSSH|සිංහල| [[::Installation/OverSSH/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/sq | • {{#if: UbuntuHelp:Installation/OverSSH|shqip| [[::Installation/OverSSH/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/sr | • {{#if: UbuntuHelp:Installation/OverSSH|српски / srpski| [[::Installation/OverSSH/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/sv | • {{#if: UbuntuHelp:Installation/OverSSH|svenska| [[::Installation/OverSSH/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/th | • {{#if: UbuntuHelp:Installation/OverSSH|ไทย| [[::Installation/OverSSH/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/tr | • {{#if: UbuntuHelp:Installation/OverSSH|Türkçe| [[::Installation/OverSSH/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/vi | • {{#if: UbuntuHelp:Installation/OverSSH|Tiếng Việt| [[::Installation/OverSSH/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/yue | • {{#if: UbuntuHelp:Installation/OverSSH|粵語| [[::Installation/OverSSH/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/zh | • {{#if: UbuntuHelp:Installation/OverSSH|中文| [[::Installation/OverSSH/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/zh-hans | • {{#if: UbuntuHelp:Installation/OverSSH|中文(简体)| [[::Installation/OverSSH/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/OverSSH | UbuntuHelp:Installation/OverSSH | {{#if: | :}}Installation/OverSSH}}/zh-hant | • {{#if: UbuntuHelp:Installation/OverSSH|中文(繁體)| [[::Installation/OverSSH/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:Installation/OverSSH|:Installation/OverSSH|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :Installation/OverSSH/zh | | {{#ifexist: Installation/OverSSH/zh | | {{#ifeq: {{#titleparts:Installation/OverSSH|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Installation/OverSSH|1|-1|}} | zh | | }}
/!\ This is a work in progress, it is not mature yet and it may break your system!
Caveat
As you may already have guessed following this instruction may break your system and you are on your own to fix it again.
Scenario
This instruction describes how to install Ubuntu on a dedicated server over ssh. I assume that your provider provides you with a rescue system from which you can boot and prepare your system. An Online replacement is possible, but it is some more work and a lot more risky if things go bad (the basic idea is to temporarily disable your swap and install a transitional system on it).
Preparing the Hard Disk
Partitioning
Use fdisk
to partition your hard disk.
# fdisk /dev/hda
Remember to set the root partition bootable!
For the rest of this instruction we assume the following partition layout.
/dev/hda1 (83 Linux) - for /, /dev/hda2 (82 Linux swap) - as swap
Creating File Systems
Below is how we get our / populated with ext3.
# mke2fs -j /dev/hda1
And the same for our swap partition.
# mkswap /dev/hda2 # sync; sync; sync # swapon /dev/hda2
The Base System
Mounting Root
# mkdir /mnt/ubuntu # mount -t ext3 /dev/hda1 /mnt/ubuntu
Getting Debootstrap
Debootstrap is a collection of scripts that we will use in the next step to set up a base system. We need an appropriate version of debootstrap
from http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/ to make this work.
Make sure that binutils
is installed on your system.
On an apt based system we can use dpkg
to install it.
# wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_0.3.3.0ubuntu2_all.deb # dpkg -i debootstrap_0.3.3.0ubuntu2_all.deb
If your current system is rpm based, use alien to install it or find a rpm on the web (http://azhrarn.underhanded.org/debootstrap-0.2.23-1.i386.rpm).
If your system is neither, this might work.
# mkdir /work; cd /work # wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_0.3.3.0ubuntu2_all.deb # ar -xf debootstrap-udeb_0.3.3.0ubuntu7_i386.udeb # cd / # tar zxvf work/data.tar.gz
Installing the Base System
# /usr/sbin/debootstrap --arch i386 dapper /mnt/ubuntu http://archive.ubuntu.com/ubuntu
(arch may be different for you, e.g. md64, hppa, ia64, powerpc, or sparc)
Basic Configuration
Set the Hostname
Change HOSTNAME to whatever suits your environment.
# echo HOSTNAME > /mnt/ubuntu/etc/hostname
fstab
# vim /mnt/ubuntu/etc/fstab
Put the following in fstab:
# /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 /dev/hda1 / ext3 defaults,errors=remount-ro 0 1 /dev/hda2 none swap sw 0 0
Networking
Make sure to use your network details instead.
#Network Config: # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 10.0.0.10 network 10.0.0.0 braodcast 10.0.0.255 gateway 10.0.0.1 netmask 255.255.255.0
Make sure to use your hostname and domain.
127.0.0.1 localhost 127.0.0.1 hostname.domain.tld hostname
You need a valid resolv.conf with at least one valid nameserver, e.g.:
nameserver 10.0.0.1
Enter the new environment
Before we chroot into the new environment we need to mount /proc and /dev
mount -t proc none /mnt/ubuntu/proc mount -o bind /dev /mnt/ubuntu/dev LANG= chroot /mnt/ubuntu /bin/bash
Change the root password
It is just bad if you forget this, so just ....
# passwd
Create a user and switch shadow password on
# dpkg-reconfigure --default-priority passwd
Installing Packages
# apt-get update
Installing OpenSSH Server
# apt-get install openssh-server
Install a Kernel
Choose the right kernel for your architecture. I go with:
# apt-get install linux-image-686
Installing GRUB
The boot loader is most important, so do:
apt-get install grub mkdir /boot/grub cp /lib/grub/i386-pc/* /boot/grub vim /boot/grub/grub.conf
# /boot/grub/grub.conf default 0 timeout 3 title=Ubuntu root (hd0,0) kernel /vmlinuz root=/dev/hda1 initrd /initrd.img
ln -s /boot/grub/grub.conf /boot/grub/menu.lst
# grub
grub> root (hd0,0) grub> setup (hd0) grub> quit
Reboot
# exit # cd /
# umount /mnt/ubuntu/proc # umount /mnt/ubuntu/dev # umount /mnt/ubuntu # reboot
Finishing
After the reboot ssh in again.
Generate locales
# locale-gen en_US.UTF-8 # echo 'LANG="en_US.UTF-8"' >> /etc/environment # echo 'LANGUAGE="en_US:en"' >> /etc/environment
Istall some more packages
apt-get install ubuntu-standard
References
- The Gentoo Handbook contains a very good (Gentoo specific) instruction on chrooted installation procedures.
- An other instruction from the Ubuntu Installation Guide is somewhat outdated and has shortcomings related to the bootloader installation.
- HOWTO - Install Debian Onto a Remote Linux System - A Debian specific HOWTO.