This repository has been archived by the owner on Feb 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path2_install_ubuntu_natty.sh
84 lines (65 loc) · 2.14 KB
/
2_install_ubuntu_natty.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
#
# OpenVZ Template OS Creator
# http://github.com/RogerSik/OpenVZ-Template-Creator
#
cat << EOF > /etc/init/mountall.conf
# mountall - Mount filesystems on boot
#
# This helper mounts filesystems in the correct order as the devices
# and mountpoints become available.
#
description "Mount filesystems on boot"
start on startup
task
emits virtual-filesystems
emits local-filesystems
emits remote-filesystems
emits all-swaps
emits all-filesystems
emits filesystem
pre-start script
find /var/run -mindepth 1 -maxdepth 1 | grep -v utmp | xargs rm -rf
mkdir -p /var/run/network
find /var/lock -mindepth 1 -maxdepth 1 | xargs rm -rf
end script
post-start script
initctl emit -n filesystem
initctl emit -n all-swaps
initctl emit -n all-filesystems
initctl emit -n virtual-filesystems
initctl emit -n remote-filesystems
initctl emit -n local-filesystems
mount -a
end script
EOF
cat << EOF > /etc/apt/sources.list
deb http://de.archive.ubuntu.com/ubuntu natty main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu natty main restricted universe multiverse
deb http://de.archive.ubuntu.com/ubuntu natty-updates main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu natty-updates main restricted universe multiverse
deb http://de.archive.ubuntu.com/ubuntu natty-security main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu natty-security main restricted universe multiverse
#deb http://de.archive.ubuntu.com/ubuntu natty-backports main #restricted universe multiverse
#deb-src http://de.archive.ubuntu.com/ubuntu natty-backports main #restricted universe multiverse
EOF
source ./5_distri_install_packages.sh
apt-get update
apt-get install gpgv --force-yes -y
apt-get update
apt-get dist-upgrade -y --force-yes
apt-get install $ubuntu_all -y --force-yes
apt-get clean
apt-get autoremove
# modprobe fix
rm /sbin/modprobe
ln -s /bin/true /sbin/modprobe
# Removing of broken scripts
cd /etc/init/
rm -f tty
# network
echo "hostname" > /etc/hostname
echo "127.0.0.1 localhost.localdomain localhost" > /etc/hosts
# the real password set OpenVZ!
passwd
clear