Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
hypervisor:base:debian [2015/03/04 08:39] admin [Debian Installation] |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Debian Installation ====== | ||
- | ---- | ||
- | [[https://nsrc.org/workshops/2014/sanog23-virtualization/raw-attachment/wiki/Agenda/ex-debian-kvm-libvirt.htm]] | ||
- | |||
- | The **Debian Wheezy** installer is used since, as of this writing (2014-04-04), XCP-XAPI is not available for Jessia. It was booted from a USB stick.\\ | ||
- | In case you have no idea how to make a bootable Debian installer USB stick, please refer to the [[http://www.debian.org/releases/stable/i386/ch04s03.html.en|Debian documentation on the subject]], our attempt was made using the latest [[http://http.us.debian.org/debian/dists/wheezy/main/installer-i386/current/images/netboot/mini.iso|netboot mini.iso]] image (or choose the [[http://ftp.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/|64bit version]] if your architecture supports it). | ||
- | |||
- | We won't go into the details of installing Debian, following are simply a few notes that might be of interest during this step. | ||
- | |||
- | ---- | ||
- | ==== Desktop Environment ==== | ||
- | ---- | ||
- | We initialy skipped the desktop environment, although we might later install the lightweight LXDE GUI (if you plan to use virt-manager or are more at ease with Desktop GUI). Anyway, selecting to install the desktop environment right from the Debian installer will add a ton of extras (like the whole LibreOffice package) that you probably do not need in your Dom0! | ||
- | |||
- | ---- | ||
- | ==== Additional Packages ==== | ||
- | ---- | ||
- | You might want to add some proprietary drivers on the the space that is left free on your USB key. In our case, the Realtek WiFi interface required the [[https://packages.debian.org/fr/wheezy/firmware-realtek|rtlwifi/rtl8192cfw.bin]] package to be present.\\ | ||
- | You'll need to create a new partition in the free space left, using GParted is one of the easiest way to do this. | ||
- | |||
- | Once the packages are present on this extra space, it seems the Debian installer automatically detects them and uses them. | ||
- | |||
- | ---- | ||
- | ==== Partitionning ==== | ||
- | ---- | ||
- | In the case of the hypervisor layer, what we'd like is to have as much disk space as possible available for the virtual machines. Therefore we'll apply the following partition schema when the Debian installer asks for the partition method: | ||
- | |||
- | Partitioning method: Manual\\ | ||
- | Partition disks: Select your main HD (to delete all existing partitions)\\ | ||
- | Create new partitions: Select pri/log FREE SPACE, then create new partition. | ||
- | |||
- | Create a <color darkslateblue>**1GB for /boot**</color> filesystem | ||
- | |||
- | * Primary -> Beginning -> Ext4 journaling file system, | ||
- | * Mount point: /boot | ||
- | * Label: Boot | ||
- | * Bootable flag: on | ||
- | * -> Done | ||
- | |||
- | Create a second partition <color darkslateblue>**using the rest of available space**</color> | ||
- | |||
- | * Use full space available -> Primary | ||
- | * Use as: Physical volume for LVM | ||
- | * -> Done | ||
- | |||
- | <color darkslateblue>**Configure the Logical Volume Manager**</color> | ||
- | |||
- | * Write changes to disk and configure LVM?: Yes | ||
- | * Create volume group: xenvg | ||
- | * Select devices: (select only the LVM partition (/dev/sdX2) | ||
- | |||
- | <color darkslateblue>**Create logical volume**</color> | ||
- | |||
- | * Volume group: xenvg\\ | ||
- | * Logical volume name: root\\ | ||
- | * Logical volume size: 4GB | ||
- | |||
- | <color darkslateblue>**Create logical volume**</color> | ||
- | |||
- | * Volume group: xenvg\\ | ||
- | * Logical volume name: swap\\ | ||
- | * Logical volume size: 4GB | ||
- | |||
- | <color darkslateblue>**Create logical volume**</color> | ||
- | |||
- | * Volume group: xenvg\\ | ||
- | * Logical volume name: var\\ | ||
- | * Logical volume size: 20GB | ||
- | |||
- | <color darkslateblue>**Finish**</color> | ||
- | |||
- | ---- | ||
- | === Set mount points === | ||
- | |||
- | On top of the list, select the first entry | ||
- | <code> | ||
- | LVM VG xenvg, LV root - 4.0 GB Linux device-mapper (linear) | ||
- | #1 4.0GB | ||
- | </code> | ||
- | Use as: Ext4 -> Mount point: / -> Done | ||
- | |||
- | Second: **LV swap** entry: | ||
- | Use as: Swap -> Done | ||
- | |||
- | Third: **LV var**: | ||
- | Use as: Ext4 -> Mount point: /var -> Done | ||
- | |||
- | **Finish partitioning and write changes to disk** | ||
- | |||
- | ---- | ||
- | ==== Software selection ==== | ||
- | ---- | ||
- | [ ] Debian desktop environment //(we'll do that later: the light way)//\\ | ||
- | [*] SSH server\\ | ||
- | [*] Laptop //(for laptop users only obviously)//\\ | ||
- | [*] Standard system utilities\\ | ||
- | |||
- | ---- | ||
- | ==== GRUB ==== | ||
- | ---- | ||
- | Install the GRUB boot loader to the master boot record? Yes (you might have to say "no" and specify another device - for me it was /dev/sdb). | ||
- | |||
- | **Boot into the new system** | ||
- | |||
- | ---- | ||
- | ===== Basic Configuration ===== | ||
- | ---- | ||
- | Login as root | ||
- | |||
- | === remove cdrom from sources === | ||
- | In case you were installing from CDs or DVDs (were you really?), you'll need to remove them from sources: | ||
- | <code> | ||
- | > nano /etc/apt/sources.list | ||
- | </code> | ||
- | |||
- | Comment out any line which begins "deb cdrom:..." by inserting a hash (#) in front of it.\\ | ||
- | Save the file (ctrl-X). | ||
- | ---- | ||
- | ==== Install sudo ==== | ||
- | ---- | ||
- | You'll probably want sudo rights for your initial user: | ||
- | <code> | ||
- | > apt-get update | ||
- | > apt-get install sudo | ||
- | > usermod -G sudo -a user_name (chosen during install process) | ||
- | </code> | ||
- | |||