Xen
From Wiki.cyring.fr
(Difference between revisions)
(Page créée avec « <syntaxhighlight lang="bash"> # fdisk /dev/sda </syntaxhighlight> <pre> n 3 [enter] +6G </pre> <syntaxhighlight lang="bash"> # mkfs.ext4 -E discard -L DEBIAN /dev/sda3 # m... ») |
|||
Line 1: | Line 1: | ||
+ | ==== Partition ==== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# fdisk /dev/sda | # fdisk /dev/sda | ||
Line 5: | Line 6: | ||
n 3 [enter] +6G | n 3 [enter] +6G | ||
</pre> | </pre> | ||
+ | ==== Format ==== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# mkfs.ext4 -E discard -L DEBIAN /dev/sda3 | # mkfs.ext4 -E discard -L DEBIAN /dev/sda3 | ||
# mount /dev/disk/by-label/DEBIAN /mnt | # mount /dev/disk/by-label/DEBIAN /mnt | ||
+ | </syntaxhighlight> | ||
+ | ==== Installation ==== | ||
+ | <syntaxhighlight lang="bash"> | ||
# pacman -S debootstrap | # pacman -S debootstrap | ||
# debootstrap --arch ARCH wheezy /mnt http://ftp.fr.debian.org/debian | # debootstrap --arch ARCH wheezy /mnt http://ftp.fr.debian.org/debian | ||
Line 14: | Line 19: | ||
# cd /dev | # cd /dev | ||
# MAKEDEV generic | # MAKEDEV generic | ||
+ | </syntaxhighlight> | ||
+ | ==== Configuration ==== | ||
+ | ===== File Systems ===== | ||
+ | <syntaxhighlight lang="bash"> | ||
# nano /etc/fstab | # nano /etc/fstab | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 28: | Line 37: | ||
tmpfs /var/log tmpfs size=64M 0 0 | tmpfs /var/log tmpfs size=64M 0 0 | ||
</pre> | </pre> | ||
+ | ===== Network ===== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# nano /etc/network/interfaces | # nano /etc/network/interfaces | ||
Line 61: | Line 71: | ||
127.0.0.1 XEN | 127.0.0.1 XEN | ||
</pre> | </pre> | ||
+ | ===== Kernel ===== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# nano /etc/modprobe.d/blacklist.conf | # nano /etc/modprobe.d/blacklist.conf | ||
Line 69: | Line 80: | ||
blacklist bluetooth | blacklist bluetooth | ||
</pre> | </pre> | ||
+ | ==== Packages ==== | ||
+ | ===== Debian ===== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# nano /etc/apt/sources.list | # nano /etc/apt/sources.list | ||
Line 75: | Line 88: | ||
deb http://ftp.fr.debian.org/debian wheezy main non-free | deb http://ftp.fr.debian.org/debian wheezy main non-free | ||
</pre> | </pre> | ||
+ | ===== Localization ===== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# aptitude update | # aptitude update | ||
Line 83: | Line 97: | ||
# aptitude install xen-linux-system-amd64 | # aptitude install xen-linux-system-amd64 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | ===== XEN ===== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# exit | # exit | ||
Line 95: | Line 110: | ||
# nano /boot/syslinux/syslinux.cfg | # nano /boot/syslinux/syslinux.cfg | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | ==== Boot Manager ==== | ||
<pre> | <pre> | ||
LABEL debian | LABEL debian |
Revision as of 12:28, 20 October 2012
Contents |
Partition
# fdisk /dev/sda
n 3 [enter] +6G
Format
# mkfs.ext4 -E discard -L DEBIAN /dev/sda3 # mount /dev/disk/by-label/DEBIAN /mnt
Installation
# pacman -S debootstrap # debootstrap --arch ARCH wheezy /mnt http://ftp.fr.debian.org/debian # LANG=C chroot /mnt /bin/bash # export TERM=xterm-color # cd /dev # MAKEDEV generic
Configuration
File Systems
# nano /etc/fstab
# /etc/fstab # # <file system> <dir> <type> <options> <dump> <pass> /dev/sda3 / ext4 discard,noatime,nodiratime,defaults 0 1 proc /proc proc defaults 0 0 devpts /dev/pts devpts defaults 0 0 shm /dev/shm tmpfs nodev,nosuid 0 0 tmpfs /tmp tmpfs size=2048M 0 0 tmpfs /var/log tmpfs size=64M 0 0
Network
# nano /etc/network/interfaces
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.101 network 192.168.1.0 netmask 255.255.255.0 gateway 192.168.1.1 iface br0 inet static bridge_ports none address 192.168.1.199 broadcast 192.168.1.255 netmask 255.255.255.0 gateway 192.168.1.1
# nano /etc/resolv.conf
nameserver 192.168.1.1
# echo XEN > /etc/hostname # nano /etc/hosts
127.0.0.1 localhost 127.0.0.1 XEN
Kernel
# nano /etc/modprobe.d/blacklist.conf
blacklist pcspkr blacklist acpi_cpufreq blacklist bluetooth
Packages
Debian
# nano /etc/apt/sources.list
deb http://ftp.fr.debian.org/debian wheezy main non-free
Localization
# aptitude update # aptitude install locales # dpkg-reconfigure locales # aptitude install console-data # dpkg-reconfigure console-data # aptitude install xen-linux-system-amd64
XEN
# exit # ln -s /usr/lib/syslinux/mboot.c32 /boot/syslinux/mboot.c32 # mkdir /boot/Debian # cp /mnt/boot/xen-4.1-amd64.gz /boot/Debian/ # cp /mnt/boot/vmlinuz-3.2.0-3-amd64 /boot/Debian/ # cp /mnt/boot/initrd.img-3.2.0-3-amd64 /boot/Debian/ # ln -s /boot/Debian/xen-4.1-amd64.gz /boot/Debian/xen.gz # ln -s /boot/Debian/vmlinuz-3.2.0-3-amd64 /boot/Debian/vmlinuz # ln -s /boot/Debian/vmlinuz-3.2.0-3-amd64 /boot/Debian/initrd.img # nano /boot/syslinux/syslinux.cfg
Boot Manager
LABEL debian MENU LABEL De^bian Linux LINUX ../Debian/vmlinuz APPEND root=/dev/sda3 ro quiet elevator=noop nmi_watchdog=0 vga=0 INITRD ../Debian/initrd.img LABEL xen MENU LABEL Debian ^Xen KERNEL mboot.c32 APPEND ../Debian/xen.gz --- ../Debian/vmlinuz root=/dev/sda3 ro quiet elevator=noop nmi_watchdog=0 vga=0 --- ../Debian/initrd.img